1 // Copyright (C) 2005 OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/
20 #ifndef LightApp_SwitchOp_H
21 #define LightApp_SwitchOp_H
26 class LightApp_Module;
27 class LightApp_Operation;
32 * \brief This class is intended for controling switching between operation
34 * Several operation may be launched simultaneously. This class is intended for
35 * controlling switching between such operations. This class works with operations having
36 * dialogs (activation of other operations is performed by SUIT_Study). When several
37 * operations is launched simultaneously corresponding dialogs are shown on the screen.
38 * Only one operation from the launched ones can be active (active operation). Other
39 * operations are suspended. As result only one dialog from shown ones can be active too.
40 * Other dialogs are disabled. This class installs event filter on application. When mouse
41 * cursor is moved above disabled dialog corresponding event is catched by this class.
42 * It finds corresponding operation and verify whether operation can be resumed (see
43 * SUIT_Study::isDenied( SUIT_Operation* ) method). If yes then current active
44 * operation is suspended and new operation activated. Module contains this class as a
45 * field. Then module is created instance of this class created too.
47 class LIGHTAPP_EXPORT LightApp_SwitchOp : public QObject
53 LightApp_SwitchOp( LightApp_Module* );
54 virtual ~LightApp_SwitchOp();
56 // Redefined from base class
57 bool eventFilter( QObject*, QEvent* );
61 LightApp_Module* module() const;
62 LightApp_Operation* operation( QWidget* ) const;
63 SUIT_Study* study() const;
67 LightApp_Module* myModule;