Version: 6.3.1

src/SMESHGUI/SMESHGUI_ExtrusionDlg.h

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  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_ExtrusionDlg.h
00025 // Author : Michael ZORIN, Open CASCADE S.A.S.
00026 //
00027 #ifndef SMESHGUI_EXTRUSIONDLG_H
00028 #define SMESHGUI_EXTRUSIONDLG_H
00029 
00030 // SMESH includes
00031 #include "SMESH_SMESHGUI.hxx"
00032 #include "SMESHGUI_PreviewDlg.h"
00033 
00034 // SALOME GUI includes
00035 #include <SALOME_InteractiveObject.hxx>
00036 
00037 // IDL includes
00038 #include <SALOMEconfig.h>
00039 #include CORBA_SERVER_HEADER(SMESH_Mesh)
00040 
00041 class QButtonGroup;
00042 class QRadioButton;
00043 class QGroupBox;
00044 class QLabel;
00045 class QLineEdit;
00046 class QCheckBox;
00047 class QPushButton;
00048 
00049 class SMESHGUI;
00050 class SMESH_Actor;
00051 class SMESHGUI_IdValidator;
00052 class SMESHGUI_SpinBox;
00053 class SMESHGUI_FilterDlg;
00054 class SVTK_Selector;
00055 class LightApp_SelectionMgr;
00056 class SUIT_SelectionFilter;
00057 class SalomeApp_IntSpinBox;
00058 
00059 //=================================================================================
00060 // class    : SMESHGUI_ExtrusionDlg
00061 // purpose  :
00062 //=================================================================================
00063 class SMESHGUI_EXPORT SMESHGUI_ExtrusionDlg : public SMESHGUI_PreviewDlg
00064 {
00065   Q_OBJECT
00066 
00067 public:
00068   SMESHGUI_ExtrusionDlg( SMESHGUI* );
00069   ~SMESHGUI_ExtrusionDlg();
00070 
00071   void                             reject();
00072 
00073 private:
00074   void                             Init( bool = true );
00075   void                             enterEvent( QEvent* );       /* mouse enter the QWidget */
00076   void                             closeEvent( QCloseEvent* );
00077   void                             keyPressEvent( QKeyEvent* );
00078   int                              GetConstructorId();
00079   void                             getExtrusionVector(SMESH::DirStruct& aVector);
00080   
00081   bool                             isValid();
00082   bool                             isValuesValid();
00083   
00084   SMESHGUI_IdValidator*            myIdValidator;
00085   LightApp_SelectionMgr*           mySelectionMgr;        /* User shape selection */
00086   QWidget*                         myEditCurrentArgument; /* Current  argument editor */
00087   int                              myNbOkElements;        /* to check when elements are defined */
00088   SVTK_Selector*                   mySelector;
00089 
00090   SMESH::SMESH_IDSource_var        mySelectedObject;
00091 
00092   bool                             myBusy;
00093   SMESH::SMESH_Mesh_var            myMesh;
00094   SMESH::long_array_var            myElementsId;
00095   SMESH_Actor*                     myActor;
00096   Handle(SALOME_InteractiveObject) myIO;
00097   SUIT_SelectionFilter*            myMeshOrSubMeshOrGroupFilter;
00098 
00099   // widgets
00100   QGroupBox*                       ConstructorsBox;
00101   QButtonGroup*                    GroupConstructors;
00102   QRadioButton*                    RadioButton1;
00103   QRadioButton*                    RadioButton2;
00104   QRadioButton*                    RadioButton3;
00105   QRadioButton*                    RadioButton4;
00106 
00107   QGroupBox*                       GroupArguments;
00108   QGroupBox*                       GroupDimensions;
00109   QLabel*                          TextLabelElements;
00110   QPushButton*                     SelectElementsButton;
00111   QLineEdit*                       LineEditElements;
00112   QCheckBox*                       CheckBoxMesh;
00113   QLabel*                          TextLabelVector;
00114   QLabel*                          TextLabelDistance;
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   QLabel*                          TextLabelVx;
00123   SMESHGUI_SpinBox*                SpinBox_Vx;
00124   QLabel*                          TextLabelVy;
00125   SMESHGUI_SpinBox*                SpinBox_Vy;
00126   QLabel*                          TextLabelVz;
00127   SMESHGUI_SpinBox*                SpinBox_Vz;
00128   QLabel*                          TextLabelDist;
00129   SMESHGUI_SpinBox*                SpinBox_VDist;
00130   QLabel*                          TextLabelNbSteps;
00131   SalomeApp_IntSpinBox*            SpinBox_NbSteps;
00132   QCheckBox*                       MakeGroupsCheck;
00133 
00134   QGroupBox*                       GroupButtons;
00135   QPushButton*                     buttonOk;
00136   QPushButton*                     buttonCancel;
00137   QPushButton*                     buttonApply;
00138   QPushButton*                     buttonHelp;
00139 
00140   QString                          myHelpFileName;
00141   QString                          myIDs;
00142 
00143   QPushButton*                     myFilterBtn;
00144   SMESHGUI_FilterDlg*              myFilterDlg;
00145 
00146 protected slots:
00147   virtual void              onDisplaySimulation( bool );
00148    
00149 private slots:
00150   void                            ConstructorsClicked( int );
00151   void                            CheckIsEnable();
00152   void                            ClickOnOk();
00153   bool                            ClickOnApply();
00154   void                            ClickOnCancel();
00155   void                            ClickOnHelp();
00156   void                            ClickOnRadio();
00157   void                            SetEditCurrentArgument();
00158   void                            SelectionIntoArgument();
00159   void                            DeactivateActiveDialog();
00160   void                            ActivateThisDialog();
00161   void                            onTextChange( const QString& );
00162   void                            onSelectMesh( bool );
00163   void                            setFilters();
00164 };
00165 
00166 #endif // SMESHGUI_EXTRUSIONDLG_H
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS