]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI_BasePanel.h
Salome HOME
f961c21c21872f48902d8312ed49dd74e6720471
[modules/visu.git] / src / VISUGUI / VisuGUI_BasePanel.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_BasePanel.cxx
24 //  Author : Oleg Uvarov
25 //  Module : VISU
26 //
27 #ifndef VISUGUI_BASEPANEL_H
28 #define VISUGUI_BASEPANEL_H
29
30 #include <QGroupBox>
31
32 class QScrollArea;
33 class QPushButton;
34
35 class VisuGUI_BasePanel : public QGroupBox
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_BasePanel( const QString& theName, QWidget* theParent, const int theBtns = AllBtn ); 
51   virtual ~VisuGUI_BasePanel();
52
53   virtual bool              isValid( QString& theMessage );
54   virtual void              clear();
55
56 signals:
57   void                      bpOk();
58   void                      bpApply();
59   void                      bpClose();
60   void                      bpHelp();
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
81 #endif