QLabel* aClampLabel = new QLabel( tr( "MAXIMUM_SIZE" ), TopGroup );
myClampSpinBox = new QtxDblSpinBox( 1.0, 512.0, 1.0, TopGroup );
myClampSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- myClampSpinBox->setValue( 256.0 );
+ myClampSpinBox->setValue( 200.0 );
TopGroupLayout->addWidget( aClampLabel, 1, 0 );
TopGroupLayout->addMultiCellWidget( myClampSpinBox, 1, 1, 1, 2 );
// Magnification
QLabel* aMagnificationLabel = new QLabel( tr( "MAGNIFICATION" ), BottomGroup );
- QtxDblSpinBox* aMagnificationSpinBox = new QtxDblSpinBox( 50, 200, 10, BottomGroup );
- aMagnificationSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- aMagnificationSpinBox->setValue( 100 );
+ myMagnificationSpinBox = new QtxDblSpinBox( 50, 200, 10, BottomGroup );
+ myMagnificationSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ myMagnificationSpinBox->setValue( 100 );
BottomGroupLayout->addWidget( aMagnificationLabel, 1, 0 );
- BottomGroupLayout->addWidget( aMagnificationSpinBox, 1, 1 );
+ BottomGroupLayout->addWidget( myMagnificationSpinBox, 1, 1 );
// Increment
QLabel* aIncrementLabel = new QLabel( tr( "INCREMENT" ), BottomGroup );
- QtxDblSpinBox* aIncrementSpinBox = new QtxDblSpinBox( 5, 50, 5, BottomGroup );
- aIncrementSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
- aIncrementSpinBox->setValue( 10 );
+ myIncrementSpinBox = new QtxDblSpinBox( 5, 50, 5, BottomGroup );
+ myIncrementSpinBox->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
+ myIncrementSpinBox->setValue( 10 );
BottomGroupLayout->addWidget( aIncrementLabel, 1, 2 );
- BottomGroupLayout->addWidget( aIncrementSpinBox, 1, 3 );
+ BottomGroupLayout->addWidget( myIncrementSpinBox, 1, 3 );
myScalarPane = new VisuGUI_GaussScalarBarPane(this, SetPref);
void VisuGUI_GaussPointsDlg::initFromPrsObject( VISU::GaussPoints_i* thePrs )
{
+ myClampSpinBox->setMaxValue( thePrs->GetGaussPointsPL()->GetMaximumSupportedSize() );
+ myClampSpinBox->setValue( thePrs->GetGaussPointsPL()->GetClamp() );
+
+ myMinSizeSpinBox->setValue( thePrs->GetGaussPointsPL()->GetRelativeMinSize() * 100.0 );
+ myMaxSizeSpinBox->setValue( thePrs->GetGaussPointsPL()->GetRelativeMaxSize() * 100.0 );
+
+ myMagnificationSpinBox->setValue( thePrs->GetGaussPointsPL()->GetMagnification() * 100.0 );
+ myIncrementSpinBox->setValue( thePrs->GetGaussPointsPL()->GetMagnificationIncrement() * 100.0 );
+
myScalarPane->initFromPrsObject(thePrs);
}
int VisuGUI_GaussPointsDlg::storeToPrsObject( VISU::GaussPoints_i* thePrs )
{
- //thePrs->GetGaussPointsPL()->SetRelativeMinSize( myMinSizeSpinBox->value() / 100.0 );
- //thePrs->GetGaussPointsPL()->SetRelativeMaxSize( myMaxSizeSpinBox->value() / 100.0 );
+ thePrs->GetGaussPointsPL()->SetClamp( myClampSpinBox->value() );
+
+ thePrs->GetGaussPointsPL()->SetRelativeMinSize( myMinSizeSpinBox->value() / 100.0 );
+ thePrs->GetGaussPointsPL()->SetRelativeMaxSize( myMaxSizeSpinBox->value() / 100.0 );
+
+ thePrs->GetGaussPointsPL()->SetMagnification( myMagnificationSpinBox->value() / 100.0 );
+ thePrs->GetGaussPointsPL()->SetMagnificationIncrement( myIncrementSpinBox->value() / 100.0 );
return myScalarPane->storeToPrsObject(thePrs);
}