From: sbh Date: Fri, 13 Feb 2015 16:22:38 +0000 (+0300) Subject: Documentation updated X-Git-Tag: V_1.1.0~189 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=45fa5730565366d6450a2cac86965eafc5b4e0be;p=modules%2Fshaper.git Documentation updated --- diff --git a/src/ModuleBase/ModuleBase_ActionInfo.h b/src/ModuleBase/ModuleBase_ActionInfo.h index 766a16b8c..16ac4e331 100644 --- a/src/ModuleBase/ModuleBase_ActionInfo.h +++ b/src/ModuleBase/ModuleBase_ActionInfo.h @@ -23,8 +23,7 @@ */ struct MODULEBASE_EXPORT ModuleBase_ActionInfo { - QString id; - + QString id; //!< action's (command) id bool checkable; //!< action's checkable state bool checked; //!< action's checked state bool enabled; //!< action's enabled state diff --git a/src/NewGeom/NewGeom_Module.h b/src/NewGeom/NewGeom_Module.h index 36bae93af..f8834b760 100644 --- a/src/NewGeom/NewGeom_Module.h +++ b/src/NewGeom/NewGeom_Module.h @@ -53,9 +53,9 @@ Q_OBJECT const QKeySequence& theKeys = QKeySequence(), bool isCheckable = false); + //! Add feature (QAction) in the \a theWBName toolbar with given \a theInfo about action virtual QAction* addFeature(const QString& theWBName, - const ActionInfo& theInfo); - + const ActionInfo& theInfo); virtual QAction* addDesktopCommand(const QString& theId, const QString& theTitle, const QString& theTip, const QIcon& theIcon, diff --git a/src/XGUI/XGUI_ActionsMgr.h b/src/XGUI/XGUI_ActionsMgr.h index 00f6086ef..0acc6a26a 100644 --- a/src/XGUI/XGUI_ActionsMgr.h +++ b/src/XGUI/XGUI_ActionsMgr.h @@ -39,6 +39,7 @@ class XGUI_EXPORT XGUI_ActionsMgr : public QObject, public Events_Listener XGUI_ActionsMgr(XGUI_Workshop* theWorkshop); virtual ~XGUI_ActionsMgr(); + /// Actions on operations enum OperationStateActionId { Abort = 0, Accept = 1, @@ -79,6 +80,7 @@ class XGUI_EXPORT XGUI_ActionsMgr : public QObject, public Events_Listener //! If there is no such action, it will be created. QAction* operationStateAction(OperationStateActionId theId, QObject* theParent = 0); + /// Return info (icon, text, etc) about the action by the given id, if it was registered in the manager ActionInfo actionInfoById(const QString& theId); public slots: diff --git a/src/XGUI/XGUI_HistoryMenu.cpp b/src/XGUI/XGUI_HistoryMenu.cpp index 95c6ae802..bfdae5390 100644 --- a/src/XGUI/XGUI_HistoryMenu.cpp +++ b/src/XGUI/XGUI_HistoryMenu.cpp @@ -14,9 +14,6 @@ #include #include -//! Extends given feature with previously created context menu. -//! \param theId - Id of the feature to add \a theMenu -//! \param theMenu - Enables or disables menu feature XGUI_HistoryMenu::XGUI_HistoryMenu(QAction* theParent) : QMenu(NULL), myHistoryList(NULL) @@ -27,9 +24,6 @@ XGUI_HistoryMenu::XGUI_HistoryMenu(QAction* theParent) connect(theParent, SIGNAL(destroyed()), this, SLOT(deleteLater())); } -//! Extends given feature with previously created context menu. -//! \param theId - Id of the feature to add \a theMenu -//! \param theMenu - Enables or disables menu feature XGUI_HistoryMenu::XGUI_HistoryMenu(QToolButton* theParent) : QMenu(theParent), myHistoryList(NULL) diff --git a/src/XGUI/XGUI_HistoryMenu.h b/src/XGUI/XGUI_HistoryMenu.h index 563689e43..267ce67f7 100644 --- a/src/XGUI/XGUI_HistoryMenu.h +++ b/src/XGUI/XGUI_HistoryMenu.h @@ -17,31 +17,43 @@ class QListWidget; class QToolButton; class QListWidgetItem; +/** + * \class XGUI_HistoryMenu + * \ingroup GUI + * \brief Extends regular QToolButton of QAction with HistoryMenu (stack of actions) + */ class XGUI_EXPORT XGUI_HistoryMenu : public QMenu { Q_OBJECT public: + /// Creates history menu for button explicit XGUI_HistoryMenu(QToolButton* theParent); + /// Creates history menu for action explicit XGUI_HistoryMenu(QAction* theParent); virtual ~XGUI_HistoryMenu(); signals: + /// Signal. Emited then n-th action is selected in stack void actionSelected(int); public slots: + /// Set list of actions void setHistory(const QList&); protected: + /// Unselects all items when cursor leaves the list virtual void leaveEvent(QEvent *); protected slots: + /// Selects all items in stack to the given item including it void setStackSelectedTo(QListWidgetItem *); + /// Emits actionSelected() signal. void onItemPressed(QListWidgetItem *); + /// Initializes internal controls of the Menu void initMenu(); - private: - QListWidget* myHistoryList; + QListWidget* myHistoryList; ///< List to contain actions }; #endif /* XGUI_OPERATIONSSTACKPOPUP_H_ */ diff --git a/src/XGUI/XGUI_SalomeConnector.h b/src/XGUI/XGUI_SalomeConnector.h index c06bd3e52..414ac4d66 100644 --- a/src/XGUI/XGUI_SalomeConnector.h +++ b/src/XGUI/XGUI_SalomeConnector.h @@ -34,6 +34,9 @@ class XGUI_EXPORT XGUI_SalomeConnector const QString& theTitle, const QString& theTip, const QIcon& theIcon, const QKeySequence& theKeys, bool isCheckable) = 0; + //! Creates a feature (command) in SALOME desktop + //! \param theWBName - name of toolbar (workbench) + //! \param theInfo - information about action (icon, text, etc) virtual QAction* addFeature(const QString& theWBName, const ActionInfo& theInfo) = 0; diff --git a/src/XGUI/XGUI_Workshop.h b/src/XGUI/XGUI_Workshop.h index 6ef022dfb..3f5d8f2c1 100644 --- a/src/XGUI/XGUI_Workshop.h +++ b/src/XGUI/XGUI_Workshop.h @@ -217,7 +217,9 @@ signals: //! the application is started void applicationStarted(); + //! Signal to update Undo history list void updateUndoHistory(const QList&); + //! Signal to update Redo history list void updateRedoHistory(const QList&); public slots: