graph_analysis
ActionCommander.hpp
Go to the documentation of this file.
1 #ifndef GRAPH_ANALYSIS_GUI_ACTIONCOMMANDER_HPP
2 #define GRAPH_ANALYSIS_GUI_ACTIONCOMMANDER_HPP
3 
4 #include <QIcon>
5 #include <QAction>
6 #include <QString>
7 #include <QMenu>
8 
9 namespace graph_analysis {
10 namespace gui {
11 
19 {
20 public:
22  ActionCommander(QObject* object);
25 
32  QAction* addAction(const char *title, const char *slot);
40  QAction* addAction(const char *title, const char *slot, QObject* object);
48  QAction* addAction(const char *title, const char *slot, const QIcon& icon);
57  QAction* addAction(const char *title, const char *slot, const QIcon& icon, QObject* object);
58 
70  QAction* addAction(const char *title, const char *slot, const QIcon& icon, const QKeySequence& keySequence, const QString& statusTip = QString(), QObject* object = 0);
71 
79  QAction* addMappedAction(const char *title, const char *slot, QObject *arg);
88  QAction* addMappedAction(const char *title, const char *slot, QObject *arg, QObject* object);
97  QAction* addMappedAction(const char *title, const char *slot, QObject *arg, const QIcon& icon);
107  QAction* addMappedAction(const char *title, const char *slot, QObject *arg, const QIcon& icon, QObject* object);
108 private:
110  QObject* mpObject;
111 };
112 
113 } // end namespace gui
114 } // end namespace graph_analysis
115 #endif // GRAPH_ANALYSIS_GUI_ACTIONCOMMANDER_HPP
graph_analysis::gui::ActionCommander::ActionCommander
ActionCommander(QObject *object)
constructor; stores the QObject instance reference for qt signal-slot connections
Definition: ActionCommander.cpp:12
graph_analysis::gui::ActionCommander::addAction
QAction * addAction(const char *title, const char *slot)
creates and registers a basic action with the stored 'mpObject' qt object
Definition: ActionCommander.cpp:104
graph_analysis
Main namespace of the graph analysis library.
Definition: BFS.cpp:3
graph_analysis::gui::ActionCommander::addMappedAction
QAction * addMappedAction(const char *title, const char *slot, QObject *arg)
creates and registers a complex action (with 1 parameter) with the stored 'mpObject' qt object
Definition: ActionCommander.cpp:132
graph_analysis::gui::ActionCommander
Creates QAction-s and registers them with given slots of the supplied QObject.
Definition: ActionCommander.hpp:18
graph_analysis::gui::ActionCommander::~ActionCommander
~ActionCommander()
destructor
Definition: ActionCommander.cpp:16