Salome HOME
Merge from V5_1_main branch 24/11/2010
[modules/multipr.git] / src / MULTIPRGUI / MULTIPR_GUI_Dlg.h
index 888cad70cbd8eb475c2814a50356011ee9fbeb9d..adcb666abb80e9d5860ec7958bef690f0aed7dc8 100644 (file)
@@ -1,6 +1,24 @@
-// 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
  *
@@ -19,8 +37,8 @@
 // Includes section
 //*****************************************************************************
 
-#include <qdialog.h>
-#include <qprogressdialog.h>
+#include <QDialog>
+#include <QProgressDialog>
 
 #include "MULTIPR_ProgressCallback.hxx"
 
@@ -36,7 +54,7 @@ class QVBoxLayout;
 class QHBoxLayout;
 class QGridLayout;
 class QSpacerItem;
-class QButtonGroup;
+class QGroupBox;
 class QLabel;
 class QComboBox;
 class QLineEdit;
@@ -45,7 +63,10 @@ class QPushButton;
 
 class MULTIPR_GUI;
 
-
+/**
+ * Max length for filter parameters string.
+ */
+#define MULTIPR_GUI_MAX_PARAMS_LENGTH 1024
 
 //*****************************************************************************
 // Class MULTIPR_GUI_Partition1Dlg
@@ -60,10 +81,10 @@ public:
     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;
 
@@ -90,12 +111,12 @@ public:
     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;
 
@@ -121,15 +142,15 @@ public:
     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;
@@ -138,12 +159,15 @@ public:
     QLineEdit* lineEditTLow;
     QLineEdit* lineEditRadius;
     QSpinBox* spinBoxBoxing;
-    QButtonGroup* buttonGroupProcess;
+    QGroupBox* groupBoxProcess;
     QPushButton* pushButtonCancel;
     QPushButton* pushButtonOK;
     QPushButton* pushButtonThresholdAuto;
     QPushButton* pushButtonRadiusAuto;
-
+    QGroupBox* infoGroup;
+    QLabel* textLabelInfo;
+    QLabel* textLabelInfoValue;
+       
 protected:
 
 protected slots:
@@ -151,10 +175,24 @@ protected slots:
     void reject();
     void OnRadiusAuto();
     void OnThresholdAuto();
+    void selectField(const QString & valueText);
 
 private:
     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);
 };