The simplest way it can be done is using static functions of Style_Salome class:
Style_Salome::apply(), Style_Salome::restore()
- \param reset if \c true model is first restores default values of all properties
+ \param reset if \c true model is also initializes preoperties from the application
\sa restore(), fromResources()
\sa Style_Salome class
*/
void Style_Model::fromApplication( bool reset )
{
- if ( reset ) initDefaults();
+ initDefaults();
if ( !QApplication::instance() ) // application object is not created yet
return;
// initialize style properties from the application
+ if ( !reset ) return;
+
// font
myFont = myAppData->myFont;
// colors
void Style_Model::fromResources( QtxResourceMgr* resMgr, const QString& resSection )
{
// init from application
- fromApplication( true );
+ fromApplication( false );
myResourceMgr = resMgr;
myResourceSection = resSection;