00001 // Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE 00002 // 00003 // This library is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU Lesser General Public 00005 // License as published by the Free Software Foundation; either 00006 // version 2.1 of the License. 00007 // 00008 // This library is distributed in the hope that it will be useful, 00009 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // Lesser General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU Lesser General Public 00014 // License along with this library; if not, write to the Free Software 00015 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 // 00017 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com 00018 // 00019 00020 // File : VisuGUI_CutSegmentDlg.h 00021 // Author : Oleg UVAROV 00022 // Module : VISU 00023 // 00024 #ifndef VISUGUI_CUTSEGMENTDLG_H 00025 #define VISUGUI_CUTSEGMENTDLG_H 00026 00027 #include "VisuGUI_CutPlanesDlg.h" 00028 00029 #include <QCheckBox> 00030 #include <QList> 00031 00032 class QTabWidget; 00033 00034 class SalomeApp_Module; 00035 class VisuGUI_InputPane; 00036 class SalomeApp_DoubleSpinBox; 00037 00038 namespace VISU 00039 { 00040 class CutSegment_i; 00041 } 00042 00043 class VisuGUI_CutSegmentDlg: public VisuGUI_ScalarBarBaseDlg 00044 { 00045 Q_OBJECT 00046 00047 public: 00048 VisuGUI_CutSegmentDlg (SalomeApp_Module* theModule); 00049 ~VisuGUI_CutSegmentDlg(); 00050 00051 virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs, 00052 bool theInit ); 00053 00054 virtual int storeToPrsObject(VISU::ColoredPrs3d_i* thePrs); 00055 00056 bool isGenerateTable() { return myCreateTable->isChecked(); } 00057 bool isGenerateCurves() { return myCreateTable->isChecked() && myCurvesCheck->isChecked(); } 00058 00059 protected: 00060 virtual QString GetContextHelpFilePath(); 00061 00062 protected slots: 00063 void accept(); 00064 void reject(); 00065 00066 private slots: 00067 void onPreviewCheck(bool thePreview); 00068 void onAllCurvesInvertedCheck(bool theInvert); 00069 void onPointModified(); 00070 00071 private: 00072 void createPlanes(); 00073 void deletePlanes(); 00074 void updateGlyphs(bool update); 00075 void updatePoints(bool update); 00076 00077 QCheckBox* myCreateTable; 00078 QCheckBox* myCurvesCheck; 00079 00080 bool hasInit; 00081 00082 QList<SalomeApp_DoubleSpinBox*> myPoint1; 00083 QList<SalomeApp_DoubleSpinBox*> myPoint2; 00084 00085 SALOME::GenericObjPtr<VISU::CutSegment_i> myCutSegment; 00086 00087 QTabWidget* myTabBox; 00088 VisuGUI_InputPane* myInputPane; 00089 00090 SALOME_Actor* myPreviewActor; 00091 SALOME_Actor* myPreviewActorGlyphs; 00092 SALOME_Actor* myPreviewActorPoints; 00093 QCheckBox* myPreviewCheck; 00094 QCheckBox* myAllCurvesInvertedCheck; 00095 QCheckBox* myUseAbsoluteLengthCheck; 00096 00097 SALOME::GenericObjPtr<VISU::CutSegment_i> myPrsCopy; 00098 }; 00099 00100 #endif // VISUGUI_CUTSEGMENTDLG_H