4 * Copyright (C) 2005 CEA/DEN, EDF R&D
8 * File : LightApp_SwitchOp.h
9 * Author : Sergey LITONIN
15 #ifndef LightApp_SwitchOp_H
16 #define LightApp_SwitchOp_H
21 class LightApp_Module;
22 class LightApp_Operation;
27 * \brief This class is intended for controling switching between operation
29 * Several operation may be launched simultaneously. This class is intended for
30 * controlling switching between such operations. This class works with operations having
31 * dialogs (activation of other operations is performed by SUIT_Study). When several
32 * operations is launched simultaneously corresponding dialogs are shown on the screen.
33 * Only one operation from the launched ones can be active (active operation). Other
34 * operations are suspended. As result only one dialog from shown ones can be active too.
35 * Other dialogs are disabled. This class installs event filter on application. When mouse
36 * cursor is moved above disabled dialog corresponding event is catched by this class.
37 * It finds corresponding operation and verify whether operation can be resumed (see
38 * SUIT_Study::isDenied( SUIT_Operation* ) method). If yes then current active
39 * operation is suspended and new operation activated. Module contains this class as a
40 * field. Then module is created instance of this class created too.
42 class LIGHTAPP_EXPORT LightApp_SwitchOp : public QObject
48 LightApp_SwitchOp( LightApp_Module* );
49 virtual ~LightApp_SwitchOp();
51 // Redefined from base class
52 bool eventFilter( QObject*, QEvent* );
56 LightApp_Module* module() const;
57 LightApp_Operation* operation( QWidget* ) const;
58 SUIT_Study* study() const;
62 LightApp_Module* myModule;