This class is intended for controling switching between operation. More...
#include <LightApp_SwitchOp.h>
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_Module * | module () const |
Get module. More... | |
LightApp_Operation * | operation (QWidget *) const |
Get operation by widget. More... | |
SUIT_Study * | study () const |
Get study. More... | |
Private Attributes | |
LightApp_Module * | myModule |
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.
LightApp_SwitchOp::LightApp_SwitchOp | ( | LightApp_Module * | theModule | ) |
theParent | - parent of object |
Creates instance of the object. Connects signals and slots. Install eveny filter on application
|
virtual |
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().
|
private |
Get module. Module is a parent of this class
References myModule.
|
private |
theWg | - key widget to find operation |
Find operation containing dialog with given widget
References study().
|
private |
Get study
References SUIT_Application::activeStudy(), CAM_Module::application(), and module().
|
private |