24 #ifndef DIGIKAM_CATEGORIZED_ITEM_MODEL_H
25 #define DIGIKAM_CATEGORIZED_ITEM_MODEL_H
29 #include <QStandardItemModel>
50 ItemOrderRole = Qt::UserRole + 1
57 QStandardItem* addItem(
const QString& text,
const QVariant& category,
const QVariant& categorySorting = QVariant());
58 QStandardItem* addItem(
const QString& text,
const QIcon& decoration,
const QVariant& category,
59 const QVariant& categorySorting = QVariant());
74 ItemActionRole = Qt::UserRole + 10
80 ToplevelMenuCategory = 1 << 0,
83 ParentMenuCategory = 1 << 1,
86 SortCategoriesAlphabetically = 1 << 10,
89 SortCategoriesByInsertionOrder = 1 << 11
91 Q_DECLARE_FLAGS(MenuCategoryMode, MenuCategoryFlag)
103 QStandardItem* addAction(QAction* action,
const QString& category,
const QVariant& categorySorting = QVariant());
105 void setMode(MenuCategoryMode mode);
106 MenuCategoryMode mode()
const;
108 void addActions(QWidget* widget);
109 void addActions(QWidget* widget,
const QList<QAction*>& actionWhiteList);
117 QStandardItem* itemForAction(QAction* action)
const;
118 QModelIndex indexForAction(QAction* action)
const;
124 static QAction* actionForIndex(
const QModelIndex& index);
133 void hover(
const QModelIndex& index);
134 void toggle(
const QModelIndex& index);
135 void trigger(
const QModelIndex& index);
139 void slotActionChanged();
143 void setPropertiesFromAction(QStandardItem* item, QAction* action);
153 Q_DECLARE_OPERATORS_FOR_FLAGS(Digikam::ActionItemModel::MenuCategoryMode)
Definition: categorizeditemmodel.h:67
DCategorizedSortFilterProxyModel * m_filterModel
Definition: categorizeditemmodel.h:148
MenuCategoryFlag
Definition: categorizeditemmodel.h:78
MenuCategoryMode m_mode
Definition: categorizeditemmodel.h:147
Definition: categorizeditemmodel.h:42
ExtraRoles
Definition: categorizeditemmodel.h:48
Definition: dcategorizedsortfilterproxymodel.h:53
Definition: datefolderview.cpp:43