Carousel
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties Pages
Public Member Functions | List of all members
IOperation Class Referenceabstract

This interface describes a simple operation that user interact with to work with application. More...

#include <IOperation.h>

Inherited by ITool [virtual], and Operation [virtual].

Public Member Functions

virtual QString category () const =0
 
virtual void execute ()=0
 
virtual void executingStopped ()=0
 
virtual void initialize (IServiceLocator *serviceLocator)=0
 
virtual QString name () const =0
 
virtual void stopExecuting ()=0
 

Detailed Description

This interface describes a simple operation that user interact with to work with application.

Use Operation instead of directly implementation of this interface - it is just a contract.

Member Function Documentation

virtual void IOperation::execute ( )
pure virtual

Called when this operation is activated by user (button/menu is clicked, or shortkey pressed). Write the code that performs the action when the operation is clicked in this method.

Implemented in ToolBase, ToggleActionWrapper, RedoOperation, and UndoOperation.

virtual QString IOperation::category ( ) const
pure 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.

Implemented in Operation.

virtual void IOperation::stopExecuting ( )
pure virtual

If operation is checkable, this method called after user switch off this operation.

Does nothing by default.

Implemented in Operation, ToolBase, and ToggleActionWrapper.

virtual void IOperation::initialize ( IServiceLocator serviceLocator)
pure virtual

Called by carousel interactivity system to gives the operation a hook into the application. When subclassing IOperation, 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.

Implemented in Operation, ToolBase, RedoOperation, and UndoOperation.

virtual QString IOperation::name ( ) const
pure 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.

Note
the text() property of a operation is the string that appears when the operation is placed on a operation bar.

Implemented in Operation.

virtual void IOperation::executingStopped ( )
pure virtual

This signal is emited when operation is deactivated.