Back to index

salome-gui  6.5.0
OCCViewer_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 #ifndef OCCVIEWER_SETROTATIONPOINTDLG_H
00024 #define OCCVIEWER_SETROTATIONPOINTDLG_H
00025 
00026 #include "OCCViewer.h"
00027 
00028 #include <QDialog>
00029 
00030 class QtxAction;
00031 
00032 class QLineEdit;
00033 class QPushButton;
00034 class QGroupBox;
00035 class QCheckBox;
00036 
00037 class OCCViewer_ViewWindow;
00038 
00039 class OCCVIEWER_EXPORT OCCViewer_SetRotationPointDlg : public QDialog
00040 {
00041   Q_OBJECT
00042 
00043 public:
00044   OCCViewer_SetRotationPointDlg(OCCViewer_ViewWindow* , 
00045                                 const char* name = 0, bool modal = FALSE, Qt::WindowFlags fl = 0);
00046   ~OCCViewer_SetRotationPointDlg();
00047 
00048   void SetAction( QtxAction* theAction ) { myAction = theAction; }
00049   bool IsFirstShown();
00050 
00051   void setCoords(double theX=0., double theY=0., double theZ=0.);
00052   void toggleChange();
00053 
00054 protected:
00055   OCCViewer_ViewWindow* myView;
00056   QtxAction* myAction;
00057 
00058   QCheckBox*    myIsBBCenter;
00059 
00060   QGroupBox   * myGroupBoxSel;
00061   QPushButton*  myToOrigin;
00062   QPushButton*  mySelectPoint;
00063 
00064   QGroupBox* myGroupBoxCoord;
00065   QLineEdit* myX;
00066   QLineEdit* myY;
00067   QLineEdit* myZ;
00068 
00069   void setEnabled(QGroupBox* theGrp, const bool theState);
00070 
00071 protected slots:
00072   void onBBCenterChecked();
00073   
00074   void onToOrigin();
00075   void onSelectPoint();
00076 
00077   void onCoordChanged();
00078 
00079   void onClickClose();
00080 
00081   void onViewShow();
00082   void onViewHide();
00083 
00084 protected:
00085   void closeEvent( QCloseEvent* );
00086 };
00087 
00088 #endif // OCCVIEWER_SETROTATIONPOINTDLG_H