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 "VisuGUI_ScalarBarDlg.h"
33 #include "VISU_CutPlanes_i.hh"
35 #include <SALOME_Actor.h>
37 #include <qradiobutton.h>
40 #include "SALOMEconfig.h"
41 #include CORBA_CLIENT_HEADER(VISU_Gen)
44 class SUIT_ViewWindow;
45 class SUIT_ViewManager;
46 class SalomeApp_Module;
49 class VisuGUI_CutPlanesPane : public QFrame
54 VisuGUI_CutPlanesPane (QWidget* parent);
55 ~VisuGUI_CutPlanesPane();
57 void setNbPlanes( const int nbp ) {nbPlan->setValue( nbp );}
58 int getNbPlanes() {return nbPlan->value();}
59 void setPlanePos( const VISU::CutPlanes::Orientation orient/*, const double pos1, const double pos2 */);
60 VISU::CutPlanes::Orientation getOrientaion();
61 void setRotation( const double r1, const double r2 );
62 double getRotation1() {return Rot1->value();}
63 double getRotation2() {return Rot2->value();}
65 void initFromPrsObject(VISU::CutPlanes_i* thePrs);
66 int storeToPrsObject(VISU::CutPlanes_i* thePrs);
81 QtxDblSpinBox* myPosSpn;
83 VISU::CutPlanes_i* myCutPlanes;
84 QCheckBox* myPreviewCheck;
90 SALOME_Actor* myPreviewActor;
94 void orientationChanged( int );
96 void setDefault( int all = -1);
97 void onValueChanged(int theRow, int theCol);
98 void onRotation(double theValue);
99 void onPreviewCheck(bool thePreview);
103 class VisuGUI_CutPlanesDlg : public QDialog
108 VisuGUI_CutPlanesDlg (SalomeApp_Module* theModule,
109 bool theIsCreation = true, bool theIsModal = true);
110 ~VisuGUI_CutPlanesDlg() {};
112 void initFromPrsObject (VISU::CutPlanes_i* thePrs);
113 int storeToPrsObject (VISU::CutPlanes_i* thePrs);
118 void onWindowActivated (SUIT_ViewWindow*);
121 VisuGUI_CutPlanesPane* myCutPane;
122 VisuGUI_ScalarBarPane* myScalarPane;
123 VISU::CutPlanes_i* myPrs;
129 class VisuGUI_NumEditItem: public QTableItem
132 VisuGUI_NumEditItem(QTable* table, EditType et, const QString& text ):
133 QTableItem(table, et, text) {};
134 ~VisuGUI_NumEditItem() {};
136 QWidget* createEditor() const;
139 #endif // VISUGUI_CUTPLANESDLG_H