Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplified calculation of fly out distance and creation of constraints limited only...
[modules/shaper.git]
/
src
/
XGUI
/
XGUI_HistoryMenu.h
diff --git
a/src/XGUI/XGUI_HistoryMenu.h
b/src/XGUI/XGUI_HistoryMenu.h
index dfcb256fbf9d55dbc6aee297123090e78e5e10d9..267ce67f79561ae3440fe7bc4038d4b1a08253b9 100644
(file)
--- a/
src/XGUI/XGUI_HistoryMenu.h
+++ b/
src/XGUI/XGUI_HistoryMenu.h
@@
-11,29
+11,49
@@
#include <XGUI.h>
#include <QMenu>
#include <XGUI.h>
#include <QMenu>
+#include <ModuleBase_ActionInfo.h>
+
class QListWidget;
class QToolButton;
class QListWidgetItem;
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:
class XGUI_EXPORT XGUI_HistoryMenu : public QMenu
{
Q_OBJECT
public:
+ /// Creates history menu for button
explicit XGUI_HistoryMenu(QToolButton* theParent);
explicit XGUI_HistoryMenu(QToolButton* theParent);
+ /// Creates history menu for action
+ explicit XGUI_HistoryMenu(QAction* theParent);
virtual ~XGUI_HistoryMenu();
signals:
virtual ~XGUI_HistoryMenu();
signals:
- void actionsSelected(int);
+ /// Signal. Emited then n-th action is selected in stack
+ void actionSelected(int);
public slots:
public slots:
- void setHistory(const QList<QAction*>&);
+ /// Set list of actions
+ void setHistory(const QList<ActionInfo>&);
+
+ protected:
+ /// Unselects all items when cursor leaves the list
+ virtual void leaveEvent(QEvent *);
protected slots:
protected slots:
+ /// Selects all items in stack to the given item including it
void setStackSelectedTo(QListWidgetItem *);
void setStackSelectedTo(QListWidgetItem *);
+ /// Emits actionSelected() signal.
void onItemPressed(QListWidgetItem *);
void onItemPressed(QListWidgetItem *);
+ /// Initializes internal controls of the Menu
+ void initMenu();
private:
private:
- QListWidget* myHistoryList;
+ QListWidget* myHistoryList;
///< List to contain actions
};
#endif /* XGUI_OPERATIONSSTACKPOPUP_H_ */
};
#endif /* XGUI_OPERATIONSSTACKPOPUP_H_ */