1 // VISU VISUGUI : GUI of VISU component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : VisuGUI_CutPlanesDlg.h
25 // Author : Laurent CORNABE & Hubert ROLLAND
29 #ifndef VISUGUI_CUTPLANESDLG_H
30 #define VISUGUI_CUTPLANESDLG_H
32 #include "QAD_SpinBoxDbl.h"
33 #include "QAD_StudyFrame.h"
35 #include "VisuGUI_ScalarBarDlg.h"
36 #include "VISU_CutPlanes_i.hh"
37 #include <SALOME_Actor.h>
39 #include <qradiobutton.h>
42 #include "SALOMEconfig.h"
43 #include CORBA_CLIENT_HEADER(VISU_Gen)
46 class VisuGUI_CutPlanesPane : public QFrame
51 VisuGUI_CutPlanesPane(QWidget* theParent, QAD_Study * theStudy);
52 ~VisuGUI_CutPlanesPane();
54 void setNbPlanes( const int nbp ) {nbPlan->setValue( nbp );}
55 int getNbPlanes() {return nbPlan->value();}
56 void setPlanePos( const VISU::CutPlanes::Orientation orient/*, const double pos1, const double pos2 */);
57 VISU::CutPlanes::Orientation getOrientaion();
58 void setRotation( const double r1, const double r2 );
59 double getRotation1() {return Rot1->value();}
60 double getRotation2() {return Rot2->value();}
62 void initFromPrsObject(VISU::CutPlanes_i* thePrs);
63 int storeToPrsObject(VISU::CutPlanes_i* thePrs);
78 QAD_SpinBoxDbl* myPosSpn;
80 VISU::CutPlanes_i* myCutPlanes;
81 QCheckBox* myPreviewCheck;
88 //vector<SALOME_Actor*> myPreviewActors;
89 SALOME_Actor* myPreviewActor;
93 void orientationChanged( int );
95 void setDefault( int all = -1);
96 void onValueChanged(int theRow, int theCol);
97 void onRotation(double theValue);
98 void onPreviewCheck(bool thePreview);
103 class VisuGUI_CutPlanesDlg : public QDialog
108 VisuGUI_CutPlanesDlg(bool theIsCreation, bool theIsModal);
109 ~VisuGUI_CutPlanesDlg() {};
111 void initFromPrsObject(VISU::CutPlanes_i* thePrs)
112 {myPrs=thePrs; myScalarPane->initFromPrsObject(thePrs); myCutPane->initFromPrsObject(thePrs);}
114 int storeToPrsObject(VISU::CutPlanes_i* thePrs)
115 {return myScalarPane->storeToPrsObject(thePrs) && myCutPane->storeToPrsObject(thePrs);}
120 void onFrameActivated( QAD_StudyFrame* theFrame);
123 VisuGUI_CutPlanesPane* myCutPane;
124 VisuGUI_ScalarBarPane* myScalarPane;
125 VISU::CutPlanes_i* myPrs;
130 QAD_StudyFrame *myStudyFrame;
134 class VisuGUI_NumEditItem: public QTableItem
139 VisuGUI_NumEditItem(QTable* table, EditType et, const QString& text ):
140 QTableItem(table, et, text) {};
141 ~VisuGUI_NumEditItem() {};
143 QWidget* createEditor() const;
147 #endif // VISUGUI_CUTPLANESDLG_H