Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[modules/gui.git] / src / LightApp / LightApp_Operation.h
1 // Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
2 // 
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.
7 // 
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 //  File   : LightApp_Operation.h
20 //  Author : Sergey LITONIN
21 //  Module : LIGHT
22
23
24 #ifndef LightApp_Operation_H
25 #define LightApp_Operation_H
26
27 #include "LightApp.h"
28 #include <SUIT_Operation.h>
29
30 class LightApp_Module;
31 class LightApp_Application;
32 class LightApp_Operation;
33 class LightApp_SelectionMgr;
34 class LightApp_Dialog;
35 class SUIT_Desktop;
36
37 /*!
38   \class LightApp_Operation
39   \brief Base class for all operations
40   Base class for all operations (see SUIT_Operation for more description)
41 */
42 class LIGHTAPP_EXPORT LightApp_Operation : public SUIT_Operation
43 {
44   Q_OBJECT
45
46 public:
47   LightApp_Operation();
48   virtual ~LightApp_Operation();
49
50   virtual void              setModule( LightApp_Module* );
51   LightApp_Module*          module() const;
52
53   bool                      isAutoResumed() const;
54
55   virtual LightApp_Dialog* dlg() const;
56
57 protected:
58
59   // Methods redefined from base class
60
61   virtual void              startOperation();
62   virtual void              suspendOperation();
63   virtual void              resumeOperation();
64   virtual void              abortOperation();
65   virtual void              commitOperation();
66
67   // Additional virtual methods may be redefined by derived classes
68   
69   virtual void              setDialogActive( const bool );
70   virtual void              activateSelection();
71   virtual void              selectionDone();
72
73
74   // Axiluary methods
75   
76   SUIT_Desktop*             desktop() const;
77   SUIT_Operation*           activeOperation() const;
78   LightApp_SelectionMgr*    selectionMgr() const;
79   void                      update( const int );
80   void                      setAutoResumed( const bool );
81       
82 private slots:
83
84   virtual void              onSelectionDone();
85
86 private:
87
88   LightApp_Module*          myModule;         
89   bool                      myIsAutoResumed;
90 };
91
92 #endif
93
94
95
96
97
98