A QMenu that is dynamically populated from a QAbstractItemModel.
|
void | activated (const QModelIndex &index) |
|
void | hoveredText (const QString &text) |
|
|
| ModelMenu (QWidget *const parent=nullptr) |
|
int | firstSeparator () const |
|
int | hoverRole () const |
|
QAction * | makeAction (const QIcon &icon, const QString &text, QObject *const parent) |
|
int | maxRows () const |
|
QAbstractItemModel * | model () const |
|
QModelIndex | rootIndex () const |
|
int | separatorRole () const |
|
void | setFirstSeparator (int offset) |
|
void | setHoverRole (int role) |
|
void | setMaxRows (int max) |
|
void | setModel (QAbstractItemModel *model) |
|
void | setRootIndex (const QModelIndex &index) |
|
void | setSeparatorRole (int role) |
|
|
void | createMenu (const QModelIndex &parent, int max, QMenu *parentMenu=nullptr, QMenu *menu=nullptr) |
| put all of the children of parent into menu up to max
|
|
virtual void | postPopulated () |
| add any actions after the tree
|
|
virtual bool | prePopulated () |
| add any actions before the tree, return true if any actions are added.
|
|
◆ prePopulated()
bool Digikam::ModelMenu::prePopulated |
( |
| ) |
|
|
protectedvirtual |