Back to index

salome-gui  6.5.0
SVTK_SetRotationPointDlg.h
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  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 
00027 #ifndef SVTK_SETROTATIONPOINTDLG_H
00028 #define SVTK_SETROTATIONPOINTDLG_H
00029 
00030 #include "SVTK.h"
00031 
00032 #include <ViewerTools_DialogBase.h>
00033 
00034 #include <vtkSmartPointer.h>
00035 
00036 class SVTK_ViewWindow;
00037 class SVTK_RenderWindowInteractor;
00038 
00039 class QtxAction;
00040 
00041 class QLineEdit;
00042 class QPushButton;
00043 class QGroupBox;
00044 class QCheckBox;
00045 
00046 class vtkCallbackCommand;
00047 class vtkObject;
00048 
00049 class SVTK_EXPORT SVTK_SetRotationPointDlg : public ViewerTools_DialogBase
00050 {
00051   Q_OBJECT;
00052 
00053 public:
00054   SVTK_SetRotationPointDlg(QtxAction* theAction,
00055                            SVTK_ViewWindow* theParent,
00056                            const char* theName);
00057 
00058   ~SVTK_SetRotationPointDlg();
00059   
00060   void addObserver();
00061   bool IsFirstShown();
00062   
00063 protected:
00064   SVTK_ViewWindow *myMainWindow;
00065   SVTK_RenderWindowInteractor* myRWInteractor;
00066   bool myIsObserverAdded;
00067   
00068   QCheckBox*    myIsBBCenter;
00069 
00070   QGroupBox   * myGroupBoxSel;
00071   QPushButton*  myToOrigin;
00072   QPushButton*  mySelectPoint;
00073 
00074   QGroupBox* myGroupBoxCoord;
00075   QLineEdit* myX;
00076   QLineEdit* myY;
00077   QLineEdit* myZ;
00078 
00079   void setEnabled(QGroupBox* theGrp, const bool theState);
00080 
00081   //----------------------------------------------------------------------------
00082   // Priority at which events are processed
00083   vtkFloatingPointType myPriority;
00084 
00085   // Used to process events
00086   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
00087 
00088   // Description:
00089   // Main process event method
00090   static void ProcessEvents(vtkObject* object, 
00091                             unsigned long event,
00092                             void* clientdata, 
00093                             void* calldata);
00094 
00095 protected slots:
00096   void onBBCenterChecked();
00097   
00098   void onToOrigin();
00099   void onSelectPoint();
00100 
00101   void onCoordChanged();
00102 
00103   void onClickClose();
00104 
00105 };
00106 
00107 #endif // SVTK_SETROTATIONPOINTDLG_H