1 // Project MULTIPR, IOLS WP1.2.1 - EDF/CS
2 // Partitioning/decimation module for the SALOME v3.2 platform
5 * \file MULTIPR_GUI_Dlg.h
7 * \brief MULTIPR GUI Dialog (QT)
9 * \author Olivier LE ROUX - CS, Virtual Reality Dpt
14 #ifndef __MULTIPR_GUI_DLG__
15 #define __MULTIPR_GUI_DLG__
18 //*****************************************************************************
20 //*****************************************************************************
23 #include <QProgressDialog>
25 #include "MULTIPR_ProgressCallback.hxx"
28 //*****************************************************************************
30 //*****************************************************************************
32 class SalomeApp_Application;
49 * Max length for filter parameters string.
51 #define MULTIPR_GUI_MAX_PARAMS_LENGTH 1024
53 //*****************************************************************************
54 // Class MULTIPR_GUI_Partition1Dlg
55 // Dialog box used for extracting groups from sequential MED file
56 //*****************************************************************************
58 class MULTIPR_GUI_Partition1Dlg : public QDialog
63 MULTIPR_GUI_Partition1Dlg(MULTIPR_GUI* theModule);
64 ~MULTIPR_GUI_Partition1Dlg();
66 QGroupBox* groupBoxProcess;
67 QPushButton* pushButtonCancel;
68 QPushButton* pushButtonOK;
69 QGroupBox* groupBoxSelectMesh;
70 QComboBox* comboBoxSelectMesh;
71 QLabel* textLabelSelectMesh;
83 //*****************************************************************************
84 // Class MULTIPR_GUI_Partition2Dlg
85 // Dialog box used for splitting a group (use MEDSPLITTER)
86 //*****************************************************************************
88 class MULTIPR_GUI_Partition2Dlg : public QDialog
93 MULTIPR_GUI_Partition2Dlg(MULTIPR_GUI* theModule);
94 ~MULTIPR_GUI_Partition2Dlg();
96 QGroupBox* groupBoxSplitParameters;
97 QLabel* textLabelSelectNbParts;
98 QLabel* textLabelSelectSplitter;
99 QComboBox* comboBoxSelectSplitter;
100 QSpinBox* spinBoxNbParts;
101 QGroupBox* groupBoxProcess;
102 QPushButton* pushButtonOK;
103 QPushButton* pushButtonCancel;
110 MULTIPR_GUI* mModule;
114 //*****************************************************************************
115 // Class MULTIPR_GUI_DecimateDlg
116 // Dialog box used for decimating mesh (compute 2 lower resolution: medium and low)
117 //*****************************************************************************
119 class MULTIPR_GUI_DecimateDlg : public QDialog
124 MULTIPR_GUI_DecimateDlg(MULTIPR_GUI* theModule);
125 ~MULTIPR_GUI_DecimateDlg();
127 QGroupBox* groupBoxSelectField;
128 QLabel* textLabelSelectFieldName;
129 QLabel* textLabelSelectFieldIteration;
130 QComboBox* comboBoxSelectFieldIteration;
131 QComboBox* comboBoxSelectFieldName;
132 QGroupBox* groupBoxSelectFilter;
133 QLabel* textLabelSelectFilter;
134 QComboBox* comboBoxSelectFilter;
135 QGroupBox* groupBoxParameters;
136 QLabel* textLabelTMed;
137 QLabel* textLabelTLow;
138 QLabel* textLabelRadius;
139 QLabel* textLabelBoxing;
140 QLineEdit* lineEditTMed;
141 QLineEdit* lineEditTLow;
142 QLineEdit* lineEditRadius;
143 QSpinBox* spinBoxBoxing;
144 QGroupBox* groupBoxProcess;
145 QPushButton* pushButtonCancel;
146 QPushButton* pushButtonOK;
147 QPushButton* pushButtonThresholdAuto;
148 QPushButton* pushButtonRadiusAuto;
149 QGroupBox* infoGroup;
150 QLabel* textLabelInfo;
151 QLabel* textLabelInfoValue;
159 void OnThresholdAuto();
160 void selectField(const QString & valueText);
163 MULTIPR_GUI* mModule;
166 * Create the parameter string for gradient average filter.
167 * \param pParams The parameter string to fill.
168 * \return True if the operation is successfull, false otherwise.
170 bool setGradAvgFilterParams(char* pParams);
173 * Create the parameter string for direct filter.
174 * \param pParams The parameter string to fill.
175 * \return True if the operation is successfull, false otherwise.
177 bool setDirectFilterParams(char* pParams);
181 //*****************************************************************************
182 // Class MULTIPR_GUI_ProgressCallbackDlg
183 //*****************************************************************************
185 class MULTIPR_GUI_ProgressCallbackDlg :
186 public QProgressDialog,
187 public MULTIPR_ProgressCallback
194 MULTIPR_GUI_ProgressCallbackDlg(QWidget* parent);
196 ~MULTIPR_GUI_ProgressCallbackDlg();
198 virtual void start(const char* pTaskTitle, int pNumStep);
204 virtual void progress(float pPercent);
208 //*****************************************************************************
209 // Class MULTIPR_GUI_EmptyMeshCallbackDlg
210 //*****************************************************************************
212 class MULTIPR_GUI_EmptyMeshCallbackDlg : public MULTIPR_EmptyMeshCallback
216 MULTIPR_GUI_EmptyMeshCallbackDlg(QWidget* parent);
218 ~MULTIPR_GUI_EmptyMeshCallbackDlg();
220 virtual void reportEmptyMesh(std::string pInfo);
229 #endif // __MULTIPR_GUI_DLG__