]> SALOME platform Git repositories - modules/visu.git/blob - src/VISUGUI/VisuGUI_CutPlanesDlg.h
Salome HOME
NRI : Merge branch br_porting_MED.
[modules/visu.git] / src / VISUGUI / VisuGUI_CutPlanesDlg.h
1 //  VISU VISUGUI : GUI of VISU component
2 //
3 //  Copyright (C) 2003  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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : VisuGUI_CutPlanesDlg.h
25 //  Author : Laurent CORNABE & Hubert ROLLAND 
26 //  Module : VISU
27 //  $Header$
28
29 #ifndef VISUGUI_CUTPLANESDLG_H
30 #define VISUGUI_CUTPLANESDLG_H
31
32 #include "QAD_SpinBoxDbl.h"
33 #include "VisuGUI_ScalarBarDlg.h"
34
35 #include <qdialog.h>
36 #include <qbuttongroup.h>
37 #include <qgroupbox.h>
38 #include <qlabel.h>
39 #include <qpushbutton.h>
40 #include <qradiobutton.h>
41 #include <qspinbox.h>
42 #include <qtable.h>
43
44 #include "SALOMEconfig.h"
45 #include CORBA_CLIENT_HEADER(VISU_Gen)
46 namespace VISU{
47   class CutPlanes_i;
48 }
49
50 class VisuGUI_CutPlanesDlg : public QDialog
51
52     Q_OBJECT
53
54 public:
55     VisuGUI_CutPlanesDlg();
56     ~VisuGUI_CutPlanesDlg();
57
58     void setBounds( const double x1, const double x2, 
59                     const double y1, const double y2, 
60                     const double z1, const double z2 );
61     void   setNbPlanes( const int nbp );
62     int    getNbPlanes();
63     void   setPlanePos( const VISU::CutPlanes::Orientation orient/*, const double pos1, const double pos2 */);
64     VISU::CutPlanes::Orientation  getOrientaion();
65     void   setRotation( const double r1, const double r2 );
66     double getRotation1();
67     double getRotation2();
68
69     void initFromPrsObject(VISU::CutPlanes_i* thePrs);
70     void storeToPrsObject(VISU::CutPlanes_i* thePrs);
71    
72 private:
73     QLabel* LabelRot1;
74     QLabel* LabelRot2;
75     QSpinBox* nbPlan;
76     QAD_SpinBoxDbl* Rot1;
77     QAD_SpinBoxDbl* Rot2;
78     QRadioButton* RBzx;
79     QRadioButton* RByz;
80     QRadioButton* RBxy;
81     QAD_SpinBoxDbl* myPosSpn;
82     QTable* myPosTable;
83     VISU::CutPlanes_i* myCutPlanes;  
84     double          X1, X2;
85     double          Y1, Y2;
86     double          Z1, Z2;
87     bool hasInit;
88
89 private slots:
90     void editScalarBar();
91     void orientationChanged( int );
92     void DrawTable();
93     void setDefault( int all = -1);
94 };
95
96 #endif // VISUGUI_CUTPLANESDLG_H