-// Project MULTIPR, IOLS WP1.2.1 - EDF/CS
-// Partitioning/decimation module for the SALOME v3.2 platform
+// Copyright (C) 2007-2010 CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//
+// Partitioning/decimation module for the SALOME v3.2 platform
+//
/**
* \file MULTIPR_GUI_Dlg.h
*
// Includes section
//*****************************************************************************
-#include <SalomeApp_Module.h>
-#include <LightApp_DataObject.h>
-#include <LightApp_DataModel.h>
-#include <LightApp_RootObject.h>
-
-#include <SALOMEconfig.h>
-#include CORBA_CLIENT_HEADER(MULTIPR)
-
-#include <qdialog.h>
-#include <qprogressdialog.h>
-#include <qstring.h>
-#include <qvariant.h>
+#include <QDialog>
+#include <QProgressDialog>
#include "MULTIPR_ProgressCallback.hxx"
class QHBoxLayout;
class QGridLayout;
class QSpacerItem;
-class QButtonGroup;
+class QGroupBox;
class QLabel;
class QComboBox;
class QLineEdit;
class MULTIPR_GUI;
-
+/**
+ * Max length for filter parameters string.
+ */
+#define MULTIPR_GUI_MAX_PARAMS_LENGTH 1024
//*****************************************************************************
// Class MULTIPR_GUI_Partition1Dlg
MULTIPR_GUI_Partition1Dlg(MULTIPR_GUI* theModule);
~MULTIPR_GUI_Partition1Dlg();
- QButtonGroup* buttonGroupProcess;
+ QGroupBox* groupBoxProcess;
QPushButton* pushButtonCancel;
QPushButton* pushButtonOK;
- QButtonGroup* buttonGroupSelectMesh;
+ QGroupBox* groupBoxSelectMesh;
QComboBox* comboBoxSelectMesh;
QLabel* textLabelSelectMesh;
protected slots:
- void accept();
- void reject();
-
+ void accept();
+ void reject();
+
private:
- MULTIPR_GUI* mModule;
+ MULTIPR_GUI* mModule;
};
MULTIPR_GUI_Partition2Dlg(MULTIPR_GUI* theModule);
~MULTIPR_GUI_Partition2Dlg();
- QButtonGroup* buttonGroupSplitParameters;
+ QGroupBox* groupBoxSplitParameters;
QLabel* textLabelSelectNbParts;
QLabel* textLabelSelectSplitter;
QComboBox* comboBoxSelectSplitter;
QSpinBox* spinBoxNbParts;
- QButtonGroup* buttonGroupProcess;
+ QGroupBox* groupBoxProcess;
QPushButton* pushButtonOK;
QPushButton* pushButtonCancel;
protected slots:
- void accept();
- void reject();
+ void accept();
+ void reject();
private:
- MULTIPR_GUI* mModule;
+ MULTIPR_GUI* mModule;
};
MULTIPR_GUI_DecimateDlg(MULTIPR_GUI* theModule);
~MULTIPR_GUI_DecimateDlg();
- QButtonGroup* buttonGroupSelectField;
+ QGroupBox* groupBoxSelectField;
QLabel* textLabelSelectFieldName;
QLabel* textLabelSelectFieldIteration;
QComboBox* comboBoxSelectFieldIteration;
QComboBox* comboBoxSelectFieldName;
- QButtonGroup* buttonGroupSelectFilter;
+ QGroupBox* groupBoxSelectFilter;
QLabel* textLabelSelectFilter;
QComboBox* comboBoxSelectFilter;
- QButtonGroup* buttonGroupParameters;
+ QGroupBox* groupBoxParameters;
QLabel* textLabelTMed;
QLabel* textLabelTLow;
QLabel* textLabelRadius;
QLineEdit* lineEditTLow;
QLineEdit* lineEditRadius;
QSpinBox* spinBoxBoxing;
- QButtonGroup* buttonGroupProcess;
+ QGroupBox* groupBoxProcess;
QPushButton* pushButtonCancel;
QPushButton* pushButtonOK;
- QPushButton* pushButtonThresholdAuto;
+ QPushButton* pushButtonThresholdAuto;
QPushButton* pushButtonRadiusAuto;
-
+ QGroupBox* infoGroup;
+ QLabel* textLabelInfo;
+ QLabel* textLabelInfoValue;
+
protected:
protected slots:
- void accept();
- void reject();
- void OnRadiusAuto();
- void OnThresholdAuto();
+ void accept();
+ void reject();
+ void OnRadiusAuto();
+ void OnThresholdAuto();
+ void selectField(const QString & valueText);
private:
- MULTIPR_GUI* mModule;
-
+ MULTIPR_GUI* mModule;
+
+ /**
+ * Create the parameter string for gradient average filter.
+ * \param pParams The parameter string to fill.
+ * \return True if the operation is successfull, false otherwise.
+ */
+ bool setGradAvgFilterParams(char* pParams);
+
+ /**
+ * Create the parameter string for direct filter.
+ * \param pParams The parameter string to fill.
+ * \return True if the operation is successfull, false otherwise.
+ */
+ bool setDirectFilterParams(char* pParams);
};
//*****************************************************************************
class MULTIPR_GUI_ProgressCallbackDlg :
- public QProgressDialog,
- public MULTIPR_ProgressCallback
-
+ public QProgressDialog,
+ public MULTIPR_ProgressCallback
+
{
- Q_OBJECT
-
+ Q_OBJECT
+
public:
- MULTIPR_GUI_ProgressCallbackDlg(QWidget* parent);
-
- ~MULTIPR_GUI_ProgressCallbackDlg();
-
- virtual void start(const char* pTaskTitle, int pNumStep);
-
- virtual void done();
-
+ MULTIPR_GUI_ProgressCallbackDlg(QWidget* parent);
+
+ ~MULTIPR_GUI_ProgressCallbackDlg();
+
+ virtual void start(const char* pTaskTitle, int pNumStep);
+
+ virtual void done();
+
protected:
-
- virtual void progress(float pPercent);
+
+ virtual void progress(float pPercent);
+};
+
+
+//*****************************************************************************
+// Class MULTIPR_GUI_EmptyMeshCallbackDlg
+//*****************************************************************************
+
+class MULTIPR_GUI_EmptyMeshCallbackDlg : public MULTIPR_EmptyMeshCallback
+{
+public:
+
+ MULTIPR_GUI_EmptyMeshCallbackDlg(QWidget* parent);
+
+ ~MULTIPR_GUI_EmptyMeshCallbackDlg();
+
+ virtual void reportEmptyMesh(std::string pInfo);
+
+protected:
+
+ QWidget* mParent;
+
};