4 * Copyright (C) 2005 CEA/DEN, EDF R&D
8 * File : SMESHGUI_MeshDlg.h
9 * Author : Sergey LITONIN
14 #ifndef SMESHGUI_MeshDlg_H
15 #define SMESHGUI_MeshDlg_H
17 #include "SMESHGUI_Dialog.h"
19 #include <qstringlist.h>
22 class SMESHGUI_MeshTab;
31 * \brief Dialog for mech creation or editing
33 * This dialog is used for mech creation or editing.
35 class SMESHGUI_MeshDlg : public SMESHGUI_Dialog
41 enum Controls { Obj, Mesh, Geom };
43 /*! Describes dimensions */
44 enum Dimensions { Dim1D = 0, Dim2D, Dim3D };
47 SMESHGUI_MeshDlg( const bool theToCreate, const bool theIsMesh );
48 virtual ~SMESHGUI_MeshDlg();
50 SMESHGUI_MeshTab* tab( const int ) const;
52 void setCurrentTab( const int );
53 void setMaxHypoDim( const int );
54 void setHypoSets( const QStringList& );
58 void hypoSet( const QString& );
62 void onHypoSetPopup( int );
63 void onHypoSetButton();
67 QMap< int, SMESHGUI_MeshTab* > myTabs;
69 QPopupMenu* myHypoSetPopup;
73 * \brief Tab for tab widget containing controls for definition of
74 * algorithms and hypotheses
77 class SMESHGUI_MeshTab : public QFrame
82 /*! To differ main algorithms, hypotheses and additional ones*/
85 Algo = 0, //!< algorithms
86 MainHyp, //!< main hypothesis
87 AddHyp //!< additional hypothesis
91 SMESHGUI_MeshTab( QWidget* );
92 virtual ~SMESHGUI_MeshTab();
94 void setAvailableHyps( const int, const QStringList& );
95 void setExistingHyps( const int, const QStringList& );
96 void addHyp( const int, const QString& );
97 void renameHyp( const int, const int, const QString& );
98 void setCurrentHyp( const int, const int );
99 int currentHyp( const int ) const;
104 void createHyp( const int theHypType, const int theIndex );
105 //!< Emited when "Create hypothesis" button clicked
106 void editHyp( const int theHypType, const int theIndex );
107 //!< Emited when "Edit hypothesis" button clicked
114 void onPopupItem( int );
118 QMap< int, QComboBox* > myHyp;
119 QMap< int, QToolButton* > myCreateHyp;
120 QMap< int, QToolButton* > myEditHyp;
122 QMap< int, QStringList > myAvailableHyps;
123 QMap< int, QStringList > myExistingHyps;