X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHGUI%2FSMESHGUI_PropertiesDlg.cxx;h=400a02532f77e09d797a6bbdb724343d35509910;hp=475c84b2ce61e54d02e58f475253f38945aae87b;hb=52f164fb658ee0f92803649489757c52dbcb1ef3;hpb=b0a908c0d20341651771d0249fb10882f54b2aad diff --git a/src/SMESHGUI/SMESHGUI_PropertiesDlg.cxx b/src/SMESHGUI/SMESHGUI_PropertiesDlg.cxx index 475c84b2c..400a02532 100644 --- a/src/SMESHGUI/SMESHGUI_PropertiesDlg.cxx +++ b/src/SMESHGUI/SMESHGUI_PropertiesDlg.cxx @@ -34,6 +34,7 @@ #include #include #include +#include #include #include #include @@ -157,6 +158,8 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark myBallColor = new QtxColorButton( myBallGrp ); QLabel* ballSizeLab = new QLabel( tr( "SIZE" ), myBallGrp ); myBallSize = new QtxIntSpinBox( myBallGrp ); + QLabel* ballScaleLab = new QLabel( tr( "SCALE_FACTOR" ), myBallGrp ); + myBallScale = new QtxDoubleSpinBox( 1e-2, 1e7, 0.5, myBallGrp ); hl = new QHBoxLayout( myBallGrp ); hl->setMargin( MARGIN ); hl->setSpacing( SPACING ); @@ -164,6 +167,8 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark hl->addWidget( myBallColor ); hl->addWidget( ballSizeLab ); hl->addWidget( myBallSize ); + hl->addWidget( ballScaleLab ); + hl->addWidget( myBallScale ); widthLab1 = qMax( widthLab1, ballColorLab->minimumSizeHint().width() ); widthLab2 = qMax( widthLab2, ballSizeLab->minimumSizeHint().width() ); @@ -171,7 +176,7 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark myOrientationGrp = new QGroupBox( tr( "ORIENTATIONS" ), mainFrame() ); QLabel* orientationColorLab = new QLabel( tr( "COLOR" ), myOrientationGrp ); myOrientationColor = new QtxColorButton( myOrientationGrp ); - QLabel* orientationScaleLab = new QLabel( tr( "ORIENTATION_SCALE" ), myOrientationGrp ); + QLabel* orientationScaleLab = new QLabel( tr( "SCALE_FACTOR" ), myOrientationGrp ); myOrientationSize = new QtxIntSpinBox( myOrientationGrp ); myOrientationSize->setSuffix( "% "); myOrientation3d = new QCheckBox( tr("ORIENTATION_3D"), myOrientationGrp ); @@ -236,6 +241,7 @@ SMESHGUI_PropertiesDlg::SMESHGUI_PropertiesDlg( const VTK::MarkerMap& customMark myOutlineWidth->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); myElem0dSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); myBallSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); + myBallScale->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); myOrientationSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); myShrinkSize->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed ); @@ -530,6 +536,24 @@ int SMESHGUI_PropertiesDlg::ballSize() const return myBallSize->value(); } +/*! + \brief Set discrete elements (balls) scale factor + \param size discrete elements (balls) scale factor +*/ +void SMESHGUI_PropertiesDlg::setBallScale( double size ) +{ + myBallScale->setValue( size ); +} + +/*! + \brief Get discrete elements (balls) scale factor + \return current discrete elements (balls) scale factor +*/ +double SMESHGUI_PropertiesDlg::ballScale() const +{ + return myBallScale->value(); +} + /*! \brief Set orientation vectors color \param color orientation vectors color