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;
48 class VisuGUI_CutPlanesPane : public QFrame
53 VisuGUI_CutPlanesPane(QWidget* theParent/*, SUIT_ViewManager * theStudy*/);
54 ~VisuGUI_CutPlanesPane();
56 void setNbPlanes( const int nbp ) {nbPlan->setValue( nbp );}
57 int getNbPlanes() {return nbPlan->value();}
58 void setPlanePos( const VISU::CutPlanes::Orientation orient/*, const double pos1, const double pos2 */);
59 VISU::CutPlanes::Orientation getOrientaion();
60 void setRotation( const double r1, const double r2 );
61 double getRotation1() {return Rot1->value();}
62 double getRotation2() {return Rot2->value();}
64 void initFromPrsObject(VISU::CutPlanes_i* thePrs);
65 int storeToPrsObject(VISU::CutPlanes_i* thePrs);
80 QtxDblSpinBox* myPosSpn;
82 VISU::CutPlanes_i* myCutPlanes;
83 QCheckBox* myPreviewCheck;
88 //SUIT_ViewManager *myMgr;
90 //vector<SALOME_Actor*> myPreviewActors;
91 SALOME_Actor* myPreviewActor;
95 void orientationChanged( int );
97 void setDefault( int all = -1);
98 void onValueChanged(int theRow, int theCol);
99 void onRotation(double theValue);
100 void onPreviewCheck(bool thePreview);
104 class VisuGUI_CutPlanesDlg : public QDialog
109 //VisuGUI_CutPlanesDlg(QWidget* parent, bool theIsCreation = true, bool theIsModal = false);
110 VisuGUI_CutPlanesDlg (QWidget* parent, bool theIsCreation = true, bool theIsModal = true);
111 ~VisuGUI_CutPlanesDlg() {};
113 void initFromPrsObject (VISU::CutPlanes_i* thePrs);
114 int storeToPrsObject (VISU::CutPlanes_i* thePrs);
119 void onWindowActivated (SUIT_ViewWindow*);
122 VisuGUI_CutPlanesPane* myCutPane;
123 VisuGUI_ScalarBarPane* myScalarPane;
124 VISU::CutPlanes_i* myPrs;
130 class VisuGUI_NumEditItem: public QTableItem
133 VisuGUI_NumEditItem(QTable* table, EditType et, const QString& text ):
134 QTableItem(table, et, text) {};
135 ~VisuGUI_NumEditItem() {};
137 QWidget* createEditor() const;
140 #endif // VISUGUI_CUTPLANESDLG_H