Salome HOME
*** empty log message ***
[modules/multipr.git] / src / MULTIPRGUI / MULTIPR_GUI_Dlg.cxx
index 0a3ee2d65068ef06e74a6d4bbb68963435bae3f8..594cc512f007aaf52c9029b6d4cdb2e4555a62f7 100644 (file)
 
 #include "MULTIPR_GUI_Dlg.h"
 #include "MULTIPR_GUI.h"
-#include "MULTIPR_Mesh.hxx"
-#include "MULTIPR_DecimationFilter.hxx"
 
 // Salome Includes
 #include <SUIT_MessageBox.h>
 #include <SUIT_ResourceMgr.h>
 #include <SUIT_Session.h>
 #include <SalomeApp_Application.h>
-#include <SalomeApp_DataModel.h>
-#include <SalomeApp_Study.h>
 #include <SalomeApp_CheckFileDlg.h>
-#include <LightApp_Study.h>
-#include <LightApp_DataModel.h>
-#include <LightApp_DataOwner.h>
 #include <LightApp_SelectionMgr.h>
-#include <CAM_DataModel.h>
-#include <CAM_Module.h>
 
 #include <SALOME_LifeCycleCORBA.hxx>
 
-#include <QtxPopupMgr.h>
-
 // QT Includes
 #include <qapplication.h>
 #include <qinputdialog.h>
@@ -62,7 +51,11 @@ using namespace std;
 
 
 MULTIPR_GUI_Partition1Dlg::MULTIPR_GUI_Partition1Dlg(MULTIPR_GUI* theModule) : 
-       QDialog( theModule->application()->desktop(), 0, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+       QDialog(
+               theModule->application()->desktop(), 
+               0, 
+               false, 
+               WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
 {
        mModule = theModule;
        
@@ -148,7 +141,11 @@ void MULTIPR_GUI_Partition1Dlg::reject()
 
 
 MULTIPR_GUI_Partition2Dlg::MULTIPR_GUI_Partition2Dlg(MULTIPR_GUI* theModule) : 
-       QDialog( theModule->application()->desktop(), 0, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+       QDialog(
+               theModule->application()->desktop(), 
+               0, 
+               false, 
+               WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
 {
        mModule = theModule;
        
@@ -197,6 +194,7 @@ MULTIPR_GUI_Partition2Dlg::MULTIPR_GUI_Partition2Dlg(MULTIPR_GUI* theModule) :
        connect(pushButtonCancel, SIGNAL(clicked()), this, SLOT(reject()));
 }
 
+
 /*
  *  Destroys the object and frees any allocated resources
  */
@@ -254,7 +252,11 @@ void MULTIPR_GUI_Partition2Dlg::reject()
 
 
 MULTIPR_GUI_DecimateDlg::MULTIPR_GUI_DecimateDlg(MULTIPR_GUI* theModule) :
-       QDialog( theModule->application()->desktop(), 0, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+       QDialog(
+               theModule->application()->desktop(), 
+               0, 
+               false, 
+               WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
 {
        mModule = theModule;
        
@@ -335,6 +337,7 @@ MULTIPR_GUI_DecimateDlg::MULTIPR_GUI_DecimateDlg(MULTIPR_GUI* theModule) :
     spinBoxBoxing->setMaxValue( 200 );
     spinBoxBoxing->setMinValue( 2 );
     spinBoxBoxing->setValue( 100 );
+       QToolTip::add( spinBoxBoxing, tr( "grid: number of cells along each axis" ) );
 
     buttonGroupProcess = new QButtonGroup( this, "buttonGroupProcess" );
     buttonGroupProcess->setGeometry( QRect( 10, 480, 450, 60 ) );
@@ -350,14 +353,14 @@ MULTIPR_GUI_DecimateDlg::MULTIPR_GUI_DecimateDlg(MULTIPR_GUI* theModule) :
        setCaption( tr( "Decimation" ) );
     buttonGroupSelectField->setTitle( tr( "Select field" ) );
     textLabelSelectFieldName->setText( tr( "Field name" ) );
-    textLabelSelectFieldIteration->setText( tr( "Iteration" ) );
+    textLabelSelectFieldIteration->setText( tr( "Field iteration" ) );
     buttonGroupSelectFilter->setTitle( tr( "Select filter" ) );
     textLabelSelectFilter->setText( tr( "Filter name" ) );
     buttonGroupParameters->setTitle( tr( "Set parameters" ) );
     textLabelTMed->setText( tr( "Threshold for medium resolution" ) );
     textLabelTLow->setText( tr( "Threshold for low resolution" ) );
     textLabelRadius->setText( tr( "Radius (neighborhood)" ) );
-    textLabelBoxing->setText( tr( "Boxing parameter" ) );
+    textLabelBoxing->setText( tr( "Acceleration structure (boxing)" ) );
     lineEditTMed->setText( tr( "0.1" ) );
     lineEditTLow->setText( tr( "0.2" ) );
 
@@ -520,6 +523,11 @@ void MULTIPR_GUI_DecimateDlg::OnRadiusAuto()
                lPartName,
                lPath,
                lMEDFileName);
+               
+       if (ret != 5)
+       {
+               return;
+       }
        
        QApplication::setOverrideCursor(Qt::waitCursor);
        float defaultRadius = 0.5f;
@@ -611,10 +619,15 @@ void MULTIPR_GUI_DecimateDlg::OnThresholdAuto()
 
 //*****************************************************************************
 // MULTIPR_GUI_ProgressCallbackDlg
+// QT dialog box used to display progress in time consuming task (e.g. save)
 //*****************************************************************************
 
 MULTIPR_GUI_ProgressCallbackDlg::MULTIPR_GUI_ProgressCallbackDlg(QWidget* parent) :
-       QProgressDialog(parent, 0, false, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
+       QProgressDialog(
+               parent, 
+               0, 
+               false, 
+               WStyle_Customize | WStyle_NormalBorder | WStyle_Title | WStyle_SysMenu)
 {
        setLabel(new QLabel(this, "Please wait"));
        setLabelText("Please wait");
@@ -624,6 +637,7 @@ MULTIPR_GUI_ProgressCallbackDlg::MULTIPR_GUI_ProgressCallbackDlg(QWidget* parent
 
 MULTIPR_GUI_ProgressCallbackDlg::~MULTIPR_GUI_ProgressCallbackDlg()
 {
+       // do nothing
 }