Salome HOME
Join modifications from BR_Dev_For_4_0 tag V4_1_1.
[modules/smesh.git] / src / SMESHGUI / SMESHGUI_Operation.h
1 //  SMESH SMDS : implementaion of Salome mesh data structure
2 //
3 //  Copyright (C) 2003  OPEN CASCADE
4 // 
5 //  This library is free software; you can redistribute it and/or 
6 //  modify it under the terms of the GNU Lesser General Public 
7 //  License as published by the Free Software Foundation; either 
8 //  version 2.1 of the License. 
9 // 
10 //  This library is distributed in the hope that it will be useful, 
11 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
12 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
13 //  Lesser General Public License for more details. 
14 // 
15 //  You should have received a copy of the GNU Lesser General Public 
16 //  License along with this library; if not, write to the Free Software 
17 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
18 // 
19 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 //
21 //  File   : SMESHGUI_Operation.h
22 //  Author : Sergey LITONIN
23 //  Module : SALOME
24
25
26 #ifndef SMESHGUI_Operation_H
27 #define SMESHGUI_Operation_H
28
29 #include "SMESH_SMESHGUI.hxx"
30
31 #include <LightApp_Operation.h>
32 #include <SALOMEDSClient.hxx>
33
34 class SMESHGUI;
35
36 /*
37   Class       : SMESHGUI_Operation
38   Description : Base class for all SMESH operations
39 */
40
41 class SMESHGUI_EXPORT SMESHGUI_Operation : public LightApp_Operation
42 {
43   Q_OBJECT
44
45 public:
46   SMESHGUI_Operation();
47   virtual ~SMESHGUI_Operation();
48
49 protected:
50   //! sets the dialog widgets to state just after operation start
51   virtual void      initDialog();
52
53   virtual void      startOperation();
54   virtual bool      isReadyToStart() const;
55   
56   //! Set according dialog active or inactive
57   virtual void      setDialogActive( const bool );
58
59   SMESHGUI*         getSMESHGUI() const;
60   bool              isStudyLocked( const bool = true ) const;
61
62   _PTR(Study)       studyDS() const;
63   
64   virtual bool      isValid( SUIT_Operation* ) const;
65
66   QString           myHelpFileName;
67
68 protected slots:
69   virtual void onOk();
70   virtual bool onApply();
71   virtual void onCancel();
72   void onHelp();
73 };
74
75 #endif
76
77
78
79
80
81