From: ouv Date: Tue, 4 Oct 2005 05:52:37 +0000 (+0000) Subject: Outside Cursor Gauss Points preferences X-Git-Tag: BR-D5-38-2003_D2005-12-10~78 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e36311b0d1550126b1cf02dce3286626344b1071;p=modules%2Fvisu.git Outside Cursor Gauss Points preferences --- diff --git a/src/VISUGUI/VISUM_msg_en.po b/src/VISUGUI/VISUM_msg_en.po index 9ffb7250..a21956dc 100644 --- a/src/VISUGUI/VISUM_msg_en.po +++ b/src/VISUGUI/VISUM_msg_en.po @@ -88,6 +88,8 @@ msgstr "Spacing" msgid "VisuGUI_Module::VISU_GAUSS_OUTSIDE_CURSOR_PREF_TAB_TTL" msgstr "Outside Cursor Gauss Points" +msgid "VisuGUI_Module::VISU_GAUSS_PREF_COLOR_GROUP_TTL" +msgstr "Color" msgid "VisuGUI_Module::VISU_MOUSE_PREF_TAB_TLT" msgstr "Spacemouse" diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index ad790e1a..f61e25ab 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -442,6 +442,37 @@ VisuGUI_Module ::createOutsideCursorPreferences() { int outsideCursorTab = addPreference( tr( "VISU_GAUSS_OUTSIDE_CURSOR_PREF_TAB_TTL" ) ); + + int primitiveGr = addPreference( tr( "VISU_GAUSS_PREF_PRIMITIVE_GROUP_TTL" ), outsideCursorTab ); + setPreferenceProperty( primitiveGr, "columns", 1 ); + + int clampPref = addPreference( tr( "VISU_GAUSS_PREF_CLAMP" ), primitiveGr, + SalomeApp_Preferences::IntSpin, "VISU", "outside_point_sprite_clamp" ); + setPreferenceProperty( clampPref, "min", 1 ); + setPreferenceProperty( clampPref, "max", 512 ); + + int mainTexturePref = addPreference( tr( "VISU_GAUSS_PREF_MAIN_TEXTURE" ), primitiveGr, + SalomeApp_Preferences::File, "VISU", "outside_point_sprite_main_texture" ); + + int alphaTexturePref = addPreference( tr( "VISU_GAUSS_PREF_ALPHA_TEXTURE" ), primitiveGr, + SalomeApp_Preferences::File, "VISU", "outside_point_sprite_alpha_texture" ); + + int alphaThresholdPref = addPreference( tr( "VISU_GAUSS_PREF_ALPHA_THRESHOLD" ), primitiveGr, + SalomeApp_Preferences::DblSpin, "VISU", "outside_point_sprite_alpha_threshold" ); setPreferenceProperty( alphaThresholdPref, "min", 0.0 ); + setPreferenceProperty( alphaThresholdPref, "max", 1.0 ); + setPreferenceProperty( alphaThresholdPref, "step", 0.1 ); + + int sizeGr = addPreference( tr( "VISU_GAUSS_PREF_SIZE_GROUP_TTL" ), outsideCursorTab ); + + int sizePref = addPreference( tr( "VISU_GAUSS_PREF_SIZE" ), sizeGr, + SalomeApp_Preferences::IntSpin, "VISU", "outside_point_sprite_size" ); + setPreferenceProperty( sizePref, "min", 1 ); + setPreferenceProperty( sizePref, "max", 100 ); + + int colorGr = addPreference( tr( "VISU_GAUSS_PREF_COLOR_GROUP_TTL" ), outsideCursorTab ); + + int colorPref = addPreference( tr( "VISU_GAUSS_PREF_COLOR" ), colorGr, + SalomeApp_Preferences::Color, "VISU", "outside_point_sprite_color" ); } diff --git a/src/VVTK/VVTK_SegmentationCursorDlg.cxx b/src/VVTK/VVTK_SegmentationCursorDlg.cxx index 7033e2bb..0ee2af0c 100644 --- a/src/VVTK/VVTK_SegmentationCursorDlg.cxx +++ b/src/VVTK/VVTK_SegmentationCursorDlg.cxx @@ -400,8 +400,10 @@ void VVTK_SegmentationCursorDlg::onColorButtonPressed() void VVTK_SegmentationCursorDlg::UpdateOutsideCursor() { float aClamp = 200.0; - QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp"; - QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp"; + //QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_texture.bmp"; + //QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/sprite_alpha.bmp"; + QString aMainTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/smile.bmp"; + QString anAlphaTexture = QString( getenv( "VISU_ROOT_DIR") ) + "/share/salome/resources/smile.bmp"; float anAlphaThreshold = 0.1; float aSize = 0.25; QColor aColor = Qt::blue; @@ -424,22 +426,22 @@ void VVTK_SegmentationCursorDlg::UpdateOutsideCursor() SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr(); - aClamp = aResourceMgr->doubleValue( "VISU", "point_sprite_clamp", aClamp ); + aClamp = aResourceMgr->doubleValue( "VISU", "outside_point_sprite_clamp", aClamp ); myClampSpinBox->setValue( aClamp ); - myMainTexture = aResourceMgr->stringValue( "VISU", "point_sprite_main_texture", aMainTexture ); + myMainTexture = aResourceMgr->stringValue( "VISU", "outside_point_sprite_main_texture", aMainTexture ); myMainTextureLineEdit->setText( myMainTexture.section( '/', -1 ) ); - myAlphaTexture = aResourceMgr->stringValue( "VISU", "point_sprite_alpha_texture", anAlphaTexture ); + myAlphaTexture = aResourceMgr->stringValue( "VISU", "outside_point_sprite_alpha_texture", anAlphaTexture ); myAlphaTextureLineEdit->setText( myAlphaTexture.section( '/', -1 ) ); - anAlphaThreshold = aResourceMgr->doubleValue( "VISU", "point_sprite_alpha_threshold", anAlphaThreshold ); + anAlphaThreshold = aResourceMgr->doubleValue( "VISU", "outside_point_sprite_alpha_threshold", anAlphaThreshold ); myAlphaThresholdSpinBox->setValue( anAlphaThreshold ); - aSize = aResourceMgr->doubleValue( "VISU", "point_sprite_size", aSize ); - mySizeSpinBox->setValue( aSize * 100.0 ); + aSize = aResourceMgr->doubleValue( "VISU", "outside_point_sprite_size", aSize ); + mySizeSpinBox->setValue( aSize ); - aColor = aResourceMgr->colorValue( "VISU", "point_sprite_color", aColor ); + aColor = aResourceMgr->colorValue( "VISU", "outside_point_sprite_color", aColor ); myColorButton->setPaletteBackgroundColor( aColor ); ApplyOutsideCursor(); @@ -513,7 +515,7 @@ void VVTK_SegmentationCursorDlg::ApplyOutsideCursor() myOutsideCursorSettings->SetClamp( myClampSpinBox->value() ); myOutsideCursorSettings->SetTexture( aTexture ); myOutsideCursorSettings->SetAlphaThreshold( myAlphaThresholdSpinBox->value() ); - myOutsideCursorSettings->SetSize( mySizeSpinBox->value() / 100.0 ); + myOutsideCursorSettings->SetSize( mySizeSpinBox->value() ); QColor aButtonColor = myColorButton->paletteBackgroundColor(); float aColor[3];