]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI_Panel.h
Salome HOME
IPAL20954 problem loading help pages
[modules/visu.git] / src / VISUGUI / VisuGUI_Panel.h
1 //  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 //  VISU VISUGUI : GUI of VISU component
23 //  File   : VisuGUI_Panel.cxx
24 //  Author : Oleg Uvarov
25 //  Module : VISU
26 //
27 #ifndef VISUGUI_PANEL_H
28 #define VISUGUI_PANEL_H
29
30 #include <QtxDockWidget.h>
31
32 class QFrame;
33 class QScrollArea;
34 class QPushButton;
35
36 class VisuGUI;
37
38 class VisuGUI_Panel : public QtxDockWidget
39 {
40   Q_OBJECT
41
42   class MainFrame;
43
44 public:
45   enum { OKBtn      = 0x0001,
46          ApplyBtn   = 0x0002,
47          CloseBtn   = 0x0004,
48          HelpBtn    = 0x0008, 
49          AllBtn = OKBtn | ApplyBtn | CloseBtn | HelpBtn
50   };
51
52 public:
53   VisuGUI_Panel( const QString& theName,
54                  const VisuGUI* theModule,
55                  QWidget* theParent,
56                  const int theBtns = AllBtn ); 
57   virtual ~VisuGUI_Panel();
58
59   virtual bool              isValid( QString& theMessage );
60   virtual void              clear();
61
62 protected slots:
63   virtual void              onOK();
64   virtual void              onApply();
65   virtual void              onClose();
66   virtual void              onHelp();
67
68 protected:
69   QFrame*                   mainFrame();
70
71 protected:
72   QScrollArea*              myView;
73   QFrame*                   myMainFrame;
74
75   QPushButton*              myOK;
76   QPushButton*              myApply;
77   QPushButton*              myClose;
78   QPushButton*              myHelp;
79
80   const VisuGUI*            myModule;
81 };
82
83 #endif