mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-24 16:30:35 +05:00
PAL7768
This commit is contained in:
parent
dc8466f4ed
commit
4e1a1db78c
@ -30,14 +30,16 @@ using namespace std;
|
|||||||
|
|
||||||
#include "RepairGUI_ShapeProcessDlg.h"
|
#include "RepairGUI_ShapeProcessDlg.h"
|
||||||
|
|
||||||
|
#include "GEOMImpl_Types.hxx"
|
||||||
|
|
||||||
|
#include "QAD_Desktop.h"
|
||||||
#include "SALOME_ListIteratorOfListIO.hxx"
|
#include "SALOME_ListIteratorOfListIO.hxx"
|
||||||
#include "SALOME_ListIO.hxx"
|
#include "SALOME_ListIO.hxx"
|
||||||
|
|
||||||
#include "GEOMImpl_Types.hxx"
|
#include <TCollection_AsciiString.hxx>
|
||||||
|
|
||||||
#include <qheader.h>
|
#include <qheader.h>
|
||||||
#include "QAD_Desktop.h"
|
#include <qmessagebox.h>
|
||||||
#include <TCollection_AsciiString.hxx>
|
|
||||||
|
|
||||||
|
|
||||||
//=================================================================================
|
//=================================================================================
|
||||||
@ -290,6 +292,8 @@ void RepairGUI_ShapeProcessDlg::init()
|
|||||||
connect( mySelectWdgt->PushButton1, SIGNAL(clicked()), this, SLOT(selectClicked()) );
|
connect( mySelectWdgt->PushButton1, SIGNAL(clicked()), this, SLOT(selectClicked()) );
|
||||||
connect( mySelectWdgt->LineEdit1, SIGNAL(returnPressed()), this, SLOT(lineEditReturnPressed()) );
|
connect( mySelectWdgt->LineEdit1, SIGNAL(returnPressed()), this, SLOT(lineEditReturnPressed()) );
|
||||||
|
|
||||||
|
connect( myToBezierSurfModeChk, SIGNAL(toggled(bool)), SLOT(advOptionToggled(bool)) );
|
||||||
|
|
||||||
adjustSize();
|
adjustSize();
|
||||||
loadDefaults(); // init dialog fields with values from resource file
|
loadDefaults(); // init dialog fields with values from resource file
|
||||||
myOpList->setSelected( myOpList->findItem( "FixShape", 0 ), true );
|
myOpList->setSelected( myOpList->findItem( "FixShape", 0 ), true );
|
||||||
@ -502,7 +506,6 @@ void RepairGUI_ShapeProcessDlg::loadDefaults()
|
|||||||
GEOM::string_array_var anOperators, aParams, aValues;
|
GEOM::string_array_var anOperators, aParams, aValues;
|
||||||
anOp->GetShapeProcessParameters( anOperators, aParams, aValues );
|
anOp->GetShapeProcessParameters( anOperators, aParams, aValues );
|
||||||
|
|
||||||
|
|
||||||
// check the default items-operators
|
// check the default items-operators
|
||||||
int i;
|
int i;
|
||||||
for ( i = 0; i < anOperators->length(); i++ )
|
for ( i = 0; i < anOperators->length(); i++ )
|
||||||
@ -513,14 +516,19 @@ void RepairGUI_ShapeProcessDlg::loadDefaults()
|
|||||||
((QCheckListItem*) anItem)->setOn( true );
|
((QCheckListItem*) anItem)->setOn( true );
|
||||||
}
|
}
|
||||||
|
|
||||||
// set default values of parameters
|
// Retrieve default parameters for ALL operators
|
||||||
if ( aParams->length() != aValues->length() )
|
for ( QListViewItemIterator it(myOpList); it.current(); ++it ) {
|
||||||
return;
|
CORBA::String_var anOperator = CORBA::string_dup( it.current()->text( 0 ).latin1() );
|
||||||
for ( i = 0; i < aParams->length(); i++ )
|
anOp->GetOperatorParameters( anOperator.in(), aParams, aValues );
|
||||||
{
|
|
||||||
QWidget* aCtrl = getControl( (const char*)aParams[i] );
|
// set default values of parameters
|
||||||
const char* aValue = set_convert( (const char*)aParams[i], aValues[i] );
|
if ( aParams->length() != aValues->length() )
|
||||||
setValue( aCtrl, aValue );
|
continue;
|
||||||
|
for ( i = 0; i < aParams->length(); i++ ) {
|
||||||
|
QWidget* aCtrl = getControl( (const char*)aParams[i] );
|
||||||
|
const char* aValue = set_convert( (const char*)aParams[i], aValues[i] );
|
||||||
|
setValue( aCtrl, aValue );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -806,3 +814,16 @@ void RepairGUI_ShapeProcessDlg::initSelection()
|
|||||||
aTypes.Add( GEOM_EDGE );
|
aTypes.Add( GEOM_EDGE );
|
||||||
globalSelection( aTypes );
|
globalSelection( aTypes );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=================================================================================
|
||||||
|
// function : advOptionToggled
|
||||||
|
// purpose : this slot is used to warn the user about possible consequences
|
||||||
|
// of enabling some advanced options
|
||||||
|
//=================================================================================
|
||||||
|
void RepairGUI_ShapeProcessDlg::advOptionToggled( bool on )
|
||||||
|
{
|
||||||
|
QButton* btn = (QButton*)sender();
|
||||||
|
if ( on && btn->isToggleButton() &&
|
||||||
|
QMessageBox::warning( QAD_Application::getDesktop(), tr( "GEOM_WRN_WARNING" ), tr( "TIME_CONSUMING" ), QMessageBox::Yes, QMessageBox::No ) == QMessageBox::No )
|
||||||
|
btn->toggle();
|
||||||
|
}
|
||||||
|
@ -136,6 +136,7 @@ private slots:
|
|||||||
void selectClicked();
|
void selectClicked();
|
||||||
void activateSelection();
|
void activateSelection();
|
||||||
void operationChanged();
|
void operationChanged();
|
||||||
|
void advOptionToggled(bool);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DIALOGBOX_ShapeProcess_H
|
#endif // DIALOGBOX_ShapeProcess_H
|
||||||
|
Loading…
Reference in New Issue
Block a user