Salome HOME
minor corrections for correct compilation
[modules/gui.git] / src / SalomeApp / SalomeApp_SwitchOp.h
1 /**
2 *  SALOME SalomeApp
3 *
4 *  Copyright (C) 2005  CEA/DEN, EDF R&D
5 *
6 *
7 *
8 *  File   : SalomeApp_SwitchOp.h
9 *  Author : Sergey LITONIN
10 *  Module : SALOME
11 */
12
13
14
15 #ifndef SalomeApp_SwitchOp_H
16 #define SalomeApp_SwitchOp_H
17
18 #include <qobject.h>
19
20 class SalomeApp_Module;
21 class SalomeApp_Operation;
22 class QEvent;
23 class SUIT_Study;
24
25 /*!
26  * \brief This class is intended for controling switching between operation
27  *
28  * Several operation may be launched simultaneously. This class is intended for
29  * controlling switching between such operations. This class works with operations having
30  * dialogs (activation of other operations is performed by SUIT_Study). When several
31  * operations is launched simultaneously corresponding dialogs are shown on the screen.
32  * Only one operation from the launched ones can be active (active operation). Other
33  * operations are suspended. As result only one dialog from shown ones can be active too.
34  * Other dialogs are disabled. This class installs event filter on application. When mouse
35  * cursor is moved above disabled dialog corresponding event is catched by this class.
36  * It finds corresponding operation and verify whether operation can be resumed (see
37  * SUIT_Study::isDenied( SUIT_Operation* ) method). If yes then current active
38  * operation is suspended and new operation activated. Module contains this class as a
39  * field. Then module is created instance of this class created too.
40  */
41 class SalomeApp_SwitchOp : public QObject
42 {
43   Q_OBJECT
44
45 public:
46
47   SalomeApp_SwitchOp( SalomeApp_Module* );
48   virtual ~SalomeApp_SwitchOp();
49
50   // Redefined from base class
51   bool                      eventFilter( QObject*, QEvent* );
52
53 private:
54
55   SalomeApp_Module*         module() const;
56   SalomeApp_Operation*      operation( QWidget* ) const;
57   SUIT_Study*               study() const;
58   
59 private:
60   
61   SalomeApp_Module*        myModule;  
62
63 };
64
65 #endif
66
67
68
69
70
71