class XGUI_OperationMgr;
class QAction;
-class XGUI_EXPORT XGUI_ActionsMgr: public QObject
+class XGUI_EXPORT XGUI_ActionsMgr : public QObject
{
- Q_OBJECT
+Q_OBJECT
-public:
+ public:
XGUI_ActionsMgr(XGUI_Workshop* theWorkshop);
virtual ~XGUI_ActionsMgr();
QKeySequence registerShortcut(const QString& theKeySequence);
-public slots:
+ public slots:
//! Update workbench actions according to OperationMgr state:
//! No active operations: all actions but nested are available
//! There is active operation: current operation + it's nested
//! Sets all commands checked if it's operation is active.
void updateCheckState();
-protected:
+ protected:
//! Sets all actions to isEnabled state.
void setAllEnabled(bool isEnabled);
//! Sets all nested actions to isEnabled state for the command with given ID.
//! Sets the action with theId to theEnabled state.
void setActionEnabled(const QString& theId, const bool theEnabled);
-private:
+ private:
QMap<QString, QAction*> myActions;
QMap<QString, QStringList> myNestedActions;
QList<QKeySequence> myShortcuts;