Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
LightApp_Operation Class Reference

Base class for all operations Base class for all operations (see SUIT_Operation for more description)

#include <LightApp_Operation.h>

Inheritance diagram for LightApp_Operation:
Inheritance graph

Public Member Functions

 LightApp_Operation ()
 Constructor. More...
 
virtual ~LightApp_Operation ()
 Destructor. More...
 
virtual void setModule (LightApp_Module *)
 Sets module of operation. More...
 
LightApp_Modulemodule () const
 Gets module of operation. More...
 
bool isAutoResumed () const
 Gets autoresume property. More...
 
virtual LightApp_Dialogdlg () const
 Gets dialog. More...
 
- Public Member Functions inherited from SUIT_Operation
 SUIT_Operation (SUIT_Application *)
 Constructor. More...
 
virtual ~SUIT_Operation ()
 Destructor. More...
 
OperationState state () const
 Gets state of operation. More...
 
bool isActive () const
 Verifies whether operation is an active for study. More...
 
bool isRunning () const
 Verifies whether operation is an runned one (state()==Running) More...
 
SUIT_Studystudy () const
 Returns operation study. More...
 
virtual void setStudy (SUIT_Study *theStudy)
 Sets operation study. More...
 
SUIT_Applicationapplication () const
 Gets application. More...
 
virtual void setApplication (SUIT_Application *theApp)
 Sets application. More...
 
virtual bool isValid (SUIT_Operation *theOtherOp) const
 Verifies whether given operator is valid for this one. More...
 
virtual bool isGranted () const
 Verifies whether this operator can be always started above any already runnig one. More...
 
bool setSlot (const QObject *theReceiver, const char *theSlot)
 Sets slot which is called when operation is started. More...
 
void setFlags (const int)
 Sets the flags of operation. More...
 
void clearFlags (const int)
 Clears the flags of operation. More...
 
bool testFlags (const int) const
 Test the flags of operation. More...
 
virtual QString operationName () const
 Name of the operation. More...
 
int execStatus () const
 Gets execution status. More...
 

Protected Member Functions

virtual void startOperation ()
 Performs actions needed for starting operation. More...
 
virtual void suspendOperation ()
 Performs actions needed for suspending operation. More...
 
virtual void resumeOperation ()
 Enable dialog of operation. More...
 
virtual void abortOperation ()
 Performs actions needed for aborting operation. More...
 
virtual void commitOperation ()
 Performs actions needed for committing operation. More...
 
virtual void setDialogActive (const bool)
 Activate/Deactivate dialog of operation. More...
 
virtual void activateSelection ()
 Activates selection. More...
 
virtual void selectionDone ()
 Virtual method called when selection is changed. More...
 
SUIT_Desktopdesktop () const
 Gets desktop of operation. More...
 
SUIT_OperationactiveOperation () const
 Gets active operation. More...
 
LightApp_SelectionMgrselectionMgr () const
 Gets selection manager. More...
 
void update (const int)
 Update object browser or/and viewer etc. More...
 
void setAutoResumed (const bool)
 Sets autoresume property. More...
 
- Protected Member Functions inherited from SUIT_Operation
virtual bool isReadyToStart () const
 Verifies whether operator is ready to start. More...
 
virtual void stopOperation ()
 Virtual method called when operation is started. More...
 
virtual bool openTransaction ()
 Opens transaction for data modifications. More...
 
virtual bool abortTransaction ()
 Aborts transaction and all performed data modifications. More...
 
virtual bool hasTransaction () const
 Returns true if transaction is opened. More...
 
virtual bool commitTransaction (const QString &=QString())
 Commits transaction and all performed data modifications. More...
 
void setExecStatus (const int)
 Sets execution status. More...
 
void setState (const OperationState)
 Sets state of operation. More...
 
void start (SUIT_Operation *, const bool=false)
 Starts operator above this one. More...
 

Private Slots

virtual void onSelectionDone ()
 Call selectionDone() method. More...
 

Private Attributes

LightApp_ModulemyModule
 
bool myIsAutoResumed
 

Additional Inherited Members

- Public Types inherited from SUIT_Operation
enum  OperationState { Waiting, Running, Suspended }
 
enum  ExecStatus { Rejected, Accepted }
 
enum  Flags { None = 0x00, Transaction = 0x01 }
 
- Public Slots inherited from SUIT_Operation
void start ()
 Starts operation. More...
 
void abort ()
 Aborts operation. More...
 
void commit ()
 Commits operation. More...
 
void resume ()
 Resumes operation. More...
 
void suspend ()
 Suspend operation. More...
 
- Signals inherited from SUIT_Operation
void started (SUIT_Operation *)
 
void aborted (SUIT_Operation *)
 
void committed (SUIT_Operation *)
 
void stopped (SUIT_Operation *)
 
void resumed (SUIT_Operation *)
 
void suspended (SUIT_Operation *)
 
void callSlot ()
 

Constructor & Destructor Documentation

LightApp_Operation::LightApp_Operation ( )

Constructor sets myModule in NULL and myIsAutoResumed in true

LightApp_Operation::~LightApp_Operation ( )
virtual

Destructor does nothing

Member Function Documentation

void LightApp_Operation::abortOperation ( )
protectedvirtual

Virtual method redefined from the base class calls corresponding method of base class and hides dialog box (if it is exists), disconnect slots from selection manager

Reimplemented from SUIT_Operation.

References SUIT_Operation::abortOperation(), dlg(), onSelectionDone(), selectionMgr(), and setDialogActive().

void LightApp_Operation::activateSelection ( )
protectedvirtual

Virtual method should be redefined in derived classes if they use own selection modes (different from default)

SUIT_Operation * LightApp_Operation::activeOperation ( ) const
protected

This method provided for convinience calls SUIT_Study::activeOperation() one

References SUIT_Study::activeOperation(), and SUIT_Operation::study().

void LightApp_Operation::commitOperation ( )
protectedvirtual

Virtual method redefined from the base class calls corresponding method of base class and hides dialog box (if it is exists), disconnect slots from selection manager

Reimplemented from SUIT_Operation.

References SUIT_Operation::commitOperation(), dlg(), onSelectionDone(), selectionMgr(), and setDialogActive().

SUIT_Desktop * LightApp_Operation::desktop ( ) const
protected
Returns
Pointer to the desktop

Gets pointer to the desktop or NULL if application was not set. It is strongly recomended to set valid pointer on the application before start of operation

References SUIT_Operation::application(), and SUIT_Application::desktop().

LightApp_Dialog * LightApp_Operation::dlg ( ) const
virtual
Returns
Pointer to the dialog of this operation or NULL if it does not exist

This method should be redefined in derived classes if they use dialogs. If this function returns pointer to dialog then dialog will be correctly

  1. deactivated in suspendOperation method
  2. activated in resumeOperation method
  3. hidden in abortOperation and commitOperation methods
bool LightApp_Operation::isAutoResumed ( ) const
Returns
Autoresume property.

Autoresume property is used during automatic resuming operation. If operation is suspended and cursor is moved above dialog of the operation then operation is resumed automatically (if possible). It can be resumed only program call otherwise (see LightApp_SwitchOp for more description). This property is true by default and may be changed with setAutoResumed() method call.

References myIsAutoResumed.

LightApp_Module * LightApp_Operation::module ( ) const
Returns
Pointer to the module

Gets pointer to the module or NULL if module was not set. It is strongly recomended to set valid pointer on the module before start of operation

References myModule.

void LightApp_Operation::onSelectionDone ( )
privatevirtualslot

Call selectionDone() method if operator is an active one (see selectionDone() for more description )

References SUIT_Operation::isActive(), and selectionDone().

void LightApp_Operation::resumeOperation ( )
protectedvirtual

Virtual method redefined from the base class. Enable dialog if it was desabled (in suspend method) and activate selection

Reimplemented from SUIT_Operation.

References SUIT_Operation::resumeOperation(), and setDialogActive().

void LightApp_Operation::selectionDone ( )
protectedvirtual

Virtual method should be redefined in derived classes if they works with selection to provide reaction on the change of selection

LightApp_SelectionMgr * LightApp_Operation::selectionMgr ( ) const
protected

This method provided for convinience calls LightApp_Application::selectionMgr() one

References app, and SUIT_Operation::application().

void LightApp_Operation::setAutoResumed ( const bool  on)
protected
Parameters
on- Value to be set
Returns
Autoresume property.

Sets autoresume property (see isAutoResumed() for more description)

References myIsAutoResumed.

void LightApp_Operation::setDialogActive ( const bool  active)
protectedvirtual
Parameters
active- State of the dialog to be set

Activate/Deactivate dialog of operation. This method called from startOperation(), suspendOperation() ones and so on

References activateSelection(), and dlg().

void LightApp_Operation::setModule ( LightApp_Module theModule)
virtual
Parameters
theModule- module to be set

Sets pointer to the module. It is strongly recomended to set valid pointer on the module before start of operation

References CAM_Module::application(), SUIT_Operation::application(), myModule, SUIT_Operation::setApplication(), and SUIT_Operation::setStudy().

void LightApp_Operation::startOperation ( )
protectedvirtual

Virtual method redefined from the base class. Connect signal of selection manager to onSelectionDone() slot

Reimplemented from SUIT_Operation.

Reimplemented in LightApp_ShowHideOp.

References onSelectionDone(), selectionMgr(), and setDialogActive().

void LightApp_Operation::suspendOperation ( )
protectedvirtual

Virtual method redefined from the base class. This implementation calls corresponding method of base class and cals setDialogActive( false )

Reimplemented from SUIT_Operation.

References setDialogActive(), and SUIT_Operation::suspendOperation().

void LightApp_Operation::update ( const int  flags)
protected
Parameters
flags- update flags

This method provided for convinience calls LightApp_Module::update() one (see LightApp_Module::update() for more description)

References myModule, and LightApp_Module::update().

Member Data Documentation

bool LightApp_Operation::myIsAutoResumed
private
LightApp_Module* LightApp_Operation::myModule
private

The documentation for this class was generated from the following files: