Salome HOME
03651d66c9ee174ad4366ead8ddc47a5b4569f7d
[modules/gui.git] / src / OCCViewer / OCCViewer_SetRotationPointDlg.h
1 //  Copyright (C) 2007-2008  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.
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 #ifndef OCCVIEWER_SETROTATIONPOINTDLG_H
23 #define OCCVIEWER_SETROTATIONPOINTDLG_H
24
25 #include "OCCViewer.h"
26
27 #include <QDialog>
28
29 class QtxAction;
30
31 class QLineEdit;
32 class QPushButton;
33 class QGroupBox;
34 class QCheckBox;
35
36 class OCCViewer_ViewWindow;
37
38 class OCCVIEWER_EXPORT OCCViewer_SetRotationPointDlg : public QDialog
39 {
40   Q_OBJECT
41
42 public:
43   OCCViewer_SetRotationPointDlg(OCCViewer_ViewWindow* , QWidget* parent = 0, 
44                                 const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
45   ~OCCViewer_SetRotationPointDlg();
46
47   void SetAction( QtxAction* theAction ) { myAction = theAction; }
48   bool IsFirstShown();
49
50   void setCoords(double theX=0., double theY=0., double theZ=0.);
51   void toggleChange();
52
53 protected:
54   OCCViewer_ViewWindow* myView;
55   QtxAction* myAction;
56
57   QCheckBox*    myIsBBCenter;
58
59   QGroupBox   * myGroupBoxSel;
60   QPushButton*  myToOrigin;
61   QPushButton*  mySelectPoint;
62
63   QGroupBox* myGroupBoxCoord;
64   QLineEdit* myX;
65   QLineEdit* myY;
66   QLineEdit* myZ;
67
68   void setEnabled(QGroupBox* theGrp, const bool theState);
69
70 protected slots:
71   void onBBCenterChecked();
72   
73   void onToOrigin();
74   void onSelectPoint();
75
76   void onCoordChanged();
77
78   void onClickClose();
79
80   void onViewShow();
81   void onViewHide();
82
83 protected:
84   void closeEvent( QCloseEvent* );
85 };
86
87 #endif // OCCVIEWER_SETROTATIONPOINTDLG_H