00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, 00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 00005 // 00006 // This library is free software; you can redistribute it and/or 00007 // modify it under the terms of the GNU Lesser General Public 00008 // License as published by the Free Software Foundation; either 00009 // version 2.1 of the License. 00010 // 00011 // This library is distributed in the hope that it will be useful, 00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 // Lesser General Public License for more details. 00015 // 00016 // You should have received a copy of the GNU Lesser General Public 00017 // License along with this library; if not, write to the Free Software 00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 // 00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00021 // 00022 00023 // VISU VISUGUI : GUI of VISU component 00024 // File : VisuGUI_Plot3DDlg.h 00025 // Author : Laurent CORNABE & Hubert ROLLAND 00026 // Module : VISU 00027 // $Header: /home/server/cvs/VISU/VISU_SRC/src/VISUGUI/VisuGUI_Plot3DDlg.h,v 1.7.2.1.6.1.8.1 2011-06-02 06:00:21 vsr Exp $ 00028 // 00029 #ifndef VISUGUI_PLOT3D_H 00030 #define VISUGUI_PLOT3D_H 00031 00032 #include "VisuGUI_Prs3dDlg.h" 00033 00034 00035 class QButtonGroup; 00036 class QTabWidget; 00037 class QGroupBox; 00038 00039 class SalomeApp_Module; 00040 class SalomeApp_IntSpinBox; 00041 00042 class VisuGUI_InputPane; 00043 class SalomeApp_DoubleSpinBox; 00044 00045 namespace VISU 00046 { 00047 class Plot3D_i; 00048 }; 00049 00050 class VISU_Plot3DPL; 00051 class SVTK_ViewWindow; 00052 class SALOME_Actor; 00053 00054 class VisuGUI_Plot3DPane : public QWidget//QVBox 00055 { 00056 Q_OBJECT 00057 00058 public: 00059 VisuGUI_Plot3DPane(QWidget* parent); 00060 ~VisuGUI_Plot3DPane(); 00061 00062 void initFromPrsObject (VISU::Plot3D_i* thePrs); 00063 int storeToPrsObject (VISU::Plot3D_i* thePrs); 00064 00065 bool check(); 00066 00067 VISU::Plot3D_i* GetPrs() { return myPrs; } 00068 00069 void setPlane(int theOrientation, double theXRotation, double theYRotation, double thePlanePos); 00070 00071 private: 00072 bool myInitFromPrs; 00073 SALOME_Actor* myPreviewActor; 00074 SVTK_ViewWindow* myViewWindow; 00075 VISU::Plot3D_i* myPrs; 00076 VISU_Plot3DPL* myPipeCopy; 00077 00078 void storePrsParams(); 00079 void restorePrsParams(); 00080 00081 QButtonGroup * GBOrientation; 00082 QGroupBox * GBoxOrient; 00083 QLabel * LabelRot1; 00084 QLabel * LabelRot2; 00085 SalomeApp_DoubleSpinBox * Rot1; 00086 SalomeApp_DoubleSpinBox * Rot2; 00087 SalomeApp_DoubleSpinBox * PositionSpn; 00088 QCheckBox * RelativeChkB; 00089 SalomeApp_DoubleSpinBox * ScaleSpn; 00090 QButtonGroup * GBPrsType; 00091 SalomeApp_IntSpinBox * NbContoursSpn; 00092 QCheckBox * PreviewChkB; 00093 00094 private slots: 00095 00096 void orientationChanged( int ); 00097 void onRelativePos( bool ); 00098 void onPrsType( int ); 00099 void onPositionSpn(); 00100 void updatePreview(); 00101 }; 00102 00103 00104 class VisuGUI_Plot3DDlg : public VisuGUI_ScalarBarBaseDlg 00105 { 00106 Q_OBJECT 00107 00108 public: 00109 VisuGUI_Plot3DDlg (SalomeApp_Module* theModule); 00110 ~VisuGUI_Plot3DDlg(); 00111 00112 virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs, 00113 bool theInit ); 00114 00115 virtual int storeToPrsObject(VISU::ColoredPrs3d_i* thePrs); 00116 00117 void setPlane(int theOrientation, double theXRotation, double theYRotation, double thePlanePos); 00118 00119 protected: 00120 virtual QString GetContextHelpFilePath(); 00121 00122 protected slots: 00123 void accept(); 00124 void reject(); 00125 00126 private: 00127 QTabWidget* myTabBox; 00128 VisuGUI_Plot3DPane* myIsoPane; 00129 VisuGUI_InputPane* myInputPane; 00130 00131 SALOME::GenericObjPtr<VISU::Plot3D_i> myPrsCopy; 00132 }; 00133 00134 #endif // VISUGUI_PLOT3D_H