1 // Copyright (C) 2007-2010 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // Partitioning/decimation module for the SALOME v3.2 platform
23 * \file MULTIPR_GUI_Dlg.h
25 * \brief MULTIPR GUI Dialog (QT)
27 * \author Olivier LE ROUX - CS, Virtual Reality Dpt
32 #ifndef __MULTIPR_GUI_DLG__
33 #define __MULTIPR_GUI_DLG__
36 //*****************************************************************************
38 //*****************************************************************************
41 #include <QProgressDialog>
43 #include "MULTIPR_ProgressCallback.hxx"
46 //*****************************************************************************
48 //*****************************************************************************
50 class SalomeApp_Application;
67 * Max length for filter parameters string.
69 #define MULTIPR_GUI_MAX_PARAMS_LENGTH 1024
71 //*****************************************************************************
72 // Class MULTIPR_GUI_Partition1Dlg
73 // Dialog box used for extracting groups from sequential MED file
74 //*****************************************************************************
76 class MULTIPR_GUI_Partition1Dlg : public QDialog
81 MULTIPR_GUI_Partition1Dlg(MULTIPR_GUI* theModule);
82 ~MULTIPR_GUI_Partition1Dlg();
84 QGroupBox* groupBoxProcess;
85 QPushButton* pushButtonCancel;
86 QPushButton* pushButtonOK;
87 QGroupBox* groupBoxSelectMesh;
88 QComboBox* comboBoxSelectMesh;
89 QLabel* textLabelSelectMesh;
101 //*****************************************************************************
102 // Class MULTIPR_GUI_Partition2Dlg
103 // Dialog box used for splitting a group (use MEDSPLITTER)
104 //*****************************************************************************
106 class MULTIPR_GUI_Partition2Dlg : public QDialog
111 MULTIPR_GUI_Partition2Dlg(MULTIPR_GUI* theModule);
112 ~MULTIPR_GUI_Partition2Dlg();
114 QGroupBox* groupBoxSplitParameters;
115 QLabel* textLabelSelectNbParts;
116 QLabel* textLabelSelectSplitter;
117 QComboBox* comboBoxSelectSplitter;
118 QSpinBox* spinBoxNbParts;
119 QGroupBox* groupBoxProcess;
120 QPushButton* pushButtonOK;
121 QPushButton* pushButtonCancel;
128 MULTIPR_GUI* mModule;
132 //*****************************************************************************
133 // Class MULTIPR_GUI_DecimateDlg
134 // Dialog box used for decimating mesh (compute 2 lower resolution: medium and low)
135 //*****************************************************************************
137 class MULTIPR_GUI_DecimateDlg : public QDialog
142 MULTIPR_GUI_DecimateDlg(MULTIPR_GUI* theModule);
143 ~MULTIPR_GUI_DecimateDlg();
145 QGroupBox* groupBoxSelectField;
146 QLabel* textLabelSelectFieldName;
147 QLabel* textLabelSelectFieldIteration;
148 QComboBox* comboBoxSelectFieldIteration;
149 QComboBox* comboBoxSelectFieldName;
150 QGroupBox* groupBoxSelectFilter;
151 QLabel* textLabelSelectFilter;
152 QComboBox* comboBoxSelectFilter;
153 QGroupBox* groupBoxParameters;
154 QLabel* textLabelTMed;
155 QLabel* textLabelTLow;
156 QLabel* textLabelRadius;
157 QLabel* textLabelBoxing;
158 QLineEdit* lineEditTMed;
159 QLineEdit* lineEditTLow;
160 QLineEdit* lineEditRadius;
161 QSpinBox* spinBoxBoxing;
162 QGroupBox* groupBoxProcess;
163 QPushButton* pushButtonCancel;
164 QPushButton* pushButtonOK;
165 QPushButton* pushButtonThresholdAuto;
166 QPushButton* pushButtonRadiusAuto;
167 QGroupBox* infoGroup;
168 QLabel* textLabelInfo;
169 QLabel* textLabelInfoValue;
177 void OnThresholdAuto();
178 void selectField(const QString & valueText);
181 MULTIPR_GUI* mModule;
184 * Create the parameter string for gradient average filter.
185 * \param pParams The parameter string to fill.
186 * \return True if the operation is successfull, false otherwise.
188 bool setGradAvgFilterParams(char* pParams);
191 * Create the parameter string for direct filter.
192 * \param pParams The parameter string to fill.
193 * \return True if the operation is successfull, false otherwise.
195 bool setDirectFilterParams(char* pParams);
199 //*****************************************************************************
200 // Class MULTIPR_GUI_ProgressCallbackDlg
201 //*****************************************************************************
203 class MULTIPR_GUI_ProgressCallbackDlg :
204 public QProgressDialog,
205 public MULTIPR_ProgressCallback
212 MULTIPR_GUI_ProgressCallbackDlg(QWidget* parent);
214 ~MULTIPR_GUI_ProgressCallbackDlg();
216 virtual void start(const char* pTaskTitle, int pNumStep);
222 virtual void progress(float pPercent);
226 //*****************************************************************************
227 // Class MULTIPR_GUI_EmptyMeshCallbackDlg
228 //*****************************************************************************
230 class MULTIPR_GUI_EmptyMeshCallbackDlg : public MULTIPR_EmptyMeshCallback
234 MULTIPR_GUI_EmptyMeshCallbackDlg(QWidget* parent);
236 ~MULTIPR_GUI_EmptyMeshCallbackDlg();
238 virtual void reportEmptyMesh(std::string pInfo);
247 #endif // __MULTIPR_GUI_DLG__