}
}
*/
+
void VisuGUI::createPreferences()
{
+ // TAB: "Scalar Bar"
int sbarTab = addPreference( tr( "VISU_SCALAR_BAR" ) );
+ // group: "Font"
int fontGr = addPreference( tr( "VISU_FONT" ), sbarTab );
- int tfont = addPreference( tr( "VISU_TITLE" ), fontGr, LightApp_Preferences::Font, "VISU", "scalar_bar_title_font" );
- addPreference( tr( "VISU_TITLE" ), fontGr, LightApp_Preferences::Color, "VISU", "scalar_bar_title_color" );
- int lfont = addPreference( tr( "VISU_LABELS" ), fontGr, LightApp_Preferences::Font, "VISU", "scalar_bar_label_font" );
- addPreference( tr( "VISU_LABELS" ), fontGr, LightApp_Preferences::Color, "VISU", "scalar_bar_label_color" );
+ int tfont = addPreference( tr( "VISU_TITLE" ), fontGr,
+ LightApp_Preferences::Font, "VISU", "scalar_bar_title_font" );
+ addPreference( tr( "VISU_TITLE" ), fontGr,
+ LightApp_Preferences::Color, "VISU", "scalar_bar_title_color" );
+ int lfont = addPreference( tr( "VISU_LABELS" ), fontGr,
+ LightApp_Preferences::Font, "VISU", "scalar_bar_label_font" );
+ addPreference( tr( "VISU_LABELS" ), fontGr,
+ LightApp_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 ) ) );
+ int wflag = ( QtxListResourceEdit::FontItem::All &
+ ( ~( QtxListResourceEdit::FontItem::Size |
+ QtxListResourceEdit::FontItem::UserSize ) ) );
setPreferenceProperty( tfont, "families", fam );
setPreferenceProperty( tfont, "system", false );
setPreferenceProperty( lfont, "system", false );
setPreferenceProperty( lfont, "widget_flags", wflag );
+ // group: "Colors & Labels"
int colorsLabelsGr = addPreference( tr( "VISU_COLORS_AND_LABELS" ), sbarTab );
- int numcol = addPreference( tr( "VISU_NB_COLORS" ), colorsLabelsGr, LightApp_Preferences::IntSpin, "VISU", "scalar_bar_num_colors" );
+ int numcol = addPreference( tr( "VISU_NB_COLORS" ), colorsLabelsGr,
+ LightApp_Preferences::IntSpin, "VISU", "scalar_bar_num_colors" );
setPreferenceProperty( numcol, "min", 2 );
setPreferenceProperty( numcol, "max", 64 );
- int numlab = addPreference( tr( "VISU_NB_LABELS" ), colorsLabelsGr, LightApp_Preferences::IntSpin, "VISU", "scalar_bar_num_labels" );
+ int numlab = addPreference( tr( "VISU_NB_LABELS" ), colorsLabelsGr,
+ LightApp_Preferences::IntSpin, "VISU", "scalar_bar_num_labels" );
setPreferenceProperty( numlab, "min", 2 );
setPreferenceProperty( numlab, "max", 65 );
+ // group: "Orientation"
int orientGr = addPreference( tr( "VISU_ORIENTATION" ), sbarTab );
- int orient = addPreference( tr( "VISU_ORIENTATION" ), orientGr, LightApp_Preferences::Selector, "VISU", "scalar_bar_orientation" );
+ int orient = addPreference( tr( "VISU_ORIENTATION" ), orientGr,
+ LightApp_Preferences::Selector, "VISU", "scalar_bar_orientation" );
QStringList orients;
orients.append( tr( "VISU_VERTICAL" ) );
orients.append( tr( "VISU_HORIZONTAL" ) );
setPreferenceProperty( orient, "strings", orients );
setPreferenceProperty( orient, "indexes", indices );
+ // group: "Origin & Size Vertical"
int posVSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_VERTICAL" ), sbarTab );
- int xv = addPreference( tr( "VISU_X" ), posVSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_x" );
- int yv = addPreference( tr( "VISU_Y" ), posVSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_y" );
- int wv = addPreference( tr( "VISU_WIDTH" ), posVSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_width" );
- int hv = addPreference( tr( "VISU_HEIGHT" ), posVSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_height" );
+ int xv = addPreference( tr( "VISU_X" ), posVSizeGr,
+ LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_x" );
+ int yv = addPreference( tr( "VISU_Y" ), posVSizeGr,
+ LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_y" );
+ int wv = addPreference( tr( "VISU_WIDTH" ), posVSizeGr,
+ LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_width" );
+ int hv = addPreference( tr( "VISU_HEIGHT" ), posVSizeGr,
+ LightApp_Preferences::DblSpin, "VISU", "scalar_bar_vertical_height" );
setPreferenceProperty( xv, "step", 0.1 );
setPreferenceProperty( yv, "step", 0.1 );
setPreferenceProperty( wv, "step", 0.1 );
setPreferenceProperty( wv, "max", 1.0 );
setPreferenceProperty( hv, "max", 1.0 );
+ // group: "Origin & Size Horizontal"
int posHSizeGr = addPreference( tr( "VISU_ORIGIN_AND_SIZE" ) + " " + tr( "VISU_HORIZONTAL" ), sbarTab );
- int xh = addPreference( tr( "VISU_X" ), posHSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_x" );
- int yh = addPreference( tr( "VISU_Y" ), posHSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_y" );
- int wh = addPreference( tr( "VISU_WIDTH" ), posHSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_width" );
- int hh = addPreference( tr( "VISU_HEIGHT" ), posHSizeGr, LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_height" );
+ int xh = addPreference( tr( "VISU_X" ), posHSizeGr,
+ LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_x" );
+ int yh = addPreference( tr( "VISU_Y" ), posHSizeGr,
+ LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_y" );
+ int wh = addPreference( tr( "VISU_WIDTH" ), posHSizeGr,
+ LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_width" );
+ int hh = addPreference( tr( "VISU_HEIGHT" ), posHSizeGr,
+ LightApp_Preferences::DblSpin, "VISU", "scalar_bar_horizontal_height" );
setPreferenceProperty( xh, "step", 0.1 );
setPreferenceProperty( yh, "step", 0.1 );
setPreferenceProperty( wh, "step", 0.1 );
setPreferenceProperty( wh, "max", 1.0 );
setPreferenceProperty( hh, "max", 1.0 );
+ // group: "Scalar bars default position"
int scalarBarGr = addPreference( tr( "Scalar bars default position" ), sbarTab );
- addPreference( tr( "Arrange Scalar Bars" ), scalarBarGr, LightApp_Preferences::Bool, "VISU", "scalar_bars_default_position" );
+ addPreference( tr( "Arrange Scalar Bars" ), scalarBarGr,
+ LightApp_Preferences::Bool, "VISU", "scalar_bars_default_position" );
- int srangeTab = addPreference( tr( "Scalar range, Sweep, MED import" ) );
+ // TAB: "Scalar range, Sweep, MED import, Shading"
+ int srangeTab = addPreference( tr( "VISU_PREF_SECOND_TAB" ) );
+ // group: "Scalar range"
int rangeGr = addPreference( tr( "VISU_SCALAR_RANGE" ), srangeTab );
setPreferenceProperty( rangeGr, "columns", 1 );
- int mode = addPreference( tr( "VISU_SCALAR_MODE" ), rangeGr, LightApp_Preferences::Selector, "VISU", "scalar_bar_mode" );
+ int mode = addPreference( tr( "VISU_SCALAR_MODE" ), rangeGr,
+ LightApp_Preferences::Selector, "VISU", "scalar_bar_mode" );
QStringList modes;
modes.append( tr( "VISU_MODULUS" ) );
modes.append( tr( "VISU_COMPONENT" ) + tr("1") );
setPreferenceProperty( mode, "strings", modes );
setPreferenceProperty( mode, "indexes", indices );
- addPreference( tr( "VISU_LOGARITHMIC_SCALING" ), rangeGr, LightApp_Preferences::Bool, "VISU", "scalar_bar_logarithmic" );
+ addPreference( tr( "VISU_LOGARITHMIC_SCALING" ), rangeGr,
+ LightApp_Preferences::Bool, "VISU", "scalar_bar_logarithmic" );
- int rangetype = addPreference( tr( "VISU_RANGE_TO_USE" ), rangeGr, LightApp_Preferences::Selector, "VISU", "scalar_range_type" );
+ int rangetype = addPreference( tr( "VISU_RANGE_TO_USE" ), rangeGr,
+ LightApp_Preferences::Selector, "VISU", "scalar_range_type" );
QStringList types;
types.append( tr( "VISU_FIELD_RANGE" ) );
types.append( tr( "VISU_IMPOSED_RANGE" ) );
setPreferenceProperty( rangetype, "strings", types );
setPreferenceProperty( rangetype, "indexes", indices );
+ // group: "Min and max for imposed range"
int imposedGr = addPreference( tr( "VISU_MINMAX_IMPOSED_RANGE" ), srangeTab );
- 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" );
+ 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" );
setPreferenceProperty( min, "step", 0.1 );
setPreferenceProperty( max, "step", 0.1 );
+ // group: "Sweeping preferences"
int sweepGr = addPreference( tr( "VISU_SWEEPING_PREF" ), srangeTab );
setPreferenceProperty( sweepGr, "columns", 1 );
- int timestep = addPreference( tr( "VISU_TIME_STEP" ), sweepGr, LightApp_Preferences::DblSpin, "VISU", "sweeping_time_step" );
- int nbcycles = addPreference( tr( "VISU_NB_CYCLES" ), sweepGr, LightApp_Preferences::IntSpin, "VISU", "sweeping_number_cycles" );
- int nbsteps = addPreference( tr( "VISU_NB_STEPS" ), sweepGr, LightApp_Preferences::IntSpin, "VISU", "sweeping_number_steps" );
+ int timestep = addPreference( tr( "VISU_TIME_STEP" ), sweepGr,
+ LightApp_Preferences::DblSpin, "VISU", "sweeping_time_step" );
+ int nbcycles = addPreference( tr( "VISU_NB_CYCLES" ), sweepGr,
+ LightApp_Preferences::IntSpin, "VISU", "sweeping_number_cycles" );
+ int nbsteps = addPreference( tr( "VISU_NB_STEPS" ), sweepGr,
+ LightApp_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, LightApp_Preferences::Bool, "VISU", "full_med_loading" );
+ // group: "MED files import"
+ int importGr = addPreference( tr( "VISU_PREF_MED_IMPORT" ), srangeTab );
+ addPreference( tr( "VISU_PREF_MED_FULL_LOAD" ), importGr,
+ LightApp_Preferences::Bool, "VISU", "full_med_loading" );
+
+ // group: "Representation properties"
+ int representGr = addPreference( tr( "VISU_PREF_REPRESENT_PROPS" ), srangeTab );
+ addPreference( tr( "VISU_PREF_SHADING" ), representGr,
+ LightApp_Preferences::Bool, "VISU", "represent_shading" );
}
void VisuGUI::preferencesChanged( const QString&, const QString& )