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 #ifndef DIALOGBOX_CLIPPINGPLANEDLG_H 00021 #define DIALOGBOX_CLIPPINGPLANEDLG_H 00022 00023 class VisuGUI; 00024 class QLineEdit; 00025 class QCheckBox; 00026 00027 class SalomeApp_DoubleSpinBox; 00028 class vtkImplicitPlaneWidget; 00029 class vtkCallbackCommand; 00030 class vtkObject; 00031 class SVTK_ViewWindow; 00032 00033 #include <QDialog> 00034 #include <vtkSmartPointer.h> 00035 #include "VisuGUI_ClippingPanel.h" 00036 #include <SALOMEDSClient_SObject.hxx> 00037 00038 00039 class VisuGUI_ClippingPlaneDlg: public QDialog 00040 { 00041 Q_OBJECT 00042 public: 00043 VisuGUI_ClippingPlaneDlg(VisuGUI* theModule); 00044 ~VisuGUI_ClippingPlaneDlg(); 00045 00046 void setOrigin(double theVal[3]); 00047 void setDirection(double theVal[3]); 00048 00049 void setPlaneId(int theId); 00050 int planeId() const { return myPlaneId; } 00051 //void setPlaneObj(_PTR(SObject) thePlaneObj); 00052 //_PTR(SObject) getPlaneObj() const { return myPlaneObj; } 00053 00054 protected slots: 00055 virtual void accept(); 00056 00057 private slots: 00058 void onHelp(); 00059 void onValueChanged(); 00060 00061 private: 00062 //void setEmptyPlane(PlaneDef& thePlane) const; 00063 vtkImplicitPlaneWidget* createPreviewWidget(); 00064 00065 00066 static void ProcessEvents(vtkObject* theObject, unsigned long theEvent, 00067 void* theClientData, void* theCallData); 00068 00069 VisuGUI* myModule; 00070 SVTK_ViewWindow* myViewWindow; 00071 00072 QLineEdit* myNameEdt; 00073 00074 SalomeApp_DoubleSpinBox* myXOrigin; 00075 SalomeApp_DoubleSpinBox* myYOrigin; 00076 SalomeApp_DoubleSpinBox* myZOrigin; 00077 00078 SalomeApp_DoubleSpinBox* myXDir; 00079 SalomeApp_DoubleSpinBox* myYDir; 00080 SalomeApp_DoubleSpinBox* myZDir; 00081 00082 QCheckBox* myAutoApply; 00083 00084 vtkImplicitPlaneWidget* myPreviewWidget; 00085 vtkSmartPointer<vtkCallbackCommand> myCallback; 00086 00087 double myBounds[6]; 00088 //_PTR(SObject) myPlaneObj; 00089 int myPlaneId; 00090 }; 00091 00092 #endif