Back to index

salome-smesh  6.5.0
SMESHGUI_RotationDlg.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 // SMESH SMESHGUI : GUI for SMESH component
00024 // File   : SMESHGUI_RotationDlg.h
00025 // Author : Michael ZORIN, Open CASCADE S.A.S.
00026 //
00027 #ifndef SMESHGUI_ROTATIONDLG_H
00028 #define SMESHGUI_ROTATIONDLG_H
00029 
00030 // SMESH includes
00031 #include "SMESH_SMESHGUI.hxx"
00032 #include "SMESHGUI_PreviewDlg.h"
00033 
00034 
00035 // IDL includes
00036 #include <SALOMEconfig.h>
00037 #include CORBA_SERVER_HEADER(SMESH_Mesh)
00038 
00039 class QButtonGroup;
00040 class QGroupBox;
00041 class QLabel;
00042 class QLineEdit;
00043 class QPushButton;
00044 class QRadioButton;
00045 class QCheckBox;
00046 class SMESHGUI;
00047 class SMESH_Actor;
00048 class SMESHGUI_IdValidator;
00049 class SMESHGUI_SpinBox;
00050 class SMESHGUI_FilterDlg;
00051 class SVTK_Selector;
00052 class LightApp_SelectionMgr;
00053 class SMESH_LogicalFilter;
00054 
00055 //=================================================================================
00056 // class    : SMESHGUI_RotationDlg
00057 // purpose  :
00058 //=================================================================================
00059 class SMESHGUI_EXPORT SMESHGUI_RotationDlg : public SMESHGUI_PreviewDlg
00060 { 
00061   Q_OBJECT
00062 
00063 public:
00064   SMESHGUI_RotationDlg( SMESHGUI* );
00065   ~SMESHGUI_RotationDlg();
00066 
00067 private:
00068   void                   Init( bool = true );
00069   void                   closeEvent( QCloseEvent* );
00070   void                   enterEvent( QEvent* );         /* mouse enter the QWidget */
00071   void                   hideEvent( QHideEvent* );      /* ESC key */
00072   void                   keyPressEvent( QKeyEvent* );
00073   bool                   IsAxisOk();
00074   void                   setNewMeshName();
00075   
00076   bool                   isValid();
00077 
00078   SMESHGUI_IdValidator*  myIdValidator;
00079   LightApp_SelectionMgr* mySelectionMgr;          /* User shape selection */
00080   int                    myNbOkElements;          /* to check when elements are defined */
00081   QString                myElementsId;
00082   SVTK_Selector*         mySelector;
00083   
00084   QWidget*               myEditCurrentArgument;   /* Current  LineEdit */
00085   int                    myConstructorId;
00086   bool                   myBusy;
00087   SMESH::SMESH_Mesh_var  myMesh;
00088   SMESH_Actor*           myActor;
00089   SMESH_LogicalFilter*   myMeshOrSubMeshOrGroupFilter;
00090   SMESH::SMESH_IDSource_var mySelectedObject;
00091   
00092   QGroupBox*             GroupConstructors;
00093   QRadioButton*          RadioButton1;
00094   QGroupBox*             GroupButtons;
00095   QPushButton*           buttonOk;
00096   QPushButton*           buttonCancel;
00097   QPushButton*           buttonApply;
00098   QPushButton*           buttonHelp;
00099   QGroupBox*             GroupArguments;
00100   QGroupBox*             GroupAxis;
00101   QLabel*                TextLabelElements;
00102   QPushButton*           SelectElementsButton;
00103   QLineEdit*             LineEditElements;
00104   QCheckBox*             CheckBoxMesh;
00105   
00106   QLabel*                TextLabelPoint;
00107   QPushButton*           SelectPointButton;
00108   QLabel*                TextLabelX;
00109   SMESHGUI_SpinBox*      SpinBox_X;
00110   QLabel*                TextLabelY;
00111   SMESHGUI_SpinBox*      SpinBox_Y;
00112   QLabel*                TextLabelZ;
00113   SMESHGUI_SpinBox*      SpinBox_Z;
00114   QLabel*                TextLabelVector;
00115   QPushButton*           SelectVectorButton;
00116   QLabel*                TextLabelDX;
00117   SMESHGUI_SpinBox*      SpinBox_DX;
00118   QLabel*                TextLabelDY;
00119   SMESHGUI_SpinBox*      SpinBox_DY;
00120   QLabel*                TextLabelDZ;
00121   SMESHGUI_SpinBox*      SpinBox_DZ;
00122 
00123   QLabel*                TextLabelAngle;
00124   SMESHGUI_SpinBox*      SpinBox_Angle;
00125   //QCheckBox* CheckBoxCopy;
00126   QGroupBox*             ActionBox;
00127   QButtonGroup*          ActionGroup;
00128   QCheckBox*             MakeGroupsCheck;
00129   QLineEdit*             LineEditNewMesh;
00130 
00131   QString                myHelpFileName;
00132 
00133   QPushButton*           myFilterBtn;
00134   SMESHGUI_FilterDlg*    myFilterDlg;
00135 
00136 protected slots:
00137   virtual void              onDisplaySimulation( bool );
00138  
00139 private slots:
00140   void                   ClickOnOk();
00141   void                   ClickOnCancel();
00142   bool                   ClickOnApply();
00143   void                   ClickOnHelp();
00144   void                   SetEditCurrentArgument();
00145   void                   SelectionIntoArgument();
00146   void                   DeactivateActiveDialog();
00147   void                   ActivateThisDialog();
00148   void                   onTextChange( const QString& );
00149   void                   onSelectMesh( bool );
00150   void                   onVectorChanged();
00151   void                   onActionClicked( int );
00152   void                   setFilters();
00153 };
00154 
00155 #endif // SMESHGUI_ROTATIONDLG_H