Back to index

salome-smesh  6.5.0
SMESHGUI_AddMeshElementDlg.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_AddMeshElementDlg.h
00025 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
00026 //
00027 #ifndef SMESHGUI_ADDMESHELEMENTDLG_H
00028 #define SMESHGUI_ADDMESHELEMENTDLG_H
00029 
00030 // SMESH includes
00031 #include "SMESH_SMESHGUI.hxx"
00032 
00033 #include <SMDSAbs_ElementType.hxx>
00034 
00035 // Qt includes
00036 #include <QDialog>
00037 
00038 // IDL includes
00039 #include <SALOMEconfig.h>
00040 #include CORBA_SERVER_HEADER(SMESH_Mesh)
00041 
00042 class QComboBox;
00043 class QGroupBox;
00044 class QLabel;
00045 class QLineEdit;
00046 class QPushButton;
00047 class QRadioButton;
00048 class QCheckBox;
00049 class SMESHGUI;
00050 class SMESH_Actor;
00051 class SVTK_Selector;
00052 class LightApp_SelectionMgr;
00053 
00054 namespace SMESH
00055 {
00056   struct TElementSimulation;
00057 }
00058 
00059 //=================================================================================
00060 // class    : SMESHGUI_AddMeshElementDlg
00061 // purpose  :
00062 //=================================================================================
00063 class SMESHGUI_EXPORT SMESHGUI_AddMeshElementDlg : public QDialog
00064 { 
00065   Q_OBJECT
00066 
00067 public:
00068   SMESHGUI_AddMeshElementDlg( SMESHGUI*, SMDSAbs_EntityType = SMDSEntity_Edge );
00069   ~SMESHGUI_AddMeshElementDlg();
00070   
00071 private:
00072   void                        Init();
00073   void                        closeEvent( QCloseEvent* );
00074   void                        hideEvent( QHideEvent* );     /* ESC key */
00075   void                        enterEvent( QEvent* );        /* mouse enter the QWidget */
00076   void                        keyPressEvent( QKeyEvent* );
00077   void                        displaySimulation();
00078   
00079   bool                        isValid();
00080   
00081   typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
00082   
00083   SMESHGUI*                   mySMESHGUI;              /* Current SMESHGUI object */
00084   LightApp_SelectionMgr*      mySelectionMgr;          /* User shape selection */
00085   int                         myNbOkNodes;             /* to check when arguments is defined */
00086   bool                        myBusy;
00087   SVTK_Selector*              mySelector;
00088   
00089   QLineEdit*                  myEditCurrentArgument;   /* Current  LineEdit */
00090   
00091   SMDSAbs_EntityType          myGeomType;
00092   int                         myElementType;
00093   int                         myNbNodes;
00094   bool                        myIsPoly;
00095   
00096   SMESH::SMESH_Mesh_var       myMesh;
00097   SMESH_Actor*                myActor;
00098   SMESH::TElementSimulation*  mySimulation;
00099   QString                     myEntry;
00100   GrpList                     myGroups;
00101   
00102   QGroupBox*                  GroupConstructors;
00103   QRadioButton*               Constructor1;
00104   QGroupBox*                  GroupGroups;
00105   QLabel*                     TextLabel_GroupName;
00106   QComboBox*                  ComboBox_GroupName;
00107   QGroupBox*                  GroupButtons;
00108   QPushButton*                buttonOk;
00109   QPushButton*                buttonCancel;
00110   QPushButton*                buttonApply;
00111   QPushButton*                buttonHelp;
00112   QGroupBox*                  GroupC1;
00113   QLabel*                     TextLabelC1A1;
00114   QPushButton*                SelectButtonC1A1;
00115   QLineEdit*                  LineEditC1A1;
00116   QCheckBox*                  Reverse;
00117   
00118   QString                     myHelpFileName;
00119   
00120 private slots:
00121   void                        ClickOnOk();
00122   void                        ClickOnCancel();
00123   void                        ClickOnApply();
00124   void                        ClickOnHelp();
00125   void                        SetEditCurrentArgument();
00126   void                        SelectionIntoArgument();
00127   void                        DeactivateActiveDialog();
00128   void                        ActivateThisDialog();
00129   void                        CheckBox( int );
00130   void                        onTextChange( const QString& );
00131 };
00132 
00133 #endif // SMESHGUI_ADDMESHELEMENTDLG_H