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 );
56 QMap< int, SMESHGUI_MeshTab* > myTabs;
61 * \brief Tab for tab widget containing controls for definition of
62 * algorithms and hypotheses
65 class SMESHGUI_MeshTab : public QFrame
70 /*! To differ main algorithms, hypotheses and additional ones*/
73 Algo = 0, //!< algorithms
74 MainHyp, //!< main hypothesis
75 AddHyp //!< additional hypothesis
79 SMESHGUI_MeshTab( QWidget* );
80 virtual ~SMESHGUI_MeshTab();
82 void setAvailableHyps( const int, const QStringList& );
83 void setExistingHyps( const int, const QStringList& );
84 void addHyp( const int, const QString& );
85 void renameHyp( const int, const int, const QString& );
86 void setCurrentHyp( const int, const int );
87 int currentHyp( const int ) const;
92 void createHyp( const int theHypType, const int theIndex );
93 //!< Emited when "Create hypothesis" button clicked
94 void editHyp( const int theHypType, const int theIndex );
95 //!< Emited when "Edit hypothesis" button clicked
102 void onPopupItem( int );
106 QMap< int, QComboBox* > myHyp;
107 QMap< int, QToolButton* > myCreateHyp;
108 QMap< int, QToolButton* > myEditHyp;
110 QMap< int, QStringList > myAvailableHyps;
111 QMap< int, QStringList > myExistingHyps;