![]() |
Carousel
|
The ToolBase class overrides all ITool methods with empty implementation for further convenience of inheritance. More...
#include <ToolBase.h>
Inherits Operation, and ITool.
Public Member Functions | |
ToolBase (QActionGroup *actionGroup=nullptr) | |
ToolBase (const QString &text, QActionGroup *actionGroup=nullptr) | |
ToolBase (const QIcon &icon, const QString &text, QActionGroup *actionGroup=nullptr) | |
void | execute () |
void | initialize (IServiceLocator *serviceLocator) |
bool | onContextMenu (QContextMenuEvent *event) |
void | onDoubleClick (QMouseEvent *event) |
void | onKeyDown (QKeyEvent *event) |
void | onKeyUp (QKeyEvent *event) |
void | onMouseDown (QMouseEvent *event) |
void | onMouseMove (QMouseEvent *event) |
void | onMouseUp (QMouseEvent *event) |
void | stopExecuting () |
![]() | |
Operation (QActionGroup *actionGroup=nullptr) | |
Operation (const QString &text, QActionGroup *actionGroup=nullptr) | |
Operation (const QIcon &icon, const QString &text, QActionGroup *actionGroup=nullptr) | |
QString | category () const |
QString | name () const |
![]() | |
QAction (QObject *parent) | |
QAction (const QString &text, QObject *parent) | |
QAction (QObject *parent, const char *name) | |
QAction (const QString &text, const QKeySequence &shortcut, QObject *parent, const char *name) | |
QAction (const QIcon &icon, const QString &text, QObject *parent) | |
QAction (const QIcon &icon, const QString &text, const QKeySequence &shortcut, QObject *parent, const char *name) | |
QKeySequence | accel () const |
QActionGroup * | actionGroup () const |
void | activate (ActionEvent event) |
void | activated (int i) |
bool | addTo (QWidget *w) |
QList< QGraphicsWidget * > | associatedGraphicsWidgets () const |
QList< QWidget * > | associatedWidgets () const |
bool | autoRepeat () const |
void | changed () |
QVariant | data () const |
QFont | font () const |
void | hover () |
void | hovered () |
QIcon | icon () const |
QIcon | iconSet () const |
QString | iconText () const |
bool | isCheckable () const |
bool | isChecked () const |
bool | isEnabled () const |
bool | isIconVisibleInMenu () const |
bool | isOn () const |
bool | isSeparator () const |
bool | isToggleAction () const |
bool | isVisible () const |
QMenu * | menu () const |
MenuRole | menuRole () const |
QString | menuText () const |
QWidget * | parentWidget () const |
Priority | priority () const |
bool | removeFrom (QWidget *w) |
void | setAccel (const QKeySequence &shortcut) |
void | setActionGroup (QActionGroup *group) |
void | setAutoRepeat (bool) |
void | setCheckable (bool) |
void | setChecked (bool) |
void | setData (const QVariant &userData) |
void | setDisabled (bool b) |
void | setEnabled (bool) |
void | setFont (const QFont &font) |
void | setIcon (const QIcon &icon) |
void | setIconSet (const QIcon &i) |
void | setIconText (const QString &text) |
void | setIconVisibleInMenu (bool visible) |
void | setMenu (QMenu *menu) |
void | setMenuRole (MenuRole menuRole) |
void | setMenuText (const QString &text) |
void | setOn (bool b) |
void | setPriority (Priority priority) |
void | setSeparator (bool b) |
void | setShortcut (const QKeySequence &shortcut) |
void | setShortcutContext (Qt::ShortcutContext context) |
void | setShortcuts (QKeySequence::StandardKey key) |
void | setShortcuts (const QList< QKeySequence > &shortcuts) |
void | setSoftKeyRole (SoftKeyRole softKeyRole) |
void | setStatusTip (const QString &statusTip) |
void | setText (const QString &text) |
void | setToggleAction (bool b) |
void | setToolTip (const QString &tip) |
void | setVisible (bool) |
void | setWhatsThis (const QString &what) |
QKeySequence | shortcut () const |
Qt::ShortcutContext | shortcutContext () const |
QList< QKeySequence > | shortcuts () const |
bool | showStatusText (QWidget *widget) |
SoftKeyRole | softKeyRole () const |
QString | statusTip () const |
QString | text () const |
void | toggle () |
void | toggled (bool checked) |
QString | toolTip () const |
void | trigger () |
void | triggered (bool checked) |
QString | whatsThis () const |
![]() | |
QObject (QObject *parent) | |
QObject (QObject *parent, const char *name) | |
bool | blockSignals (bool block) |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
const char * | className () const |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
void | deleteLater () |
void | destroyed (QObject *obj) |
bool | disconnect (const QObject *receiver, const char *method) |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
void | dumpObjectInfo () |
void | dumpObjectTree () |
QList< QByteArray > | dynamicPropertyNames () const |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QList< T > | findChildren (const QString &name) const |
bool | inherits (const char *className) const |
void | insertChild (QObject *object) |
void | installEventFilter (QObject *filterObj) |
bool | isA (const char *className) const |
bool | isWidgetType () const |
void | killTimer (int id) |
virtual const QMetaObject * | metaObject () const |
void | moveToThread (QThread *targetThread) |
const char * | name () const |
const char * | name (const char *defaultName) const |
QString | objectName () const |
QObject * | parent () const |
QVariant | property (const char *name) const |
void | removeChild (QObject *object) |
void | removeEventFilter (QObject *obj) |
void | setName (const char *name) |
void | setObjectName (const QString &name) |
void | setParent (QObject *parent) |
bool | setProperty (const char *name, const QVariant &value) |
bool | signalsBlocked () const |
int | startTimer (int interval) |
QThread * | thread () const |
![]() | |
virtual void | executingStopped ()=0 |
Additional Inherited Members | |
![]() | |
void | executingStopped () |
![]() | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
![]() | |
void | connectToSignals () |
void | disconectFromSignals () |
void | setCategory (const QString &category) |
void | setName (const QString &name) |
![]() | |
virtual bool | event (QEvent *e) |
![]() | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
![]() | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
![]() | |
autoRepeat | |
checkable | |
checked | |
enabled | |
font | |
icon | |
iconText | |
iconVisibleInMenu | |
menuRole | |
priority | |
shortcut | |
shortcutContext | |
softKeyRole | |
statusTip | |
text | |
toolTip | |
visible | |
whatsThis | |
![]() | |
objectName | |
The ToolBase class overrides all ITool methods with empty implementation for further convenience of inheritance.
You can derive your tools for the components from this class, if you don't want to override all members. The ToolBase class also set QAction::checkable() property to the true.
ToolBase::ToolBase | ( | QActionGroup * | actionGroup = nullptr | ) |
Initializes a new instance of the ToolBase class with action group, if any. If the action group not null, this tool will be automatically inserted into the group.
ToolBase::ToolBase | ( | const QString & | text, |
QActionGroup * | actionGroup = nullptr |
||
) |
Constructs a tool with action group, if any. If the action group not null, this tool will be automatically inserted into the group.
The ToolBase uses a stripped version of text (e.g. "&Menu Option..." becomes "Menu Option") as descriptive text for tool buttons. You can override this by setting a specific description with setText(). The same text will be used for tooltips unless you specify a different text using setToolTip().
ToolBase::ToolBase | ( | const QIcon & | icon, |
const QString & | text, | ||
QActionGroup * | actionGroup = nullptr |
||
) |
Constructs a tool with action group, if any. If the action group not null, this tool will be automatically inserted into the group.
The ToolBase uses a stripped version of text (e.g. "&Menu Option..." becomes "Menu Option") as descriptive text for tool buttons. You can override this by setting a specific description with setText(). The same text will be used for tooltips unless you specify a different text using setToolTip().
|
virtual |
Called when this tool is activated by user (button/menu is clicked, or shortkey pressed).
The ToolBase sets itself to the IInteractionService as the active tool when this method is invoked.
Write the code that performs the action when the tool is clicked in this method.
Implements IOperation.
|
virtual |
Occurs when user switch off this operation explicitly or implicitly (by selecting other tool).
Does nothing by default, just calls parent one.
Reimplemented from Operation.
|
virtual |
Called by carousel interactivity system to gives the operation a hook into the application. When subclassing ToolBase, use the initialize() method to get a hook to the application.
Reimplemented from Operation.
|
virtual |
Context menu event occured at the given in event location.
When impting Ito create a custom tool, write code to display a custom context menu the right mouse button is pressed when this tool is the active too * If your tool displays a custom context menu, it should let the application know that it handled the onContextMenu event by returning true. If you don't do this, the standard context menu will be displayed.
Implements IInputReceiver.
|
virtual |
Occurs when a mouse button is double clicked when this tool is active.
Implements IInputReceiver.
|
virtual |
Occurs when a key on the keyboard is pressed when this tool is active.
Implements IInputReceiver.
|
virtual |
Occurs when a key on the keyboard is released when this tool is active.
Implements IInputReceiver.
|
virtual |
Occurs when a mouse button is pressed when this tool is active.
Implements IInputReceiver.
|
virtual |
Occurs when the mouse is moved when this tool is active.
Implements IInputReceiver.
|
virtual |
Occurs when a mouse button is released when this tool is active.
Implements IInputReceiver.