Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SVTK_ViewParameterDlg.h
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 // SALOME VTKViewer : build VTK viewer into Salome desktop
21 // File :
22 // Author :
23 
24 #ifndef SVTK_VIEWPARAMETERDLG_H
25 #define SVTK_VIEWPARAMETERDLG_H
26 
27 #include "SVTK.h"
28 
29 #include <ViewerTools_DialogBase.h>
30 
31 #include <vtkSmartPointer.h>
32 #include <vtkTimeStamp.h>
33 
34 class SVTK_ViewWindow;
36 
37 class QtxAction;
38 
39 class QLineEdit;
40 class QPushButton;
41 class QFrame;
42 class QCheckBox;
43 class QButtonGroup;
44 
45 class vtkCallbackCommand;
46 class vtkObject;
47 
49 {
50  Q_OBJECT;
51 
52 public:
54  SVTK_ViewWindow* theParent,
55  const char* theName);
56 
58 
59  void addObserver();
60 
61 protected:
65  bool myBusy;
66 
67  QButtonGroup* myProjectionMode;
68 
69  QPushButton* myToBBCenter;
70  QPushButton* myToOrigin;
71  QPushButton* mySelectPoint;
72 
77 
78  QButtonGroup* myCameraPositionMode;
79 
84 
89 
91 
96 
99 
102 
103  void setEnabled(QFrame* theWidget, const bool theState);
104  bool computePoint(const double start[3], const double dir[3],
105  const double dist, double result[3]);
106  void updateProjection();
107  void updateCoordinates();
108 
109  void updateData();
110 
111  //----------------------------------------------------------------------------
112  // Priority at which events are processed
113  double myPriority;
114 
115  // Used to process events
116  vtkSmartPointer<vtkCallbackCommand> myEventCallbackCommand;
117 
118  // Used to update camera
119  vtkTimeStamp myCameraMTime;
120 
121  // Description:
122  // Main process event method
123  static void ProcessEvents(vtkObject* object,
124  unsigned long event,
125  void* clientdata,
126  void* calldata);
127 
128 protected slots:
129  void onProjectionModeChanged(int);
130  void onPositionModeChanged(int);
131 
132  void onToBBCenter();
133  void onToOrigin();
134  void onSelectPoint();
135 
136  void onFocalCoordChanged();
137  void onCameraCoordChanged();
138  void onDirectionChanged();
139  void onDistanceChanged();
140  void onViewDirectionChanged();
141 
142  void onZoomChanged();
143 
144  void onClickClose();
145 
146 };
147 
148 #endif // SVTK_VIEWPARAMETERDLG_H