Version: 6.3.1

src/SMESHGUI/SMESHGUI_AddQuadraticElementDlg.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_AddMeshElementDlg.h
00025 // Author : Nicolas REJNERI, Open CASCADE S.A.S.
00026 //
00027 #ifndef SMESHGUI_ADDQUADRATICELEMENTDLG_H
00028 #define SMESHGUI_ADDQUADRATICELEMENTDLG_H
00029 
00030 // SMESH includes
00031 #include "SMESH_SMESHGUI.hxx"
00032 
00033 // Qt includes
00034 #include <QDialog>
00035 
00036 // IDL includes
00037 #include <SALOMEconfig.h>
00038 #include CORBA_SERVER_HEADER(SMESH_Mesh)
00039 
00040 class QComboBox;
00041 class QGroupBox;
00042 class QLabel;
00043 class QLineEdit;
00044 class QPushButton;
00045 class QRadioButton;
00046 class QCheckBox;
00047 class QTableWidget;
00048 class SMESHGUI;
00049 class SMESH_Actor;
00050 class SVTK_Selector;
00051 class LightApp_SelectionMgr;
00052 
00053 namespace SMESH
00054 {
00055   struct TElementSimulation;
00056 }
00057 
00058 enum { QUAD_EDGE, QUAD_TRIANGLE, QUAD_QUADRANGLE, QUAD_TETRAHEDRON, 
00059        QUAD_PYRAMID, QUAD_PENTAHEDRON, QUAD_HEXAHEDRON };
00060 
00061 //=================================================================================
00062 // class    : SMESHGUI_AddQuadraticElementDlg
00063 // purpose  :
00064 //=================================================================================
00065 class SMESHGUI_EXPORT SMESHGUI_AddQuadraticElementDlg : public QDialog
00066 { 
00067   Q_OBJECT
00068 
00069 public:
00070   SMESHGUI_AddQuadraticElementDlg( SMESHGUI*, const int );
00071   ~SMESHGUI_AddQuadraticElementDlg();
00072   
00073 private:
00074   typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
00075 
00076   void                        Init();
00077   void                        closeEvent( QCloseEvent* );
00078   void                        hideEvent( QHideEvent* );    /* ESC key */
00079   void                        enterEvent( QEvent* );       /* mouse enter the QWidget */
00080   void                        keyPressEvent( QKeyEvent* );
00081   void                        displaySimulation();
00082   void                        UpdateTable( bool = true );
00083   bool                        IsValid();
00084   void                        updateButtons();
00085 
00086   bool                        isValid();
00087   
00088   SMESHGUI*                   mySMESHGUI;       /* Current SMESHGUI object */
00089   LightApp_SelectionMgr*      mySelectionMgr;   /* User shape selection */
00090   int                         myNbCorners;      /* The required number of corners */
00091   bool                        myBusy;
00092   SVTK_Selector*              mySelector;
00093   
00094   SMESH::SMESH_Mesh_var       myMesh;
00095   SMESH_Actor*                myActor;
00096   SMESH::TElementSimulation*  mySimulation;
00097   QString                     myEntry;
00098   GrpList                     myGroups;
00099   
00100   int                         myType;
00101   bool                        myIsEditCorners;
00102   
00103   QGroupBox*                  GroupConstructors;
00104   QRadioButton*               myRadioButton1;
00105   
00106   QGroupBox*                  GroupArguments;
00107   QLineEdit*                  myCornerNodes;
00108   QPushButton*                mySelectButton;
00109   QTableWidget*               myTable;
00110   QCheckBox*                  myReverseCB;
00111   
00112   QGroupBox*                  GroupGroups;
00113   QLabel*                     TextLabel_GroupName;
00114   QComboBox*                  ComboBox_GroupName;
00115 
00116   QGroupBox*                  GroupButtons;
00117   QPushButton*                buttonOk;
00118   QPushButton*                buttonCancel;
00119   QPushButton*                buttonApply;
00120   QPushButton*                buttonHelp;
00121   
00122   QString                     myHelpFileName;
00123   
00124 private slots:
00125   void                        onTextChange( const QString& );
00126   void                        onCellTextChange( int, int );
00127   void                        onReverse( int );
00128   void                        onCellDoubleClicked( int, int );
00129   
00130   void                        ClickOnOk();
00131   void                        ClickOnCancel();
00132   void                        ClickOnApply();
00133   void                        ClickOnHelp();
00134   void                        SetEditCorners();
00135   void                        SelectionIntoArgument();
00136   void                        DeactivateActiveDialog();
00137   void                        ActivateThisDialog();
00138 };
00139 
00140 #endif // SMESHGUI_ADDQUADRATICELEMENTDLG_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