|
void | hover (const QModelIndex &index) |
|
void | toggle (const QModelIndex &index) |
|
void | trigger (const QModelIndex &index) |
|
◆ ExtraRoles
◆ MenuCategoryFlag
Enumerator |
---|
ToplevelMenuCategory | The toplevel menu's text is used as category.
|
ParentMenuCategory | If the action is in a submenu, this menu's text is taken as category.
|
SortCategoriesAlphabetically | Sort categories alphabetically by category name.
|
SortCategoriesByInsertionOrder | Sort categories by the order they are added (found in the scanned menu)
|
◆ ActionItemModel()
Digikam::ActionItemModel::ActionItemModel |
( |
QObject *const |
parent = nullptr | ) |
|
|
explicit |
This class is a CategorizedItemModel based on QActions, taking an action's text and icon for display and decoration. It is possible to retrieve an action for an index, and to call the action's slots from a given index.
◆ actionForIndex()
QAction * Digikam::ActionItemModel::actionForIndex |
( |
const QModelIndex & |
index | ) |
|
|
static |
◆ addAction()
QStandardItem * Digikam::ActionItemModel::addAction |
( |
QAction * |
action, |
|
|
const QString & |
category, |
|
|
const QVariant & |
categorySorting = QVariant() |
|
) |
| |
◆ addActions() [1/2]
void Digikam::ActionItemModel::addActions |
( |
QWidget * |
widget | ) |
|
◆ addActions() [2/2]
void Digikam::ActionItemModel::addActions |
( |
QWidget * |
widget, |
|
|
const QList< QAction * > & |
actionWhiteList |
|
) |
| |
◆ addItem() [1/2]
QStandardItem * Digikam::CategorizedItemModel::addItem |
( |
const QString & |
text, |
|
|
const QIcon & |
decoration, |
|
|
const QVariant & |
category, |
|
|
const QVariant & |
categorySorting = QVariant() |
|
) |
| |
|
inherited |
◆ addItem() [2/2]
QStandardItem * Digikam::CategorizedItemModel::addItem |
( |
const QString & |
text, |
|
|
const QVariant & |
category, |
|
|
const QVariant & |
categorySorting = QVariant() |
|
) |
| |
|
inherited |
◆ createFilterModel()
◆ hover
void Digikam::ActionItemModel::hover |
( |
const QModelIndex & |
index | ) |
|
|
slot |
These three slots will cause the slots of the referred action to be called. Connect here for example a view's signals. Note that you can also pass indices from proxy models.
References actionForIndex().
◆ indexForAction()
QModelIndex Digikam::ActionItemModel::indexForAction |
( |
QAction * |
action | ) |
const |
◆ itemForAction()
QStandardItem * Digikam::ActionItemModel::itemForAction |
( |
QAction * |
action | ) |
const |
◆ mode()
ActionItemModel::MenuCategoryMode Digikam::ActionItemModel::mode |
( |
| ) |
const |
◆ setMode()
void Digikam::ActionItemModel::setMode |
( |
MenuCategoryMode |
mode | ) |
|
◆ setPropertiesFromAction()
void Digikam::ActionItemModel::setPropertiesFromAction |
( |
QStandardItem * |
item, |
|
|
QAction * |
action |
|
) |
| |
|
protected |
◆ slotActionChanged
void Digikam::ActionItemModel::slotActionChanged |
( |
| ) |
|
|
protectedslot |
◆ toggle
void Digikam::ActionItemModel::toggle |
( |
const QModelIndex & |
index | ) |
|
|
slot |
◆ trigger
void Digikam::ActionItemModel::trigger |
( |
const QModelIndex & |
index | ) |
|
|
slot |
◆ m_filterModel
◆ m_mode
MenuCategoryMode Digikam::ActionItemModel::m_mode |
|
protected |
The documentation for this class was generated from the following files: