Creates QAction-s and registers them with given slots of the supplied QObject.
More...
#include <ActionCommander.hpp>
|
| | ActionCommander (QObject *object) |
| | constructor; stores the QObject instance reference for qt signal-slot connections More...
|
| |
| | ~ActionCommander () |
| | destructor More...
|
| |
| QAction * | addAction (const char *title, const char *slot) |
| | creates and registers a basic action with the stored 'mpObject' qt object More...
|
| |
| QAction * | addAction (const char *title, const char *slot, QObject *object) |
| | creates and registers a basic action with the provided 'object' instead of the mpObject member field More...
|
| |
| QAction * | addAction (const char *title, const char *slot, const QIcon &icon) |
| | creates and registers a basic action with the stored 'mpObject' qt object More...
|
| |
| QAction * | addAction (const char *title, const char *slot, const QIcon &icon, QObject *object) |
| | creates and registers a basic action with the provided 'object' instead of the mpObject member field More...
|
| |
| QAction * | addAction (const char *title, const char *slot, const QIcon &icon, const QKeySequence &keySequence, const QString &statusTip=QString(), QObject *object=0) |
| | creates and registers a basic action with the provided 'object' instead of the mpObject member field More...
|
| |
| 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 More...
|
| |
| QAction * | addMappedAction (const char *title, const char *slot, QObject *arg, QObject *object) |
| | creates and registers a complex action (with 1 parameter) with the provided 'object' instead of the mpObject member field More...
|
| |
| QAction * | addMappedAction (const char *title, const char *slot, QObject *arg, const QIcon &icon) |
| | creates and registers a complex action (with 1 parameter) with the stored 'mpObject' qt object More...
|
| |
| QAction * | addMappedAction (const char *title, const char *slot, QObject *arg, const QIcon &icon, QObject *object) |
| | creates and registers a complex action (with 1 parameter) with the provided 'object' instead of the mpObject member field More...
|
| |
Creates QAction-s and registers them with given slots of the supplied QObject.
used to partially automate the code refactoring for the QMenu construction at runtime
◆ ActionCommander()
| graph_analysis::gui::ActionCommander::ActionCommander |
( |
QObject * |
object | ) |
|
constructor; stores the QObject instance reference for qt signal-slot connections
◆ ~ActionCommander()
| graph_analysis::gui::ActionCommander::~ActionCommander |
( |
| ) |
|
◆ addAction() [1/5]
| QAction * graph_analysis::gui::ActionCommander::addAction |
( |
const char * |
title, |
|
|
const char * |
slot |
|
) |
| |
creates and registers a basic action with the stored 'mpObject' qt object
- Parameters
-
| title | text to be displayed for this action |
| slot | string with the slot function name |
- Returns
- pointer to the resulting QAction instance
◆ addAction() [2/5]
| QAction * graph_analysis::gui::ActionCommander::addAction |
( |
const char * |
title, |
|
|
const char * |
slot, |
|
|
QObject * |
object |
|
) |
| |
creates and registers a basic action with the provided 'object' instead of the mpObject member field
- Parameters
-
| title | text to be displayed for this action |
| slot | string with the slot function name |
| object | qt object to register to |
- Returns
- pointer to the resulting QAction instance
◆ addAction() [3/5]
| QAction * graph_analysis::gui::ActionCommander::addAction |
( |
const char * |
title, |
|
|
const char * |
slot, |
|
|
const QIcon & |
icon |
|
) |
| |
creates and registers a basic action with the stored 'mpObject' qt object
- Parameters
-
| title | text to be displayed for this action |
| slot | string with the slot function name |
| icon | small image to be displayed left of the action title |
- Returns
- pointer to the resulting QAction instance
◆ addAction() [4/5]
| QAction * graph_analysis::gui::ActionCommander::addAction |
( |
const char * |
title, |
|
|
const char * |
slot, |
|
|
const QIcon & |
icon, |
|
|
QObject * |
object |
|
) |
| |
creates and registers a basic action with the provided 'object' instead of the mpObject member field
- Parameters
-
| title | text to be displayed for this action |
| slot | string with the slot function name |
| icon | small image to be displayed left of the action title |
| object | qt object to register to |
- Returns
- pointer to the resulting QAction instance
◆ addAction() [5/5]
| QAction * graph_analysis::gui::ActionCommander::addAction |
( |
const char * |
title, |
|
|
const char * |
slot, |
|
|
const QIcon & |
icon, |
|
|
const QKeySequence & |
keySequence, |
|
|
const QString & |
statusTip = QString(), |
|
|
QObject * |
object = 0 |
|
) |
| |
creates and registers a basic action with the provided 'object' instead of the mpObject member field
- Parameters
-
| title | text to be displayed for this action |
| slot | string with the slot function name |
| icon | small image to be displayed left of the action title |
| keySequence | Sequence of keys to trigger this action |
| statusTip | Text that shows up as status tip |
| object | qt object to register to |
- Returns
- pointer to the resulting QAction instance
- See also
- http://doc.qt.io/qt-4.8/qkeysequence.html
◆ addMappedAction() [1/4]
| QAction * graph_analysis::gui::ActionCommander::addMappedAction |
( |
const char * |
title, |
|
|
const char * |
slot, |
|
|
QObject * |
arg |
|
) |
| |
creates and registers a complex action (with 1 parameter) with the stored 'mpObject' qt object
- Parameters
-
| title | text to be displayed for this action |
| slot | string with the slot function name |
| arg | pointer to the argument of this action (it has to be a subclass of QObject) |
- Returns
- pointer to the resulting QAction instance
◆ addMappedAction() [2/4]
| QAction * graph_analysis::gui::ActionCommander::addMappedAction |
( |
const char * |
title, |
|
|
const char * |
slot, |
|
|
QObject * |
arg, |
|
|
QObject * |
object |
|
) |
| |
creates and registers a complex action (with 1 parameter) with the provided 'object' instead of the mpObject member field
- Parameters
-
| title | text to be displayed for this action |
| slot | string with the slot function name |
| arg | pointer to the argument of this action (it has to be a subclass of QObject) |
| object | qt object to register to |
- Returns
- pointer to the resulting QAction instance
◆ addMappedAction() [3/4]
| QAction * graph_analysis::gui::ActionCommander::addMappedAction |
( |
const char * |
title, |
|
|
const char * |
slot, |
|
|
QObject * |
arg, |
|
|
const QIcon & |
icon |
|
) |
| |
creates and registers a complex action (with 1 parameter) with the stored 'mpObject' qt object
- Parameters
-
| title | text to be displayed for this action |
| slot | string with the slot function name |
| arg | pointer to the argument of this action (it has to be a subclass of QObject) |
| icon | small image to be displayed left of the action title |
- Returns
- pointer to the resulting QAction instance
◆ addMappedAction() [4/4]
| QAction * graph_analysis::gui::ActionCommander::addMappedAction |
( |
const char * |
title, |
|
|
const char * |
slot, |
|
|
QObject * |
arg, |
|
|
const QIcon & |
icon, |
|
|
QObject * |
object |
|
) |
| |
creates and registers a complex action (with 1 parameter) with the provided 'object' instead of the mpObject member field
- Parameters
-
| title | text to be displayed for this action |
| slot | string with the slot function name |
| arg | pointer to the argument of this action (it has to be a subclass of QObject) |
| icon | small image to be displayed left of the action title |
| object | qt object to register to |
- Returns
- pointer to the resulting QAction instance
The documentation for this class was generated from the following files: