Back to index

salome-smesh  6.5.0
SMESHGUI_CreatePolyhedralVolumeDlg.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_CreatePolyhedralVolumeDlg.h
00025 // Author : Michael ZORIN, Open CASCADE S.A.S.
00026 //
00027 #ifndef SMESHGUI_CREATEPOLYHEDRALVOLUMEDLG_H
00028 #define SMESHGUI_CREATEPOLYHEDRALVOLUMEDLG_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 QButtonGroup;
00041 class QComboBox;
00042 class QGroupBox;
00043 class QListWidget;
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 TPolySimulation;
00057 }
00058 
00059 //=================================================================================
00060 // class    : SMESHGUI_CreatePolyhedralVolumeDlg
00061 // purpose  :
00062 //=================================================================================
00063 class SMESHGUI_EXPORT SMESHGUI_CreatePolyhedralVolumeDlg : public QDialog
00064 { 
00065   Q_OBJECT
00066 
00067 public:
00068   SMESHGUI_CreatePolyhedralVolumeDlg( SMESHGUI* );
00069   ~SMESHGUI_CreatePolyhedralVolumeDlg();
00070 
00071 private:
00072   typedef QList<SMESH::SMESH_GroupBase_var> GrpList;
00073 
00074   void                     Init();
00075   void                     closeEvent( QCloseEvent* );
00076   void                     enterEvent( QEvent* );          /* mouse enter the QWidget */
00077   void                     hideEvent( QHideEvent* );       /* ESC key */
00078   void                     keyPressEvent( QKeyEvent* );
00079   int                      GetConstructorId();
00080   void                     displaySimulation();
00081     
00082   bool                     isValid();
00083   
00084   int                      checkEditLine( bool = true ); 
00086   SMESHGUI*                mySMESHGUI;                   /* Current SMESHGUI object */
00087   LightApp_SelectionMgr*   mySelectionMgr;               /* User shape selection */
00088   SVTK_Selector*           mySelector;
00089   QString                  myIDs;
00090   int                      myNbOkElements;               /* to check when elements are defined */
00091 
00092   QLineEdit*               myEditCurrentArgument;
00093    
00094   SMESH::SMESH_Mesh_var    myMesh;
00095   SMESH_Actor*             myActor;
00096   SMESH::TPolySimulation*  mySimulation;
00097   QString                  myEntry;
00098   GrpList                  myGroups;
00099   
00100   QGroupBox*               ConstructorsBox;
00101   QButtonGroup*            GroupConstructors;
00102   QRadioButton*            RadioButton1;
00103   QRadioButton*            RadioButton2;
00104   QCheckBox*               Preview;
00105   QGroupBox*               GroupGroups;
00106   QLabel*                  TextLabel_GroupName;
00107   QComboBox*               ComboBox_GroupName;
00108   QGroupBox*               GroupButtons;
00109   QPushButton*             buttonOk;
00110   QPushButton*             buttonCancel;
00111   QPushButton*             buttonApply;
00112   QPushButton*             buttonHelp;
00113   QGroupBox*               GroupContent;
00114   QLabel*                  TextLabelIds;
00115   QPushButton*             SelectElementsButton;
00116   QLineEdit*               LineEditElements;
00117   QListWidget*             myFacesByNodes;
00118   QLabel*                  myFacesByNodesLabel;
00119   QPushButton*             AddButton;
00120   QPushButton*             RemoveButton;
00121 
00122   QString                  myHelpFileName;
00123        
00124 public slots:
00125   void                     onAdd();
00126   void                     onRemove();
00127 
00128 private slots:
00129   void                     ConstructorsClicked( int );
00130   void                     ClickOnPreview( bool );
00131   void                     ClickOnOk();
00132   void                     ClickOnCancel();
00133   void                     ClickOnApply();
00134   void                     ClickOnHelp();
00135   void                     SetEditCurrentArgument();
00136   void                     SelectionIntoArgument();
00137   void                     DeactivateActiveDialog();
00138   void                     ActivateThisDialog();
00139   void                     onTextChange( const QString& );
00140   void                     onListSelectionChanged();
00141 };
00142 
00143 #endif // SMESHGUI_CREATEPOLYHEDRALVOLUMEDLG_H