+
+void VisuGUI::createPreferences()
+{
+ int sbarTab = addPreference( tr( "VISU_SCALAR_BAR" ) );
+
+ int fontGr = addPreference( tr( "VISU_FONT" ), sbarTab );
+ int tfont = addPreference( tr( "VISU_TITLE" ), fontGr, SalomeApp_Preferences::Font, "VISU", "scalar_bar_title_font" );
+ addPreference( tr( "VISU_TITLE" ), fontGr, SalomeApp_Preferences::Color, "VISU", "scalar_bar_title_color" );
+ int lfont = addPreference( tr( "VISU_LABELS" ), fontGr, SalomeApp_Preferences::Font, "VISU", "scalar_bar_label_font" );
+ addPreference( tr( "VISU_LABELS" ), fontGr, SalomeApp_Preferences::Color, "VISU", "scalar_bar_label_color" );
+
+ QStringList fam;
+ fam.append( tr( "VISU_FONT_ARIAL" ) );
+ fam.append( tr( "VISU_FONT_COURIER" ) );
+ fam.append( tr( "VISU_FONT_TIMES" ) );
+ int wflag = ( QtxListResourceEdit::FontItem::All & ( ~( QtxListResourceEdit::FontItem::Size | QtxListResourceEdit::FontItem::UserSize ) ) );
+
+ setPreferenceProperty( tfont, "families", fam );
+ setPreferenceProperty( tfont, "system", false );
+ setPreferenceProperty( tfont, "widget_flags", wflag );
+ setPreferenceProperty( lfont, "families", fam );
+ setPreferenceProperty( lfont, "system", false );
+ setPreferenceProperty( lfont, "widget_flags", wflag );
+
+ int colorsLabelsGr = addPreference( tr( "VISU_COLORS_AND_LABELS" ), sbarTab );
+
+ int numcol = addPreference( tr( "VISU_NB_COLORS" ), colorsLabelsGr, SalomeApp_Preferences::IntSpin, "VISU", "scalar_bar_num_colors" );
+ setPreferenceProperty( numcol, "min", 2 );
+ setPreferenceProperty( numcol, "max", 64 );
+
+ int numlab = addPreference( tr( "VISU_NB_LABELS" ), colorsLabelsGr, SalomeApp_Preferences::IntSpin, "VISU", "scalar_bar_num_labels" );
+ setPreferenceProperty( numlab, "min", 2 );
+ setPreferenceProperty( numlab, "max", 65 );
+
+ int orientGr = addPreference( tr( "VISU_ORIENTATION" ), sbarTab );
+ int orient = addPreference( tr( "VISU_ORIENTATION" ), orientGr, SalomeApp_Preferences::Selector, "VISU", "scalar_bar_orientation" );
+ QStringList orients;
+ orients.append( tr( "VISU_VERTICAL" ) );
+ orients.append( tr( "VISU_HORIZONTAL" ) );
+ QValueList<QVariant> indices;
+ indices.append( 0 );
+ indices.append( 1 );
+ setPreferenceProperty( orient, "strings", orients );
+ setPreferenceProperty( orient, "indexes", indices );
+
+ int posVSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_VERTICAL" ), sbarTab );
+ int xv = addPreference( tr( "VISU_X" ), posVSizeGr, SalomeApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_x" );
+ int yv = addPreference( tr( "VISU_Y" ), posVSizeGr, SalomeApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_y" );
+ int wv = addPreference( tr( "VISU_WIDTH" ), posVSizeGr, SalomeApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_width" );
+ int hv = addPreference( tr( "VISU_HEIGHT" ), posVSizeGr, SalomeApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_height" );
+ setPreferenceProperty( xv, "step", 0.1 );
+ setPreferenceProperty( yv, "step", 0.1 );
+ setPreferenceProperty( wv, "step", 0.1 );
+ setPreferenceProperty( hv, "step", 0.1 );
+ setPreferenceProperty( xv, "min", 0.0 );
+ setPreferenceProperty( yv, "min", 0.0 );
+ setPreferenceProperty( wv, "min", 0.0 );
+ setPreferenceProperty( hv, "min", 0.0 );
+ setPreferenceProperty( xv, "max", 1.0 );
+ setPreferenceProperty( yv, "max", 1.0 );
+ setPreferenceProperty( wv, "max", 1.0 );
+ setPreferenceProperty( hv, "max", 1.0 );
+
+ int posHSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_HORIZONTAL" ), sbarTab );
+ int xh = addPreference( tr( "VISU_X" ), posHSizeGr, SalomeApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_x" );
+ int yh = addPreference( tr( "VISU_Y" ), posHSizeGr, SalomeApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_y" );
+ int wh = addPreference( tr( "VISU_WIDTH" ), posHSizeGr, SalomeApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_width" );
+ int hh = addPreference( tr( "VISU_HEIGHT" ), posHSizeGr, SalomeApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_height" );
+ setPreferenceProperty( xh, "step", 0.1 );
+ setPreferenceProperty( yh, "step", 0.1 );
+ setPreferenceProperty( wh, "step", 0.1 );
+ setPreferenceProperty( hh, "step", 0.1 );
+ setPreferenceProperty( xh, "min", 0.0 );
+ setPreferenceProperty( yh, "min", 0.0 );
+ setPreferenceProperty( wh, "min", 0.0 );
+ setPreferenceProperty( hh, "min", 0.0 );
+ setPreferenceProperty( xh, "max", 1.0 );
+ setPreferenceProperty( yh, "max", 1.0 );
+ setPreferenceProperty( wh, "max", 1.0 );
+ setPreferenceProperty( hh, "max", 1.0 );
+
+ int srangeTab = addPreference( tr( "Scalar range, Sweep, MED import" ) );
+
+ int rangeGr = addPreference( tr( "VISU_SCALAR_RANGE" ), srangeTab );
+ setPreferenceProperty( rangeGr, "columns", 1 );
+
+ int mode = addPreference( tr( "VISU_SCALAR_MODE" ), rangeGr, SalomeApp_Preferences::Selector, "VISU", "scalar_bar_mode" );
+ QStringList modes;
+ modes.append( tr( "VISU_MODULUS" ) );
+ modes.append( tr( "VISU_COMPONENT" ) + tr("1") );
+ modes.append( tr( "VISU_COMPONENT" ) + tr("2") );
+ modes.append( tr( "VISU_COMPONENT" ) + tr("3") );
+ indices.clear();
+ indices.append( 0 );
+ indices.append( 1 );
+ indices.append( 2 );
+ indices.append( 3 );
+ setPreferenceProperty( mode, "strings", modes );
+ setPreferenceProperty( mode, "indexes", indices );
+
+ addPreference( tr( "VISU_LOGARITHMIC_SCALING" ), rangeGr, SalomeApp_Preferences::Bool, "VISU", "scalar_bar_logarithmic" );
+
+ int rangetype = addPreference( tr( "VISU_RANGE_TO_USE" ), rangeGr, SalomeApp_Preferences::Selector, "VISU", "scalar_range_type" );
+ QStringList types;
+ types.append( tr( "VISU_FIELD_RANGE" ) );
+ types.append( tr( "VISU_IMPOSED_RANGE" ) );
+ indices.clear();
+ indices.append( 0 );
+ indices.append( 1 );
+ setPreferenceProperty( rangetype, "strings", types );
+ setPreferenceProperty( rangetype, "indexes", indices );
+
+ int imposedGr = addPreference( tr( "VISU_MINMAX_IMPOSED_RANGE" ), srangeTab );
+
+ int min = addPreference( tr( "VISU_MIN" ), imposedGr, SalomeApp_Preferences::DblSpin, "VISU", "scalar_range_min" );
+ int max = addPreference( tr( "VISU_MAX" ), imposedGr, SalomeApp_Preferences::DblSpin, "VISU", "scalar_range_max" );
+ setPreferenceProperty( min, "step", 0.1 );
+ setPreferenceProperty( max, "step", 0.1 );
+
+ int sweepGr = addPreference( tr( "VISU_SWEEPING_PREF" ), srangeTab );
+ setPreferenceProperty( sweepGr, "columns", 1 );
+
+ int timestep = addPreference( tr( "VISU_TIME_STEP" ), sweepGr, SalomeApp_Preferences::DblSpin, "VISU", "sweeping_time_step" );
+ int nbcycles = addPreference( tr( "VISU_NB_CYCLES" ), sweepGr, SalomeApp_Preferences::IntSpin, "VISU", "sweeping_number_cycles" );
+ int nbsteps = addPreference( tr( "VISU_NB_STEPS" ), sweepGr, SalomeApp_Preferences::IntSpin, "VISU", "sweeping_number_steps" );
+ setPreferenceProperty( timestep, "min", 0.1 );
+ setPreferenceProperty( timestep, "step", 0.1 );
+ setPreferenceProperty( timestep, "max", 1000 );
+ setPreferenceProperty( nbcycles, "max", 100 );
+ setPreferenceProperty( nbsteps, "max", 200 );
+
+ int importGr = addPreference( tr( "MED files import" ), srangeTab );
+ addPreference( tr( "Full MED loading" ), importGr, SalomeApp_Preferences::Bool, "VISU", "full_med_loading" );
+}
+
+void VisuGUI::preferencesChanged( const QString&, const QString& )
+{
+}