Salome HOME
IPAL21035 It's impossible to hide scalar bar for gauss points
[modules/visu.git] / src / VISUGUI / VisuGUI_Plot3DDlg.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_Plot3DDlg.h
24 //  Author : Laurent CORNABE & Hubert ROLLAND
25 //  Module : VISU
26 //  $Header$
27 //
28 #ifndef VISUGUI_PLOT3D_H
29 #define VISUGUI_PLOT3D_H
30
31 #include "VisuGUI_Prs3dDlg.h"
32
33
34 class QButtonGroup;
35 class QTabWidget;
36 class QGroupBox;
37
38 class SalomeApp_Module;
39 class VisuGUI_InputPane;
40
41 namespace VISU 
42 {
43   class Plot3D_i;
44 };
45
46 class VISU_Plot3DPL;
47 class SVTK_ViewWindow;
48 class SALOME_Actor;
49 class QtxDoubleSpinBox;
50
51 class VisuGUI_Plot3DPane : public QWidget//QVBox
52 {
53   Q_OBJECT
54
55  public:
56   VisuGUI_Plot3DPane(QWidget* parent);
57   ~VisuGUI_Plot3DPane();
58
59   void initFromPrsObject (VISU::Plot3D_i* thePrs);
60   int  storeToPrsObject  (VISU::Plot3D_i* thePrs);
61
62   bool check();
63
64   VISU::Plot3D_i* GetPrs() { return myPrs; }
65
66   void setPlane(int theOrientation, double theXRotation, double theYRotation, double thePlanePos);
67
68  private:
69   bool                 myInitFromPrs;
70   SALOME_Actor*        myPreviewActor;
71   SVTK_ViewWindow*     myViewWindow;
72   VISU::Plot3D_i*      myPrs;
73   VISU_Plot3DPL*       myPipeCopy;
74
75   void storePrsParams();
76   void restorePrsParams();
77
78   QButtonGroup  * GBOrientation;
79   QGroupBox     * GBoxOrient;
80   QLabel        * LabelRot1;
81   QLabel        * LabelRot2;
82   QtxDoubleSpinBox * Rot1;
83   QtxDoubleSpinBox * Rot2;
84   QtxDoubleSpinBox * PositionSpn;
85   QCheckBox     * RelativeChkB;
86   QtxDoubleSpinBox * ScaleSpn;
87   QButtonGroup  * GBPrsType;
88   QSpinBox      * NbContoursSpn;
89   QCheckBox     * PreviewChkB;
90
91  private slots:
92
93   void orientationChanged( int );
94   void onRelativePos( bool );
95   void onPrsType( int );
96   void onPositionSpn();
97   void updatePreview();
98 };
99
100
101 class VisuGUI_Plot3DDlg : public VisuGUI_ScalarBarBaseDlg
102 {
103   Q_OBJECT
104
105  public:
106   VisuGUI_Plot3DDlg (SalomeApp_Module* theModule);
107   ~VisuGUI_Plot3DDlg();
108
109   virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
110                                   bool theInit );
111
112   virtual int  storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
113
114   void setPlane(int theOrientation, double theXRotation, double theYRotation, double thePlanePos);
115
116  protected:
117   virtual QString GetContextHelpFilePath();
118  
119  protected slots:
120   void accept();
121   void reject();
122
123  private:
124   QTabWidget*            myTabBox;
125   VisuGUI_Plot3DPane*    myIsoPane;
126   VisuGUI_InputPane*     myInputPane;
127
128   SALOME::GenericObjPtr<VISU::Plot3D_i> myPrsCopy;
129 };
130
131 #endif // VISUGUI_PLOT3D_H