4 * Copyright (C) 2005 CEA/DEN, EDF R&D
8 * File : SalomeApp_SwitchOp.h
9 * Author : Sergey LITONIN
15 #ifndef SalomeApp_SwitchOp_H
16 #define SalomeApp_SwitchOp_H
20 class SalomeApp_Module;
21 class SalomeApp_Operation;
26 * \brief This class is intended for controling switching between operation
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.
41 class SalomeApp_SwitchOp : public QObject
47 SalomeApp_SwitchOp( SalomeApp_Module* );
48 virtual ~SalomeApp_SwitchOp();
50 // Redefined from base class
51 bool eventFilter( QObject*, QEvent* );
55 SalomeApp_Module* module() const;
56 SalomeApp_Operation* operation( QWidget* ) const;
57 SUIT_Study* study() const;
61 SalomeApp_Module* myModule;