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 // File : VisuGUI_CutLinesDlg.h 00024 // Author : VSV 00025 // Module : VISU 00026 // 00027 #ifndef VISUGUI_CUTLINESDLG_H 00028 #define VISUGUI_CUTLINESDLG_H 00029 00030 #include "VisuGUI_CutPlanesDlg.h" 00031 00032 #include <QCheckBox> 00033 00034 class QLineEdit; 00035 class QTabWidget; 00036 00037 class SUIT_ViewManager; 00038 class SalomeApp_Module; 00039 class VisuGUI_InputPane; 00040 class SalomeApp_DoubleSpinBox; 00041 00042 namespace VISU 00043 { 00044 class CutLines_i; 00045 } 00046 00047 class VisuGUI_CutLinesDlg: public VisuGUI_ScalarBarBaseDlg 00048 { 00049 Q_OBJECT 00050 00051 public: 00052 VisuGUI_CutLinesDlg (SalomeApp_Module* theModule); 00053 ~VisuGUI_CutLinesDlg(); 00054 00055 virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs, 00056 bool theInit ); 00057 00058 virtual int storeToPrsObject(VISU::ColoredPrs3d_i* thePrs); 00059 00060 bool isGenerateTable() { return myCreateTable->isChecked(); } 00061 bool isGenerateCurves() { return myCreateTable->isChecked() && myCurvesCheck->isChecked(); } 00062 00063 protected: 00064 virtual QString GetContextHelpFilePath(); 00065 00066 protected slots: 00067 void accept(); 00068 void reject(); 00069 00070 private slots: 00071 void onPlaneSelect (int theId); 00072 void onCutSelect (int theId, bool theUpdate = true); 00073 void setBaseDefault (bool theUpdate = true); 00074 void setDefault (int all = -1); 00075 void DrawTable(); 00076 void onValueChanged (int theRow, int theCol); 00077 void onPreviewCheck (bool thePreview); 00078 void onAllCurvesInvertedCheck(bool theInvert); 00079 void onRotation (double theValue); 00080 void onPlanePos (const QString& theValue); 00081 00082 private: 00083 void createPlanes(); 00084 void deletePlanes(); 00085 void updateGlyphs(bool update); 00086 00087 QButtonGroup* mySelPlane; 00088 SalomeApp_DoubleSpinBox* myRotXSpn; 00089 SalomeApp_DoubleSpinBox* myRotYSpn; 00090 QLabel* myRotXLbl; 00091 QLabel* myRotYLbl; 00092 SalomeApp_DoubleSpinBox* myPosSpn; 00093 QLineEdit* myBasePlanePos; 00094 QCheckBox* myCBSetDef; 00095 QCheckBox* myCreateTable; 00096 QCheckBox* myCurvesCheck; 00097 00098 QButtonGroup* mySelPlane2; 00099 SalomeApp_DoubleSpinBox* myNbSpn; 00100 SalomeApp_DoubleSpinBox* myRotXSpn2; 00101 SalomeApp_DoubleSpinBox* myRotYSpn2; 00102 QLabel* myRotXLbl2; 00103 QLabel* myRotYLbl2; 00104 SalomeApp_DoubleSpinBox* myPosSpn2; 00105 QTableWidget* myPosTable; 00106 bool hasInit; 00107 00108 QDoubleValidator *mydvalidator; 00109 SALOME::GenericObjPtr<VISU::CutLines_i> myCutLines; 00110 00111 QTabWidget* myTabBox; 00112 VisuGUI_InputPane* myInputPane; 00113 00114 VISU::CutPlanes::Orientation getOrientaion (bool IsBasePlane = true); 00115 void setOrientation (const VISU::CutPlanes::Orientation orient); 00116 void setOrientation2 (const VISU::CutPlanes::Orientation orient); 00117 00118 SALOME_Actor* myPreviewActor; 00119 SALOME_Actor* myPreviewActorGlyphs; 00120 QCheckBox* myPreviewCheck; 00121 QCheckBox* myAllCurvesInvertedCheck; 00122 QCheckBox* myUseAbsoluteLengthCheck; 00123 00124 SALOME::GenericObjPtr<VISU::CutLines_i> myPrsCopy; 00125 }; 00126 00127 #endif // VISUGUI_CUTLINESDLG_H