1 // SMESH SMESHGUI : GUI for SMESH component
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : SMESHGUI_EditHypothesesDlg.h
25 // Author : Nicolas REJNERI
29 #ifndef DIALOGBOX_EDIT_HYPOTHESES_H
30 #define DIALOGBOX_EDIT_HYPOTHESES_H
36 #include <SMESHGUI_Dialog.h>
38 typedef QMap< QString, int > MapIOR;
39 typedef QMap< QString, QString > MapIORText;
41 class ListBoxIOR : public QListBoxText
44 enum { RTTI_IOR = 1000 };
47 ListBoxIOR (QListBox* listbox,
49 const QString& text = QString::null )
50 : QListBoxText(listbox, text), myIOR(ior) {}
51 virtual ~ListBoxIOR() {};
52 virtual int rtti() const { return RTTI_IOR; }
53 QString GetIOR() const { return myIOR; }
60 //=================================================================================
61 // class : SMESHGUI_EditHypothesesDlg
63 //=================================================================================
64 class SMESHGUI_EditHypothesesDlg : public SMESHGUI_Dialog
69 enum { MeshOrSubMesh, GeomShape };
70 typedef enum { HypoDef, HypoAssign, AlgoDef, AlgoAssign } ListType;
73 SMESHGUI_EditHypothesesDlg( SMESHGUI* );
74 ~SMESHGUI_EditHypothesesDlg();
76 void setListsEnabled( const bool );
77 int hypoCount() const;
78 int algoCount() const;
79 bool isModified() const;
80 int findItem( QListBox*, const QString& );
86 bool isOld(QListBoxItem* hypItem);
89 MapIOR myMapOldHypos, myMapOldAlgos;
92 QGroupBox* GroupHypotheses;
93 QLabel* TextHypDefinition;
94 QListBox* ListHypDefinition;
95 QLabel* TextHypAssignation;
96 QListBox* ListHypAssignation;
98 QGroupBox* GroupAlgorithms;
99 QLabel* TextAlgoDefinition;
100 QListBox* ListAlgoDefinition;
101 QLabel* TextAlgoAssignation;
102 QListBox* ListAlgoAssignation;
105 void removeItem(QListBoxItem*);
106 void addItem(QListBoxItem*);
109 friend class SMESHGUI_EditHypothesesOp;
112 #endif // DIALOGBOX_EDIT_HYPOTHESES_H