From: mkr Date: Fri, 11 Apr 2008 14:12:01 +0000 (+0000) Subject: Fix for bug IPAL19258 : Qt4 porting. Incorrect view of Preferences: no default color... X-Git-Tag: V5_0_0~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d84882ca7bf1be8a8a684c2c0a55e22215d38cbe;p=modules%2Fvisu.git Fix for bug IPAL19258 : Qt4 porting. Incorrect view of Preferences: no default color; small black square; alignment. --- diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index 91473f3a..a802ab00 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -3013,7 +3013,7 @@ void VisuGUI::createPreferences() int sbarTab = addPreference( tr( "VISU_SCALAR_BAR" ) ); int rangeGr = addPreference( tr( "VISU_SCALAR_RANGE" ), sbarTab ); - setPreferenceProperty( rangeGr, "columns", 4 ); + setPreferenceProperty( rangeGr, "columns", 2 ); int mode = addPreference( tr( "VISU_SCALAR_MODE" ), rangeGr, LightApp_Preferences::Selector, "VISU", "scalar_bar_mode" ); QStringList modes; @@ -3042,7 +3042,7 @@ void VisuGUI::createPreferences() addPreference( tr( "VISU_LOGARITHMIC_SCALING" ), rangeGr, LightApp_Preferences::Bool, "VISU", "scalar_bar_logarithmic" ); int imposedGr = addPreference( tr( "VISU_MINMAX_IMPOSED_RANGE" ), sbarTab ); - setPreferenceProperty( imposedGr, "columns", 2 ); + setPreferenceProperty( imposedGr, "columns", 4 ); int min = addPreference( tr( "VISU_MIN" ), imposedGr, LightApp_Preferences::DblSpin, "VISU", "scalar_range_min" ); int max = addPreference( tr( "VISU_MAX" ), imposedGr, LightApp_Preferences::DblSpin, "VISU", "scalar_range_max" ); @@ -3051,6 +3051,7 @@ void VisuGUI::createPreferences() // group: "Font" int fontGr = addPreference( tr( "VISU_FONT" ), sbarTab ); + setPreferenceProperty( fontGr, "columns", 4 ); int tfont = addPreference( tr( "VISU_TITLE" ), fontGr, LightApp_Preferences::Font, "VISU", "scalar_bar_title_font" ); addPreference( tr( "VISU_TITLE" ), fontGr, @@ -3075,7 +3076,7 @@ void VisuGUI::createPreferences() // group: "Colors & Labels" int colorsLabelsGr = addPreference( tr( "VISU_COLORS_AND_LABELS" ), sbarTab ); - setPreferenceProperty( colorsLabelsGr, "columns", 2 ); + setPreferenceProperty( colorsLabelsGr, "columns", 4 ); int numcol = addPreference( tr( "VISU_NB_COLORS" ), colorsLabelsGr, LightApp_Preferences::IntSpin, "VISU", "scalar_bar_num_colors" ); @@ -3095,6 +3096,7 @@ void VisuGUI::createPreferences() // group: "Orientation" int orientGr = addPreference( tr( "VISU_ORIENTATION" ), sbarTab ); + setPreferenceProperty( orientGr, "columns", 2 ); int orient = addPreference( tr( "VISU_ORIENTATION" ), orientGr, LightApp_Preferences::Selector, "VISU", "scalar_bar_orientation" ); QStringList orients; @@ -3108,7 +3110,7 @@ void VisuGUI::createPreferences() // group: "Origin & Size Vertical" int posVSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_VERTICAL" ), sbarTab ); - setPreferenceProperty( posVSizeGr, "columns", 5 ); + setPreferenceProperty( posVSizeGr, "columns", 10 ); int xv = addPreference( tr( "VISU_X" ), posVSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_x" ); int wv = addPreference( tr( "VISU_WIDTH" ), posVSizeGr, @@ -3163,7 +3165,7 @@ void VisuGUI::createPreferences() // group: "Origin & Size Horizontal" int posHSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_HORIZONTAL" ), sbarTab ); - setPreferenceProperty( posHSizeGr, "columns", 5 ); + setPreferenceProperty( posHSizeGr, "columns", 10 ); int xh = addPreference( tr( "VISU_X" ), posHSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_x" ); int wh = addPreference( tr( "VISU_WIDTH" ), posHSizeGr, @@ -3237,7 +3239,7 @@ void VisuGUI::createPreferences() // group: "Sweeping preferences" int sweepGr = addPreference( tr( "VISU_SWEEPING_PREF" ), srangeTab ); - setPreferenceProperty( sweepGr, "columns", 1 ); + setPreferenceProperty( sweepGr, "columns", 2 ); int modeSw = addPreference( tr( "VISU_SWEEPING_MODES" ), sweepGr, LightApp_Preferences::Selector, "VISU", "sweeping_modes" ); QStringList sweep_modes; @@ -3275,7 +3277,7 @@ void VisuGUI::createPreferences() // group: "Animation preferences" int animationGr = addPreference( tr( "Animation preferences" ), srangeTab ); - setPreferenceProperty( animationGr, "columns", 1 ); + setPreferenceProperty( animationGr, "columns", 3 ); int speed = addPreference( tr( "Speed" ), animationGr, LightApp_Preferences::IntSpin, "VISU", "speed" ); addPreference( tr( "Cycled animation" ), animationGr, LightApp_Preferences::Bool, "VISU", "cycled_animation" ); @@ -3289,6 +3291,7 @@ void VisuGUI::createPreferences() int representationTab = addPreference( tr( "Representation" ) ); int representGr = addPreference( tr( "VISU_REPRESENT_PROPS" ), representationTab ); + setPreferenceProperty( representGr, "columns", 2 ); QStringList mesh_modes; mesh_modes.append( "Points" ); @@ -3380,7 +3383,7 @@ void VisuGUI::createPreferences() int cacheTab = addPreference( tr( "3D Cache" ) ); int cacheGr = addPreference( tr( "VISU_3DCACHE_PROPS" ), cacheTab ); - setPreferenceProperty( cacheGr, "columns", 1 ); + setPreferenceProperty( cacheGr, "columns", 2 ); int memory_mode = addPreference( tr( "VISU_MEMORY_MODE" ), cacheGr, LightApp_Preferences::Selector, "VISU", "cache_memory_mode" ); diff --git a/src/VISUGUI/VisuGUI_Module.cxx b/src/VISUGUI/VisuGUI_Module.cxx index 238a659c..d2a59a73 100644 --- a/src/VISUGUI/VisuGUI_Module.cxx +++ b/src/VISUGUI/VisuGUI_Module.cxx @@ -450,7 +450,7 @@ createGaussPointsPreferences() { int gaussTab = addPreference( tr( "VISU_GAUSS_PREF_TAB_TTL" ) ); int primitiveGr = addPreference( tr( "VISU_GAUSS_PREF_PRIMITIVE_GROUP_TTL" ), gaussTab ); - setPreferenceProperty( primitiveGr, "columns", 1 ); + setPreferenceProperty( primitiveGr, "columns", 2 ); int primitiveTypePref = addPreference( tr( "VISU_GAUSS_PREF_PRIMITIVE_TYPE" ), primitiveGr, LightApp_Preferences::Selector, "VISU", @@ -496,7 +496,7 @@ createGaussPointsPreferences() setPreferenceProperty( faceLimitPref, "max", 1000000 ); int sizeGr = addPreference( tr( "VISU_GAUSS_PREF_SIZE_GROUP_TTL" ), gaussTab ); - setPreferenceProperty( sizeGr, "columns", 2 ); + setPreferenceProperty( sizeGr, "columns", 4 ); int minSizePref = addPreference( tr( "VISU_GAUSS_PREF_MIN_SIZE" ), sizeGr, LightApp_Preferences::IntSpin, "VISU", "point_sprite_min_size" ); @@ -521,7 +521,7 @@ createGaussPointsPreferences() setPreferenceProperty( incrementPref, "step", 0.1 ); int geomGr = addPreference( tr( "VISU_GAUSS_PREF_GEOM_GROUP_TTL" ), gaussTab ); - setPreferenceProperty( geomGr, "columns", 1 ); + setPreferenceProperty( geomGr, "columns", 2 ); int sizePref = addPreference( tr( "VISU_GAUSS_PREF_SIZE" ), geomGr, LightApp_Preferences::IntSpin, "VISU", "point_sprite_size" ); @@ -533,7 +533,7 @@ createGaussPointsPreferences() // ScalarBar Preferences int scalarBarGr = addPreference( tr( "VISU_GAUSS_SCALAR_BAR_PREF_GROUP_TTL" ), gaussTab ); - setPreferenceProperty( scalarBarGr, "columns", 1 ); + setPreferenceProperty( scalarBarGr, "columns", 2 ); int activeBarPref = addPreference( tr( "VISU_GAUSS_PREF_ACTIVE_BAR" ), scalarBarGr, LightApp_Preferences::Selector, "VISU", "scalar_bar_active_local" ); @@ -578,7 +578,7 @@ createInsideCursorPreferences() int insideCursorTab = addPreference( tr( "VISU_GAUSS_INSIDE_CURSOR_PREF_TAB_TTL" ) ); int primitiveGr = addPreference( tr( "VISU_GAUSS_PREF_PRIMITIVE_GROUP_TTL" ), insideCursorTab ); - setPreferenceProperty( primitiveGr, "columns", 1 ); + setPreferenceProperty( primitiveGr, "columns", 2 ); int primitiveTypePref = addPreference( tr( "VISU_GAUSS_PREF_PRIMITIVE_TYPE" ), primitiveGr, LightApp_Preferences::Selector, "VISU", @@ -626,7 +626,7 @@ createInsideCursorPreferences() setPreferenceProperty( faceLimitPref, "max", 1000000 ); int sizeGr = addPreference( tr( "VISU_GAUSS_PREF_SIZE_GROUP_TTL" ), insideCursorTab ); - setPreferenceProperty( sizeGr, "columns", 2 ); + setPreferenceProperty( sizeGr, "columns", 4 ); int minSizePref = addPreference( tr( "VISU_GAUSS_PREF_MIN_SIZE" ), sizeGr, LightApp_Preferences::IntSpin, "VISU", @@ -641,7 +641,7 @@ createInsideCursorPreferences() setPreferenceProperty( maxSizePref, "max", 100 ); int magnificationGr = addPreference( tr( "VISU_GAUSS_PREF_MAGNIFICATION_GROUP_TTL" ), insideCursorTab ); - setPreferenceProperty( magnificationGr, "columns", 2 ); + setPreferenceProperty( magnificationGr, "columns", 4 ); int magnificationPref = addPreference( tr( "VISU_GAUSS_PREF_MAGNIFICATION" ), magnificationGr, LightApp_Preferences::IntSpin, "VISU", @@ -666,7 +666,7 @@ 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 ); + setPreferenceProperty( primitiveGr, "columns", 2 ); int primitiveTypePref = addPreference( tr( "VISU_GAUSS_PREF_PRIMITIVE_TYPE" ), primitiveGr, LightApp_Preferences::Selector, "VISU", @@ -714,6 +714,7 @@ createOutsideCursorPreferences() setPreferenceProperty( faceLimitPref, "max", 1000000 ); int sizeGr = addPreference( tr( "VISU_GAUSS_PREF_SIZE_GROUP_TTL" ), outsideCursorTab ); + setPreferenceProperty( sizeGr, "columns", 2 ); int sizePref = addPreference( tr( "VISU_GAUSS_PREF_SIZE" ), sizeGr, LightApp_Preferences::IntSpin, "VISU", "outside_point_sprite_size" ); @@ -721,7 +722,7 @@ createOutsideCursorPreferences() setPreferenceProperty( sizePref, "max", 100 ); int colorGr = addPreference( tr( "VISU_GAUSS_PREF_COLOR_GROUP_TTL" ), outsideCursorTab ); - setPreferenceProperty( colorGr, "columns", 1 ); + setPreferenceProperty( colorGr, "columns", 2 ); addPreference( tr( "VISU_GAUSS_PREF_UNIFORM_COLOR" ), colorGr, LightApp_Preferences::Bool, "VISU", "outside_point_sprite_uniform" ); @@ -740,7 +741,7 @@ createPickingPreferences() // Cursor int cursorGr = addPreference( tr( "VISU_PICKING_PREF_CURSOR_GROUP_TTL" ), pickingTab ); - setPreferenceProperty( cursorGr, "columns", 1 ); + setPreferenceProperty( cursorGr, "columns", 2 ); int cursorSizePref = addPreference( tr( "VISU_PICKING_PREF_CURSOR_SIZE" ), cursorGr, LightApp_Preferences::DblSpin, "VISU", "picking_cursor_size" ); @@ -759,6 +760,7 @@ createPickingPreferences() // Tolerance int toleranceGr = addPreference( tr( "VISU_PICKING_PREF_TOLERANCE_GROUP_TTL" ), pickingTab ); + setPreferenceProperty( toleranceGr, "columns", 2 ); int pointTolerancePref = addPreference( tr( "VISU_PICKING_PREF_POINT_SELECTION_TOLERANCE" ), toleranceGr, LightApp_Preferences::DblSpin, "VISU", "picking_point_tolerance" ); @@ -768,7 +770,7 @@ createPickingPreferences() // Info window int infoWindowGr = addPreference( tr( "VISU_PICKING_PREF_INFO_WINDOW_GROUP_TTL" ), pickingTab ); - setPreferenceProperty( infoWindowGr, "columns", 1 ); + setPreferenceProperty( infoWindowGr, "columns", 2 ); int transparencyPref = addPreference( tr( "VISU_PICKING_PREF_TRANSPARENCY" ), infoWindowGr, LightApp_Preferences::IntSpin, "VISU", "picking_transparency" ); @@ -789,7 +791,7 @@ createPickingPreferences() // Camera int cameraGr = addPreference( tr( "VISU_PICKING_PREF_CAMERA_GROUP_TTL" ), pickingTab ); - setPreferenceProperty( cameraGr, "columns", 1 ); + setPreferenceProperty( cameraGr, "columns", 2 ); int zoomFactorPref = addPreference( tr( "VISU_PICKING_PREF_ZOOM_FACTOR" ), cameraGr, LightApp_Preferences::DblSpin, "VISU", "picking_zoom_factor" ); @@ -819,6 +821,7 @@ createSpaceMousePreferences() int mouseTab = addPreference( tr( "VISU_MOUSE_PREF_TAB_TLT" ) ); int mouseGr = addPreference( tr( "VISU_MOUSE_PREF_GROUP_TLT" ), mouseTab ); + setPreferenceProperty( mouseGr, "columns", 2 ); int mousePref = addPreference( tr( "VISU_MOUSE_PREF" ), mouseGr, LightApp_Preferences::Selector, "VISU", "mouse_behaviour" ); QStringList values; @@ -831,12 +834,13 @@ createSpaceMousePreferences() setPreferenceProperty( mousePref, "indexes", indices ); int keybrdGr = addPreference( tr( "VISU_KEYBOARD_PREF_GROUP_TTL" ), mouseTab ); + setPreferenceProperty( keybrdGr, "columns", 2 ); int keybrdPref = addPreference( tr( "VISU_KEYBOARD_PREF" ), keybrdGr, LightApp_Preferences::IntSpin, "VISU", "speed_increment" ); setPreferenceProperty( keybrdPref, "max", 1000 ); int spacemouseGr = addPreference( tr( "VISU_SPACEMOUSE_PREF" ), mouseTab ); - setPreferenceProperty( spacemouseGr, "columns", 1 ); + setPreferenceProperty( spacemouseGr, "columns", 2 ); int spacemousePref1 = addPreference( tr( "VISU_SPACEMOUSE_PREF_1" ), spacemouseGr, LightApp_Preferences::Selector, "VISU", "spacemouse_func1_btn" ); //decrease_speed_increment @@ -897,7 +901,7 @@ createRecorderPreferences() int recorderTab = addPreference( tr( "VISU_RECORDER_PREF_TAB_TTL" ) ); int recorderGr = addPreference( tr( "VISU_RECORDER_PREF_GROUP_TTL" ), recorderTab ); - setPreferenceProperty( recorderGr, "columns", 1 ); + setPreferenceProperty( recorderGr, "columns", 2 ); int modePref = addPreference( tr( "VISU_RECORDER_PREF_RECORDING_MODE" ), recorderGr, LightApp_Preferences::Selector, "VISU", "recorder_mode" );