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 // SALOME VTKViewer : build VTK viewer into Salome desktop 00024 // File : 00025 // Author : 00026 // Module : SALOME 00027 // $Header: /home/server/cvs/GUI/GUI_SRC/src/SVTK/SVTK_SetRotationPointDlg.h,v 1.3.2.1.8.2.6.1 2011-06-01 13:53:41 vsr Exp $ 00028 // 00029 #ifndef SVTK_SETROTATIONPOINTDLG_H 00030 #define SVTK_SETROTATIONPOINTDLG_H 00031 00032 #include "SVTK.h" 00033 00034 #include <ViewerTools_DialogBase.h> 00035 00036 #include <vtkSmartPointer.h> 00037 00038 class SVTK_ViewWindow; 00039 class SVTK_RenderWindowInteractor; 00040 00041 class QtxAction; 00042 00043 class QLineEdit; 00044 class QPushButton; 00045 class QGroupBox; 00046 class QCheckBox; 00047 00048 class vtkCallbackCommand; 00049 class vtkObject; 00050 00051 class SVTK_EXPORT SVTK_SetRotationPointDlg : public ViewerTools_DialogBase 00052 { 00053 Q_OBJECT; 00054 00055 public: 00056 SVTK_SetRotationPointDlg(QtxAction* theAction, 00057 SVTK_ViewWindow* theParent, 00058 const char* theName); 00059 00060 ~SVTK_SetRotationPointDlg(); 00061 00062 void addObserver(); 00063 bool IsFirstShown(); 00064 00065 protected: 00066 SVTK_ViewWindow *myMainWindow; 00067 SVTK_RenderWindowInteractor* myRWInteractor; 00068 bool myIsObserverAdded; 00069 00070 QCheckBox* myIsBBCenter; 00071 00072 QGroupBox * myGroupBoxSel; 00073 QPushButton* myToOrigin; 00074 QPushButton* mySelectPoint; 00075 00076 QGroupBox* myGroupBoxCoord; 00077 QLineEdit* myX; 00078 QLineEdit* myY; 00079 QLineEdit* myZ; 00080 00081 void setEnabled(QGroupBox* theGrp, const bool theState); 00082 00083 //---------------------------------------------------------------------------- 00084 // Priority at which events are processed 00085 vtkFloatingPointType myPriority; 00086 00087 // Used to process events 00088 vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand; 00089 00090 // Description: 00091 // Main process event method 00092 static void ProcessEvents(vtkObject* object, 00093 unsigned long event, 00094 void* clientdata, 00095 void* calldata); 00096 00097 protected slots: 00098 void onBBCenterChecked(); 00099 00100 void onToOrigin(); 00101 void onSelectPoint(); 00102 00103 void onCoordChanged(); 00104 00105 void onClickClose(); 00106 00107 }; 00108 00109 #endif // SVTK_SETROTATIONPOINTDLG_H