X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FMULTIPRGUI%2FMULTIPR_GUI_Dlg.h;h=adcb666abb80e9d5860ec7958bef690f0aed7dc8;hb=5d972755c31afca2fd6e1a697a75afaee00cb59e;hp=c43df0106b0557c0da38031495aff3eb5042ee85;hpb=1cabb28ebdb266aa36cdac8ac7af7491ed53c8b8;p=modules%2Fmultipr.git diff --git a/src/MULTIPRGUI/MULTIPR_GUI_Dlg.h b/src/MULTIPRGUI/MULTIPR_GUI_Dlg.h index c43df01..adcb666 100644 --- a/src/MULTIPRGUI/MULTIPR_GUI_Dlg.h +++ b/src/MULTIPRGUI/MULTIPR_GUI_Dlg.h @@ -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,18 +37,8 @@ // Includes section //***************************************************************************** -#include -#include -#include -#include - -#include -#include CORBA_CLIENT_HEADER(MULTIPR) - -#include -#include -#include -#include +#include +#include #include "MULTIPR_ProgressCallback.hxx" @@ -46,7 +54,7 @@ class QVBoxLayout; class QHBoxLayout; class QGridLayout; class QSpacerItem; -class QButtonGroup; +class QGroupBox; class QLabel; class QComboBox; class QLineEdit; @@ -55,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 @@ -70,19 +81,19 @@ 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; protected slots: - void accept(); - void reject(); - + void accept(); + void reject(); + private: - MULTIPR_GUI* mModule; + MULTIPR_GUI* mModule; }; @@ -100,21 +111,21 @@ 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; protected slots: - void accept(); - void reject(); + void accept(); + void reject(); private: - MULTIPR_GUI* mModule; + MULTIPR_GUI* mModule; }; @@ -131,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; @@ -148,23 +159,40 @@ public: 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); }; @@ -173,25 +201,46 @@ private: //***************************************************************************** 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; + };