Back to index

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