]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Outside Cursor Gauss Points preferences
authorouv <ouv@opencascade.com>
Tue, 4 Oct 2005 05:52:37 +0000 (05:52 +0000)
committerouv <ouv@opencascade.com>
Tue, 4 Oct 2005 05:52:37 +0000 (05:52 +0000)
src/VISUGUI/VISUM_msg_en.po
src/VISUGUI/VisuGUI_Module.cxx
src/VVTK/VVTK_SegmentationCursorDlg.cxx

index 9ffb72502518ee4d1359113adfcd4e95d9da2a03..a21956dc34b527cb64c8b6f7839ce5414ca2b25e 100644 (file)
@@ -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"
index ad790e1a37dbeabb94b2b07ea66a05a94e761e94..f61e25ab71203bb222997e1f3827fbb9429b5452 100644 (file)
@@ -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" );
 }
 
 
index 7033e2bbe3573d95ddbb5716e80e2ffd284b4a92..0ee2af0c28a7ff0900633aaa9b5b14c187872960 100644 (file)
@@ -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];