]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI_IsoSurfacesDlg.h
Salome HOME
Merge from BR_V5_DEV 16Feb09
[modules/visu.git] / src / VISUGUI / VisuGUI_IsoSurfacesDlg.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_IsoSurfacesDlg.h
24 //  Author : Laurent CORNABE & Hubert ROLLAND
25 //  Module : VISU
26 //  $Header$
27
28 #ifndef VISUGUI_ISOSURFACESDLG_H
29 #define VISUGUI_ISOSURFACESDLG_H
30
31 #include "VisuGUI_Prs3dDlg.h"
32
33 class QTabWidget;
34 class QLineEdit;
35 class QSpinBox;
36 class QtxColorButton;
37
38 namespace VISU 
39 {
40   class IsoSurfaces_i;
41 };
42
43 class SalomeApp_Module;
44 class VisuGUI_InputPane;
45
46 class VisuGUI_IsoSurfPane : public QWidget
47 {
48   Q_OBJECT;
49
50 public:
51   VisuGUI_IsoSurfPane (QWidget* parent,
52                        VisuGUI_ScalarBarPane* theScalarPane);
53   ~VisuGUI_IsoSurfPane() {};
54
55   void initFromPrsObject(VISU::IsoSurfaces_i* thePrs);
56   int storeToPrsObject(VISU::IsoSurfaces_i* thePrs);
57
58   bool check();
59
60   void setColor(const QColor& theColor);
61   QColor color() const;
62
63 protected slots:
64   void onCBUpdate();
65   void setColor();
66
67 private:
68   QLineEdit*      MinIso;
69   QLineEdit*      MaxIso;
70   QSpinBox*       NbrIso;
71   QCheckBox*      myUseMagnitude;
72   QtxColorButton* mySelColor;
73   QCheckBox*      myUseLabels;
74   QSpinBox*       myNbLabels;
75   VisuGUI_ScalarBarPane* myScalarPane;
76 };
77
78
79 class VisuGUI_IsoSurfacesDlg : public VisuGUI_ScalarBarBaseDlg
80 {
81   Q_OBJECT;
82
83 public:
84   VisuGUI_IsoSurfacesDlg (SalomeApp_Module* theModule);
85   ~VisuGUI_IsoSurfacesDlg();
86
87   virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
88                                   bool theInit );
89
90   virtual int storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
91
92 protected:
93   virtual QString  GetContextHelpFilePath();
94
95  protected slots:
96   void accept();
97
98 private:
99   QTabWidget*            myTabBox;
100   VisuGUI_IsoSurfPane*   myIsoPane;
101   VisuGUI_InputPane*     myInputPane;
102
103   SALOME::GenericObjPtr<VISU::IsoSurfaces_i> myPrsCopy;
104 };
105
106 #endif // VISUGUI_ISOSURFACESDLG_H