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

This class is intended for controling switching between operation. More...

#include <LightApp_SwitchOp.h>

Inheritance diagram for LightApp_SwitchOp:
Inheritance graph

Public Member Functions

 LightApp_SwitchOp (LightApp_Module *)
 Constructor. More...
 
virtual ~LightApp_SwitchOp ()
 Destructor. More...
 
bool eventFilter (QObject *, QEvent *)
 Event filter. More...
 

Private Member Functions

LightApp_Modulemodule () const
 Get module. More...
 
LightApp_Operationoperation (QWidget *) const
 Get operation by widget. More...
 
SUIT_Studystudy () const
 Get study. More...
 

Private Attributes

LightApp_ModulemyModule
 

Detailed Description

Several operation may be launched simultaneously. This class is intended for controlling switching between such operations. This class works with operations having dialogs (activation of other operations is performed by SUIT_Study). When several operations is launched simultaneously corresponding dialogs are shown on the screen. Only one operation from the launched ones can be active (active operation). Other operations are suspended. As result only one dialog from shown ones can be active too. Other dialogs are disabled. This class installs event filter on application. When mouse cursor is moved above disabled dialog corresponding event is catched by this class. It finds corresponding operation and verify whether operation can be resumed (see SUIT_Study::isDenied( SUIT_Operation* ) method). If yes then current active operation is suspended and new operation activated. Module contains this class as a field. Then module is created instance of this class created too.

Constructor & Destructor Documentation

LightApp_SwitchOp::LightApp_SwitchOp ( LightApp_Module theModule)
Parameters
theParent- parent of object

Creates instance of the object. Connects signals and slots. Install eveny filter on application

LightApp_SwitchOp::~LightApp_SwitchOp ( )
virtual

Member Function Documentation

bool LightApp_SwitchOp::eventFilter ( QObject theObj,
QEvent theEv 
)
Parameters
theObj- object
theEv- event

Event filter. Catched signals off application. If event concerns to dialog then corresponding operation is found and activated.

References SUIT_Study::blockingOperation(), SUIT_Operation::isActive(), LightApp_Operation::isAutoResumed(), operation(), SUIT_Study::resume(), and study().

LightApp_Module * LightApp_SwitchOp::module ( ) const
private

Get module. Module is a parent of this class

References myModule.

LightApp_Operation * LightApp_SwitchOp::operation ( QWidget theWg) const
private
Parameters
theWg- key widget to find operation
Returns
Pointer to the operations if it is found or zero

Find operation containing dialog with given widget

References study().

SUIT_Study * LightApp_SwitchOp::study ( ) const
private
Returns
Active study of application (in current realisation)

Get study

References SUIT_Application::activeStudy(), CAM_Module::application(), and module().

Member Data Documentation

LightApp_Module* LightApp_SwitchOp::myModule
private

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