Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef SMESHGUI_MESHDLG_H
00028 #define SMESHGUI_MESHDLG_H
00029
00030
00031 #include "SMESH_SMESHGUI.hxx"
00032
00033 #include "SMESHGUI_Dialog.h"
00034
00035
00036 #include <QFrame>
00037 #include <QStringList>
00038 #include <QMap>
00039
00040 class SMESHGUI_MeshTab;
00041 class QTabWidget;
00042 class QComboBox;
00043 class QToolButton;
00044 class QMenu;
00045 class QAction;
00046
00052 class SMESHGUI_EXPORT SMESHGUI_MeshDlg : public SMESHGUI_Dialog
00053 {
00054 Q_OBJECT
00055
00056 public:
00057
00058 enum Controls { Obj, Mesh, Geom };
00059
00061 enum Dimensions { Dim0D = 0, Dim1D, Dim2D, Dim3D };
00062
00063 public:
00064 SMESHGUI_MeshDlg( const bool, const bool );
00065 virtual ~SMESHGUI_MeshDlg();
00066
00067 SMESHGUI_MeshTab* tab( const int ) const;
00068 void reset();
00069 void setCurrentTab( const int );
00070 void setMaxHypoDim( const int );
00071 void setHypoSets( const QStringList& );
00072 void setGeomPopupEnabled( const bool );
00073 void disableTab(const int);
00074 void enableTab(const int);
00075 bool isTabEnabled(const int) const;
00076 int getActiveObject();
00077
00078 signals:
00079 void hypoSet( const QString& );
00080 void geomSelectionByMesh( bool );
00081
00082 private slots:
00083 void onHypoSetPopup( QAction* );
00084 void onGeomPopup( QAction* );
00085 void onGeomSelectionButton( bool );
00086
00087 private:
00088 QMap<int, SMESHGUI_MeshTab*> myTabs;
00089 QTabWidget* myTabWg;
00090 QToolButton* myHypoSetButton;
00091 QMenu* myGeomPopup;
00092 };
00093
00099 class SMESHGUI_EXPORT SMESHGUI_MeshTab : public QFrame
00100 {
00101 Q_OBJECT
00102
00103 public:
00105 enum HypType
00106 {
00107 Algo = 0,
00108 MainHyp,
00109 AddHyp
00110 };
00111
00112 public:
00113 SMESHGUI_MeshTab( QWidget* );
00114 virtual ~SMESHGUI_MeshTab();
00115
00116 void setAvailableHyps( const int, const QStringList& );
00117 void setExistingHyps( const int, const QStringList& );
00118 void addHyp( const int, const QString& );
00119 void renameHyp( const int, const int, const QString& );
00120 void setCurrentHyp( const int, const int );
00121 int currentHyp( const int ) const;
00122 void reset();
00123
00124 signals:
00125 void createHyp( const int, const int );
00127 void editHyp( const int, const int );
00129 void selectAlgo( const int );
00131
00132 private slots:
00133 void onCreateHyp();
00134 void onEditHyp();
00135 void onHyp( int );
00136
00137 private:
00138 QMap<int, QComboBox*> myHyp;
00139 QMap<int, QToolButton*> myCreateHyp;
00140 QMap<int, QToolButton*> myEditHyp;
00141
00142 QMap<int, QStringList> myAvailableHyps;
00143 QMap<int, QStringList> myExistingHyps;
00144 };
00145
00146 #endif // SMESHGUI_MESHDLG_H