Salome HOME
Update copyrights 2014.
[modules/gui.git] / src / SVTK / SVTK_SetRotationPointDlg.h
1 // Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  SALOME VTKViewer : build VTK viewer into Salome desktop
24 //  File   : 
25 //  Author : 
26
27 #ifndef SVTK_SETROTATIONPOINTDLG_H
28 #define SVTK_SETROTATIONPOINTDLG_H
29
30 #include "SVTK.h"
31
32 #include <ViewerTools_DialogBase.h>
33
34 #include <vtkSmartPointer.h>
35
36 class SVTK_ViewWindow;
37 class SVTK_RenderWindowInteractor;
38
39 class QtxAction;
40
41 class QLineEdit;
42 class QPushButton;
43 class QGroupBox;
44 class QCheckBox;
45
46 class vtkCallbackCommand;
47 class vtkObject;
48
49 class SVTK_EXPORT SVTK_SetRotationPointDlg : public ViewerTools_DialogBase
50 {
51   Q_OBJECT;
52
53 public:
54   SVTK_SetRotationPointDlg(QtxAction* theAction,
55                            SVTK_ViewWindow* theParent,
56                            const char* theName);
57
58   ~SVTK_SetRotationPointDlg();
59   
60   void addObserver();
61   bool IsFirstShown();
62   
63 protected:
64   SVTK_ViewWindow *myMainWindow;
65   SVTK_RenderWindowInteractor* myRWInteractor;
66   bool myIsObserverAdded;
67   
68   QCheckBox*    myIsBBCenter;
69
70   QGroupBox   * myGroupBoxSel;
71   QPushButton*  myToOrigin;
72   QPushButton*  mySelectPoint;
73
74   QGroupBox* myGroupBoxCoord;
75   QLineEdit* myX;
76   QLineEdit* myY;
77   QLineEdit* myZ;
78
79   void setEnabled(QGroupBox* theGrp, const bool theState);
80
81   //----------------------------------------------------------------------------
82   // Priority at which events are processed
83   double myPriority;
84
85   // Used to process events
86   vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
87
88   // Description:
89   // Main process event method
90   static void ProcessEvents(vtkObject* object, 
91                             unsigned long event,
92                             void* clientdata, 
93                             void* calldata);
94
95 protected slots:
96   void onBBCenterChecked();
97   
98   void onToOrigin();
99   void onSelectPoint();
100
101   void onCoordChanged();
102
103   void onClickClose();
104
105 };
106
107 #endif // SVTK_SETROTATIONPOINTDLG_H