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.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 // File : VisuGUI_CutPlanesDlg.h
25 // Author : Laurent CORNABE & Hubert ROLLAND
29 #ifndef VISUGUI_CUTPLANESDLG_H
30 #define VISUGUI_CUTPLANESDLG_H
32 #include "VisuGUI_Prs3dDlg.h"
34 #include <SALOME_Actor.h>
37 #include <qradiobutton.h>
39 #include <qtabwidget.h>
41 #include <QtxDblSpinBox.h>
43 #include "SALOMEconfig.h"
44 #include CORBA_CLIENT_HEADER(VISU_Gen)
51 class SUIT_ViewWindow;
52 class SUIT_ViewManager;
53 class SalomeApp_Module;
54 class VisuGUI_InputPane;
56 class VisuGUI_CutPlanesPane : public QFrame
61 VisuGUI_CutPlanesPane (QWidget* parent);
62 ~VisuGUI_CutPlanesPane();
64 void setNbPlanes( const int nbp ) {nbPlan->setValue( nbp );}
65 int getNbPlanes() {return nbPlan->value();}
66 void setPlanePos( const VISU::CutPlanes::Orientation orient/*, const double pos1, const double pos2 */);
67 VISU::CutPlanes::Orientation getOrientaion();
68 void setRotation( const double r1, const double r2 );
69 double getRotation1() {return Rot1->value();}
70 double getRotation2() {return Rot2->value();}
72 void initFromPrsObject(VISU::CutPlanes_i* thePrs);
73 int storeToPrsObject(VISU::CutPlanes_i* thePrs);
87 QtxDblSpinBox* myPosSpn;
89 SALOME::GenericObjPtr<VISU::CutPlanes_i> myCutPlanes;
90 QCheckBox* myPreviewCheck;
96 SALOME_Actor* myPreviewActor;
99 void orientationChanged( int );
101 void setDefault( int all = -1);
102 void onValueChanged(int theRow, int theCol);
103 void onRotation(double theValue);
104 void onPreviewCheck(bool thePreview);
108 class VisuGUI_CutPlanesDlg : public VisuGUI_ScalarBarBaseDlg
113 VisuGUI_CutPlanesDlg (SalomeApp_Module* theModule);
114 ~VisuGUI_CutPlanesDlg();
116 virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
119 virtual int storeToPrsObject(VISU::ColoredPrs3d_i* thePrs);
122 virtual QString GetContextHelpFilePath();
129 QTabWidget* myTabBox;
130 VisuGUI_CutPlanesPane* myCutPane;
131 VisuGUI_InputPane* myInputPane;
132 SALOME::GenericObjPtr<VISU::CutPlanes_i> myPrsCopy;
136 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;
146 #endif // VISUGUI_CUTPLANESDLG_H