ScalFact = new QtxDblSpinBox (0.0, 1.0E+38, 0.1, TopGroup);
ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
- ScalFact->setPrecision(38);
+
+ SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
+ int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
+
+ ScalFact->setPrecision( aPrecision*(-1) );
ScalFact->setValue(0.1);
TopGroupLayout->addWidget(ScalFact, 0, 1);
myTabBox->setCurrentPage( 0 );
}
+void VisuGUI_DeformedShapeAndScalarMapDlg::setFactor(double theFactor)
+{
+ double i=0.1;
+ while (1) { // Calculate Step & Precission
+ if ( int (theFactor/i) > 0)
+ break;
+ else {
+ i = i*0.1;
+ }
+ }
+
+ ScalFact->setLineStep(i);
+
+ ScalFact->setValue(theFactor);
+}
+
int
VisuGUI_DeformedShapeAndScalarMapDlg
::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs)
double getFactor()
{ return ScalFact->value(); }
- void setFactor(double theFactor)
- { ScalFact->setValue(theFactor); }
+ void setFactor(double theFactor);
virtual void initFromPrsObject( VISU::ColoredPrs3d_i* thePrs,
bool theInit );
ScalFact = new QtxDblSpinBox (0.0, 1.0E+38, 0.1, TopGroup);
ScalFact->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed));
- ScalFact->setPrecision(38);
+
+ SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
+ int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
+
+ ScalFact->setPrecision( aPrecision*(-1) );
ScalFact->setValue(0.1);
TopGroupLayout->addWidget(ScalFact, 0, 1);
// signals and slots connections
connect(buttonOk, SIGNAL(clicked()), this, SLOT(accept()));
- connect(buttonApply, SIGNAL(clicked()), this, SLOT(onApply()));
+ connect(buttonApply, SIGNAL(clicked()), this, SLOT(onApply()));
connect(buttonCancel, SIGNAL(clicked()), this, SLOT(reject()));
connect(buttonHelp, SIGNAL(clicked()), this, SLOT(onHelp()));
}
myTabBox->setCurrentPage(0);
}
+void VisuGUI_DeformedShapeDlg::setFactor(double theFactor)
+{
+ double i=0.1;
+ while (1) { // Calculate Step & Precission
+ if ( int (theFactor/i) > 0)
+ break;
+ else {
+ i = i*0.1;
+ }
+ }
+
+ ScalFact->setLineStep(i);
+
+ ScalFact->setValue(theFactor);
+}
+
int VisuGUI_DeformedShapeDlg::storeToPrsObject(VISU::ColoredPrs3d_i* thePrs)
{
if( !isValid() )
anIsOk &= GetScalarPane()->storeToPrsObject( myPrsCopy );
myPrsCopy->SetScale(getFactor());
+
myPrsCopy->ShowColored(isColored());
VISU::TSameAsFactory<VISU::TDEFORMEDSHAPE>().Copy(myPrsCopy, thePrs);
double getFactor()
{ return ScalFact->value(); }
- void setFactor(double theFactor)
- { ScalFact->setValue(theFactor); }
+ void setFactor(double theFactor);
+ // { ScalFact->setValue(theFactor); }
bool isColored()
{ return UseMagn->isChecked(); }
ScaleLabel = new QLabel (tr("LBL_SCALE_FACTOR"), TopGroup, "ScaleLabel");
ScalFact = new QtxDblSpinBox( 1e-20, 1.0E+38, 0.1, TopGroup );
- ScalFact->setPrecision( 5 );
+
+ SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr();
+ int aPrecision = aResourceMgr->integerValue( "VISU", "floating_point_precision", 0 );
+
+ ScalFact->setPrecision( aPrecision*(-1) );
ScalFact->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ) );
ScalFact->setValue( 0.1 );
/*!
Sets Scale factor
*/
-void VisuGUI_VectorsDlg::setScaleFactor( double sf )
+void VisuGUI_VectorsDlg::setScaleFactor( double theFactor )
{
- ScalFact->setValue( sf );
+ double i=0.1;
+ while (1) { // Calculate Step & Precission
+ if ( int (theFactor/i) > 0)
+ break;
+ else {
+ i = i*0.1;
+ }
+ }
+
+ ScalFact->setLineStep(i);
+
+ ScalFact->setValue( theFactor );
}
/*!