Salome HOME
Update copyright information
[modules/visu.git] / src / VISUGUI / VisuGUI_BasePanel.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_BasePanel.cxx
22 //  Author : Oleg Uvarov
23 //  Module : VISU
24 //
25 #ifndef VISUGUI_BASEPANEL_H
26 #define VISUGUI_BASEPANEL_H
27
28 #include <QGroupBox>
29
30 class QScrollArea;
31 class QPushButton;
32
33 class VisuGUI_BasePanel : public QGroupBox
34 {
35   Q_OBJECT
36
37   class MainFrame;
38
39 public:
40   enum { OKBtn      = 0x0001,
41          ApplyBtn   = 0x0002,
42          CloseBtn   = 0x0004,
43          HelpBtn    = 0x0008, 
44          AllBtn = OKBtn | ApplyBtn | CloseBtn | HelpBtn
45   };
46
47 public:
48   VisuGUI_BasePanel( const QString& theName, QWidget* theParent, const int theBtns = AllBtn ); 
49   virtual ~VisuGUI_BasePanel();
50
51   virtual bool              isValid( QString& theMessage );
52   virtual void              clear();
53
54 signals:
55   void                      bpOk();
56   void                      bpApply();
57   void                      bpClose();
58   void                      bpHelp();
59
60 protected slots:
61   virtual void              onOK();
62   virtual void              onApply();
63   virtual void              onClose();
64   virtual void              onHelp();
65
66 protected:
67   QFrame*                   mainFrame();
68
69 protected:
70   QScrollArea*              myView;
71   QFrame*                   myMainFrame;
72
73   QPushButton*              myOK;
74   QPushButton*              myApply;
75   QPushButton*              myClose;
76   QPushButton*              myHelp;
77 };
78
79 #endif