64 IMode *currentMode()
const;
65 IMode *mode(
const QString &
id)
const;
67 void addAction(
Command *command,
int priority, QMenu *menu =
nullptr);
68 void addWidget(QWidget *widget);
69 void updateModeNameIcon(
IMode *mode,
const QIcon &icon,
const QString &label);
70 QVector<IMode *>
modes()
const {
return m_modes; }
71 void reorderModes(QMap<QString, int> priorities);
76 void newModeOrder(QVector<IMode *> modes);
80 void activateMode(
const QString &
id);
81 void activateModeByWorkspaceName(
const QString &
id);
82 void setFocusToCurrentMode();
83 void triggerAction(
const QString &actionId);
86 void objectAdded(QObject *obj);
87 void aboutToRemoveObject(QObject *obj);
88 void currentTabAboutToChange(
int index);
89 void currentTabChanged(
int index);
90 void updateModeToolTip();
91 void tabMoved(
int from,
int to);
94 int indexOf(
const QString &
id)
const;
95 void setDefaultKeyshortcuts();
100 QMap<Command *, int> m_actions;
101 QVector<IMode *> m_modes;
102 QVector<Command *> m_modeShortcuts;
103 QSignalMapper *m_signalMapper;
106 bool m_isReprioritizing;
111 #endif // MODEMANAGER_H
static ModeManager * instance()
QVector< IMode * > modes() const
The class Command represents an action like a menu item, tool button, or shortcut. You don't create Command objects directly, instead use {ActionManager::registerAction()} to register an action and retrieve a Command. The Command object represents the user visible action and its properties. If multiple actions are registered with the same ID (but different contexts) the returned Command is the shared one between these actions.