From: nds Date: Fri, 10 Aug 2007 09:56:54 +0000 (+0000) Subject: Improving of parameters X-Git-Tag: qt4_porting_delivery_220807~33 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=11edb63994c20baf7d31d3e48813c4ba5b052200;p=modules%2Fgui.git Improving of parameters --- diff --git a/src/Style/Style_Model.cxx b/src/Style/Style_Model.cxx index 894cb344e..64bfa241e 100644 --- a/src/Style/Style_Model.cxx +++ b/src/Style/Style_Model.cxx @@ -31,7 +31,6 @@ Style_Model::Style_Model() { // grp_style group - fillValue( is_defined_style, "is-defined-style", "Predefined Style", grp_style, Bool ); fillValue( defined_style, "defined-style", "Style:", grp_style, Selector ); myPStyles<<"Default"<<"Steel-blue"<<"Dark-green"; // grp_colors group @@ -59,6 +58,7 @@ Style_Model::Style_Model() fillValue( high_wdg_clr, "highlight-widget-color", "Widget center", grp_color ); fillValue( high_brd_wdg_clr, "highligh-brd-widget-color", "Widget border", grp_color ); + fillValue( auto_raising_wdg, "is-raising-widget", "Auto raising widget", grp_color, Bool ); fillValue( pal_high_clr, "highlight-color", "Highlight", grp_color ); fillValue( pal_high_text_clr, "highlight-text-color", "Highlight text", grp_color ); // grp_col_values group @@ -77,24 +77,25 @@ Style_Model::Style_Model() fillValue( lines_type, "lines-type", "Type", grp_lines, Selector ); myLines<<"Horizontal"<<"Incline"; fillValue( lines_clr, "lines-color", "Color", grp_lines, Color ); + fillValue( lines_transp, "lines-transp", "Transparency", grp_lines, DblSpin ); // grp_font group fillValue( font_value, "app-font", "Font", grp_font, Font ); // grp_values group - fillValue( all_antialized, "all-antialized", "All borders antialized", grp_value, Bool ); - fillValue( auto_raising_wdg, "is-raising-widget", "Auto raising widget", grp_value, Bool ); fillValue( edit_rad, "edit-rad", "Rounding of edit", grp_value, DblSpin ); fillValue( btn_rad, "button-rad", "Rounding of button", grp_value, DblSpin ); + fillValue( frame_rad, "frame-rad", "Rounding of frame", grp_value, DblSpin ); fillValue( slider_rad, "slider-rad", "Rounding of slider", grp_value, DblSpin ); fillValue( hor_handle_delta, "hor-hadle-delta", "Hor spacinig of handle ", grp_value, DblSpin ); fillValue( ver_handle_delta, "ver-handle-delta", "Ver spacing of handle", grp_value, DblSpin ); fillValue( split_handle_len, "split-handle-len", "Length of splitter handle", grp_value, DblSpin ); - fillValue( dock_wdg_sep_extent, "dock-widget-sep-extent", "DockWidget separator extent", grp_value, DblSpin ); + fillValue( slider_increase, "slider-increase", "Slider increase", grp_value, IntSpin ); + fillValue( all_antialized, "all-antialized", "All borders antialized", grp_value, Bool ); - fillGroup( grp_style, tab_value, "Predefined style", 2 ); + fillGroup( grp_style, tab_value, "Predefined style", 1 ); fillGroup( grp_color, tab_color, "Colors", 3 ); fillGroup( grp_col_values, tab_color, "ColorValues", 2 ); - fillGroup( grp_lines, tab_value, "Lines", 3 ); + fillGroup( grp_lines, tab_value, "Lines", 2 ); fillGroup( grp_font, tab_value, "Font", 1 ); fillGroup( grp_value, tab_value, "Values", 2 ); @@ -123,7 +124,6 @@ void Style_Model::reset() void Style_Model::setDefaults( QApplication* app ) { - setDefValue( is_defined_style, QVariant( true ) ); setDefValue( defined_style, QVariant( 0 ) ); QPalette aPal = app->palette(); @@ -175,6 +175,7 @@ void Style_Model::setDefaults( QApplication* app ) setDefValue( slider_rad, QVariant( 0 ) ); setDefValue( edit_rad, QVariant( 0 ) ); setDefValue( btn_rad, QVariant( 0 ) ); + setDefValue( frame_rad, QVariant( 0 ) ); setDefValue( slider_increase,QVariant( 2 ) ); setDefValue( all_antialized, QVariant( false ) ); setDefValue( highlight_wdg, QVariant( false ) ); @@ -182,7 +183,6 @@ void Style_Model::setDefaults( QApplication* app ) setDefValue( hor_handle_delta, QVariant( 3 ) ); setDefValue( ver_handle_delta, QVariant( 3 ) ); setDefValue( split_handle_len, QVariant( 20 ) ); - setDefValue( dock_wdg_sep_extent, QVariant( 8 ) ); } void Style_Model::initFromResource( QtxResourceMgr* theResMgr ) @@ -190,10 +190,6 @@ void Style_Model::initFromResource( QtxResourceMgr* theResMgr ) ValuesMap::iterator anIt = myValues.begin(), anEnd = myValues.end(); for ( ; anIt != anEnd; ++anIt ) setValueFrom( theResMgr, anIt.key() ); - - //setValue( is_defined_style, QVariant( false ) ); - if ( getBoolValue( is_defined_style ) ) - setPredefinedStyle( getIntValue( defined_style ) ); } bool Style_Model::updateFromResource( QtxResourceMgr* theResMgr, const QString& thePropName ) @@ -210,8 +206,7 @@ bool Style_Model::updateFromResource( QtxResourceMgr* theResMgr, const QString& return retrieve; setValueFrom( theResMgr, anId ); - if ( ( anId == is_defined_style || anId == defined_style ) - && getBoolValue( is_defined_style ) ) { + if ( anId == defined_style ) { setPredefinedStyle( getIntValue( defined_style ) ); retrieve = true; // update for resources all datas @@ -336,6 +331,7 @@ void Style_Model::setPredefinedStyle( int theType ) setValue( slider_rad, QVariant( 3 ) ); setValue( edit_rad, QVariant( 6 ) ); setValue( btn_rad, QVariant( 10 ) ); + setValue( frame_rad, QVariant( 10 ) ); setValue( slider_increase, QVariant( 5 ) ); setValue( all_antialized, QVariant( false ) ); // true @@ -379,6 +375,7 @@ void Style_Model::setPredefinedStyle( int theType ) setValue( slider_rad, QVariant( 3 ) ); setValue( edit_rad, QVariant( 6 ) ); + setValue( frame_rad, QVariant( 10 ) ); setValue( btn_rad, QVariant( 10 ) ); setValue( slider_increase, QVariant( 6 ) ); setValue( all_antialized, QVariant( false ) ); diff --git a/src/Style/Style_Model.h b/src/Style/Style_Model.h index 11b15063d..c85a709b6 100644 --- a/src/Style/Style_Model.h +++ b/src/Style/Style_Model.h @@ -43,11 +43,11 @@ public: static QString sectionName(); - typedef enum { tab_color, tab_value } Tabs; + typedef enum { tab_value, tab_color } Tabs; typedef enum { grp_style, grp_color, grp_col_values, grp_lines, grp_font, grp_value } Groups; typedef enum { None, Bool, Color, String, IntSpin, DblSpin, Selector, Font } PropType; typedef enum { // grp_style - is_defined_style, defined_style, + defined_style, // grp colors bg_clr, pal_base_clr, header_clr, pal_text_clr, pal_btext_clr, pal_wtext_clr, @@ -55,19 +55,18 @@ public: checked_clr, pointer_clr, tbl_grline_clr, ttip_is_change, ttip_bg_clr, ttip_text_clr, highlight_wdg, high_wdg_clr, high_brd_wdg_clr, - pal_high_clr, pal_high_text_clr, + auto_raising_wdg, pal_high_clr, pal_high_text_clr, // grp_col_values fld_light_clr, fld_dark_clr, pal_light_clr, pal_dark_clr, border_top_clr, border_bot_clr, border_tab_top_clr, border_tab_bot_clr, // grp_lines - is_lines, lines_type, lines_clr, + is_lines, lines_type, lines_clr, lines_transp, // grp_font font_value, // grp_values - all_antialized, auto_raising_wdg, - edit_rad, btn_rad, slider_rad, slider_increase, - hor_handle_delta, ver_handle_delta, split_handle_len, - dock_wdg_sep_extent } Properties; + edit_rad, btn_rad, frame_rad, slider_rad, + hor_handle_delta, ver_handle_delta, + split_handle_len, slider_increase, all_antialized } Properties; void reset(); void setDefaults( QApplication* );