![]() |
Carousel
|
Inherit this abstract class to create a operations provides user to interact with application. More...
#include <Operation.h>
Inherits QAction, and IOperation.
Inherited by InstallComponentsOperation, RedoOperation, ShowComponentsOperation, ShowScriptsOperation, ToggleActionWrapper, ToogleDialogOperation, ToolBase, and UndoOperation.
Signals | |
void | executingStopped () |
Public Member Functions | |
Operation (QActionGroup *actionGroup=nullptr) | |
Operation (const QString &text, QActionGroup *actionGroup=nullptr) | |
Operation (const QIcon &icon, const QString &text, QActionGroup *actionGroup=nullptr) | |
QString | category () const |
void | initialize (IServiceLocator *serviceLocator) |
QString | name () const |
void | stopExecuting () |
![]() | |
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 | execute ()=0 |
virtual void | executingStopped ()=0 |
Protected Member Functions | |
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) |
Additional Inherited Members | |
![]() | |
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) |
![]() | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
![]() | |
autoRepeat | |
checkable | |
checked | |
enabled | |
font | |
icon | |
iconText | |
iconVisibleInMenu | |
menuRole | |
priority | |
shortcut | |
shortcutContext | |
softKeyRole | |
statusTip | |
text | |
toolTip | |
visible | |
whatsThis | |
![]() | |
objectName | |
Inherit this abstract class to create a operations provides user to interact with application.
One of the way of user interaction with Carousel based applications are the operations, which call application essentials. You can create the following types of operations:
When you are creating a new operation, you must derived from the this class in your class code. This class determines the behavior and properties of simple operations such as buttons and menu items. For example, it declares operation properties such as name, category, icon, desctiptive text that used in QAction subclass - Operation and in the Customization dialog. It also defines what action happens when the operation is clicked.
You should implement at least execute() method in the derived class.
Operation::Operation | ( | QActionGroup * | actionGroup = nullptr | ) |
Initializes a new instance of the Operation class with action group, if any. If the action group not null, this operation will be automatically inserted into the group.
Operation::Operation | ( | const QString & | text, |
QActionGroup * | actionGroup = nullptr |
||
) |
Initializes a new instance of the Operation class with action group, if any. If the action group not null, this operation will be automatically inserted into the group.
The Operation 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().
Operation::Operation | ( | const QIcon & | icon, |
const QString & | text, | ||
QActionGroup * | actionGroup = nullptr |
||
) |
Initializes a new instance of the Operation class with action group, if any. If the action group not null, this operation will be automatically inserted into the group.
The Operation 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 |
The name of the category with which this operation is associated. It determines where the operation will appear in the Operations panel of the Customize dialog.
Implements IOperation.
|
virtual |
If operation is checkable, this method called after user switch off this operation.
It is also emmits executingStopped() signal.
Implements IOperation.
Reimplemented in ToolBase, and ToggleActionWrapper.
|
virtual |
Called by carousel interactivity system to gives the operation a hook into the application. When subclassing Operation, use the initialize() method to get a hook to the application. When the final, complete boot loading takes place, the initialize() method gets called for every registered operation.
Does nothing by default.
Implements IOperation.
Reimplemented in ToolBase, RedoOperation, and UndoOperation.
|
virtual |
This property of a operation is a programmatic identifying name string. By convention, a operation's name should include its category name. The format of the name string should be <category>.<text>. Since it is an identifier of the operation, this property should not be localized. This property used to store user's customization.
Implements IOperation.
|
signal |
This signal is emited when operation is deactivated.
|
protected |
Sets the name of the category with which this operation is associated. It determines where the operation will appear in the Operations panel of the Customize dialog.
|
protected |
Sets the programmatic identifying name string. By convention, a operation's name should include its category name. The format of the name string should be <category>.<text>. Since it is an identifier of the operation, this property should not be localized. This property used to store user's customization.
|
protected |
To provide convinient execute() and stopExecuting() methods Operation class subscribes to the base QAction class' signals QAction::toggled() and QAction::triggered(). It is already done in the constructor, but it may required to connect explicitly, e.g. after disconnecting.
|
protected |
To provide convinient execute() and stopExecuting() methods Operation class subscribes to the base QAction class' signals QAction::toggled() and QAction::triggered(). But for some cases may required to change, for example, checked() property silencely, without invoking execute() or stopExecuting(). To do it you should call disconectFromSignals() first and then connectToSignals againg.