1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/
23 * Copyright (C) 2005 CEA/DEN, EDF R&D
27 * File : SMESHGUI_MeshDlg.h
28 * Author : Sergey LITONIN
33 #ifndef SMESHGUI_MeshDlg_H
34 #define SMESHGUI_MeshDlg_H
36 #include "SMESH_SMESHGUI.hxx"
38 #include "SMESHGUI_Dialog.h"
40 #include <qstringlist.h>
43 class SMESHGUI_MeshTab;
52 * \brief Dialog for mech creation or editing
54 * This dialog is used for mech creation or editing.
56 class SMESHGUI_EXPORT SMESHGUI_MeshDlg : public SMESHGUI_Dialog
62 enum Controls { Obj, Mesh, Geom };
64 /*! Describes dimensions */
65 enum Dimensions { Dim1D = 0, Dim2D, Dim3D };
68 SMESHGUI_MeshDlg( const bool theToCreate, const bool theIsMesh );
69 virtual ~SMESHGUI_MeshDlg();
71 SMESHGUI_MeshTab* tab( const int ) const;
73 void setCurrentTab( const int );
74 void setMaxHypoDim( const int );
75 void setHypoSets( const QStringList& );
76 void setGeomPopupEnabled( const bool );
80 void hypoSet( const QString& );
81 void geomSelectionByMesh( bool );
85 void onHypoSetPopup( int );
86 void onHypoSetButton();
87 void onGeomPopup( int );
88 void onGeomSelectionButton( bool );
92 QMap< int, SMESHGUI_MeshTab* > myTabs;
94 QPopupMenu* myHypoSetPopup;
95 QPopupMenu* myGeomPopup;
99 * \brief Tab for tab widget containing controls for definition of
100 * algorithms and hypotheses
103 class SMESHGUI_EXPORT SMESHGUI_MeshTab : public QFrame
108 /*! To differ main algorithms, hypotheses and additional ones*/
111 Algo = 0, //!< algorithms
112 MainHyp, //!< main hypothesis
113 AddHyp //!< additional hypothesis
117 SMESHGUI_MeshTab( QWidget* );
118 virtual ~SMESHGUI_MeshTab();
120 void setAvailableHyps( const int, const QStringList& );
121 void setExistingHyps( const int, const QStringList& );
122 void addHyp( const int, const QString& );
123 void renameHyp( const int, const int, const QString& );
124 void setCurrentHyp( const int, const int );
125 int currentHyp( const int ) const;
130 void createHyp( const int theHypType, const int theIndex );
131 //!< Emited when "Create hypothesis" button clicked
132 void editHyp( const int theHypType, const int theIndex );
133 //!< Emited when "Edit hypothesis" button clicked
140 void onPopupItem( int );
144 QMap< int, QComboBox* > myHyp;
145 QMap< int, QToolButton* > myCreateHyp;
146 QMap< int, QToolButton* > myEditHyp;
148 QMap< int, QStringList > myAvailableHyps;
149 QMap< int, QStringList > myExistingHyps;