src/SMESHGUI/SMESHGUI_ExtrusionDlg.h

Go to the documentation of this file.
00001 //  SMESH SMESHGUI : GUI for SMESH component
00002 //
00003 //  Copyright (C) 2003  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 //
00024 //  File   : SMESHGUI_ExtrusionDlg.h
00025 //  Author : Michael ZORIN
00026 //  Module : SMESH
00027 //  $Header: 
00028 
00029 #ifndef DIALOGBOX_EXTRUSION_H
00030 #define DIALOGBOX_EXTRUSION_H
00031 
00032 #include "LightApp_SelectionMgr.h"
00033 #include "SUIT_SelectionFilter.h"
00034 
00035 // QT Includes
00036 #include <qdialog.h>
00037 
00038 class QGridLayout; 
00039 class QButtonGroup;
00040 class QRadioButton;
00041 class QGroupBox;
00042 class QLabel;
00043 class QLineEdit;
00044 class QCheckBox;
00045 class QSpinBox;
00046 class QPushButton;
00047 
00048 class SMESHGUI;
00049 class SMESH_Actor;
00050 class SMESHGUI_SpinBox;
00051 class SVTK_ViewWindow;
00052 class SVTK_Selector;
00053 
00054 // IDL Headers
00055 #include <SALOMEconfig.h>
00056 #include CORBA_SERVER_HEADER(SMESH_Mesh)
00057 
00058 //=================================================================================
00059 // class    : SMESHGUI_ExtrusionDlg
00060 // purpose  :
00061 //=================================================================================
00062 class SMESHGUI_ExtrusionDlg : public QDialog
00063 {
00064   Q_OBJECT
00065 
00066 public:
00067   SMESHGUI_ExtrusionDlg (SMESHGUI*,
00068                 bool modal = FALSE);
00069   ~SMESHGUI_ExtrusionDlg();
00070 
00071 private:
00072   void Init (bool ResetControls = true);
00073   void enterEvent (QEvent*);                           /* mouse enter the QWidget */
00074   void keyPressEvent(QKeyEvent*);
00075   int  GetConstructorId();
00076   //void closeEvent (QCloseEvent*);
00077   //void hideEvent (QHideEvent*);                        /* ESC key */
00078 
00079   SMESHGUI*                     mySMESHGUI;            /* Current SMESHGUI object */
00080   LightApp_SelectionMgr*        mySelectionMgr;        /* User shape selection */
00081   QLineEdit*                    myEditCurrentArgument; /* Current  LineEdit */
00082   QString                       myElementsId;
00083   int                           myNbOkElements;        /* to check when elements are defined */
00084   SVTK_Selector*                mySelector;
00085 
00086   bool                          myBusy;
00087   SMESH::SMESH_Mesh_var         myMesh;
00088   SMESH_Actor*                  myActor;
00089   SUIT_SelectionFilter*         myMeshOrSubMeshOrGroupFilter;
00090 
00091   // widgets
00092   QButtonGroup*     GroupConstructors;
00093   QRadioButton*     RadioButton1;
00094   QRadioButton*     RadioButton2;
00095 
00096   QGroupBox*        GroupArguments;
00097   QLabel*           TextLabelElements;
00098   QPushButton*      SelectElementsButton;
00099   QLineEdit*        LineEditElements;
00100   QCheckBox*        CheckBoxMesh;
00101   QLabel*           TextLabelVector;
00102   QLabel*           TextLabelDx;
00103   SMESHGUI_SpinBox* SpinBox_Dx;
00104   QLabel*           TextLabelDy;
00105   SMESHGUI_SpinBox* SpinBox_Dy;
00106   QLabel*           TextLabelDz;
00107   SMESHGUI_SpinBox* SpinBox_Dz;
00108   QLabel*           TextLabelNbSteps;
00109   QSpinBox*         SpinBox_NbSteps;
00110 
00111   QGroupBox*        GroupButtons;
00112   QPushButton*      buttonOk;
00113   QPushButton*      buttonCancel;
00114   QPushButton*      buttonApply;
00115   QPushButton*      buttonHelp;
00116 
00117   QString           myHelpFileName;
00118 
00119 private slots:
00120   void ConstructorsClicked (int);
00121   void CheckIsEnable();
00122   void ClickOnOk();
00123   bool ClickOnApply();
00124   void ClickOnCancel();
00125   void ClickOnHelp();
00126   void SetEditCurrentArgument();
00127   void SelectionIntoArgument();
00128   void DeactivateActiveDialog();
00129   void ActivateThisDialog();
00130   void onTextChange (const QString&);
00131   void onSelectMesh (bool toSelectMesh);
00132 };
00133 
00134 #endif // DIALOGBOX_EXTRUSION_H