Salome HOME
Update copyright information
[modules/visu.git] / src / VISUGUI / VisuGUI_Panel.h
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
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
20 //  VISU VISUGUI : GUI of VISU component
21 //  File   : VisuGUI_Panel.cxx
22 //  Author : Oleg Uvarov
23 //  Module : VISU
24 //
25 #ifndef VISUGUI_PANEL_H
26 #define VISUGUI_PANEL_H
27
28 #include <QtxDockWidget.h>
29
30 class QScrollArea;
31 class QPushButton;
32
33 class VisuGUI;
34
35 class VisuGUI_Panel : public QtxDockWidget
36 {
37   Q_OBJECT
38
39   class MainFrame;
40
41 public:
42   enum { OKBtn      = 0x0001,
43          ApplyBtn   = 0x0002,
44          CloseBtn   = 0x0004,
45          HelpBtn    = 0x0008, 
46          AllBtn = OKBtn | ApplyBtn | CloseBtn | HelpBtn
47   };
48
49 public:
50   VisuGUI_Panel( const QString& theName,
51                  VisuGUI*       theModule,
52                  QWidget*       theParent = 0,
53                  const int      theBtns   = AllBtn ); 
54   virtual ~VisuGUI_Panel();
55
56   virtual bool              isValid( QString& theMessage );
57   virtual void              clear();
58
59 protected slots:
60   virtual void              onOK();
61   virtual void              onApply();
62   virtual void              onClose();
63   virtual void              onHelp();
64
65   virtual void              onModuleActivated();
66   virtual void              onModuleDeactivated();
67
68 protected:
69   QWidget*                  mainFrame();
70
71 protected:
72   QScrollArea*              myView;
73   QWidget*                  myMainFrame;
74
75   QPushButton*              myOK;
76   QPushButton*              myApply;
77   QPushButton*              myClose;
78   QPushButton*              myHelp;
79
80   VisuGUI*                  myModule;
81 };
82
83 #endif