Salome HOME
Fix of issue 0020593: EDF 885 VISU: Unchecking Filter by Scalar does not remove white...
[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 QScrollArea;
33 class QPushButton;
34
35 class VisuGUI;
36
37 class VisuGUI_Panel : public QtxDockWidget
38 {
39   Q_OBJECT
40
41   class MainFrame;
42
43 public:
44   enum { OKBtn      = 0x0001,
45          ApplyBtn   = 0x0002,
46          CloseBtn   = 0x0004,
47          HelpBtn    = 0x0008, 
48          AllBtn = OKBtn | ApplyBtn | CloseBtn | HelpBtn
49   };
50
51 public:
52   VisuGUI_Panel( const QString& theName,
53                  VisuGUI*       theModule,
54                  QWidget*       theParent = 0,
55                  const int      theBtns   = AllBtn ); 
56   virtual ~VisuGUI_Panel();
57
58   virtual bool              isValid( QString& theMessage );
59   virtual void              clear();
60
61 protected slots:
62   virtual void              onOK();
63   virtual void              onApply();
64   virtual void              onClose();
65   virtual void              onHelp();
66
67   virtual void              onModuleActivated();
68   virtual void              onModuleDeactivated();
69
70 protected:
71   QWidget*                  mainFrame();
72
73 protected:
74   QScrollArea*              myView;
75   QWidget*                  myMainFrame;
76
77   QPushButton*              myOK;
78   QPushButton*              myApply;
79   QPushButton*              myClose;
80   QPushButton*              myHelp;
81
82   VisuGUI*                  myModule;
83 };
84
85 #endif