Class sh::ui::qt::QtActionMenuHandler

class sh::ui::qt::QtActionMenuHandler

A handler which reflects the sh::actions objects to a graphical menu (and keeps that up-to-date).

Public Functions

QtActionMenuHandler(std::shared_ptr<sh::actions::ActionInstantiation> ai, std::shared_ptr<QtActionMenu> menu)

Private Functions

void _markDefault2()
void _append_actions(sh::ui::qt::QtActionMenu *menu, QList<std::shared_ptr<sh::actions::ActionInstantiation>> acts, std::shared_ptr<sh::actions::ActionCategory> category)

Private Members

QList<std::shared_ptr<sh::actions::ActionInstantiation>> selacts
QList<std::shared_ptr<sh::actions::ActionInstantiation>> diracts
QHash<QAction*, std::shared_ptr<sh::actions::AbstractActionItem>> qaction2action
std::weak_ptr<QtActionMenu> menu

Private Static Functions

std::shared_ptr<sh::actions::ActionActionItem> _getDefaultAction(QList<std::shared_ptr<sh::actions::AbstractActionItem>> actionList)
void _markDefault(std::weak_ptr<sh::actions::SubmenuActionItem> itmSubmenu, sh::ui::qt::QtActionMenu *menu)
QAction *_createAndConnectAction(sh::actions::AbstractActionItem *itm, sh::ui::qt::QtActionMenu *menu, std::function<void()> onchangedQObject *onchangedbuddy = 0, )
void _applyPropertiesToQAction(sh::actions::AbstractActionItem *itm, QAction *_widgetaction)
void _updateSubmenu(sh::actions::SubmenuActionItem *itm, QtActionMenu *menu, std::function<void()> onchanged = 0)

Friends

friend class QtToolbarButtonHandler