Moved exception loading from oxygenfactory to oxygenconfiguration.
svn path=/trunk/KDE/kdebase/workspace/; revision=1195628
This commit is contained in:
parent
ffb9a588b2
commit
97cf4863ff
3 changed files with 22 additions and 8 deletions
|
@ -25,6 +25,7 @@
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "oxygenconfiguration.h"
|
#include "oxygenconfiguration.h"
|
||||||
|
#include "oxygenexception.h"
|
||||||
|
|
||||||
#include <KLocale>
|
#include <KLocale>
|
||||||
|
|
||||||
|
@ -151,6 +152,19 @@ namespace Oxygen
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//__________________________________________________
|
||||||
|
void Configuration::readException( const Exception& exception )
|
||||||
|
{
|
||||||
|
// propagate all features found in mask to the output configuration
|
||||||
|
if( exception.mask() & Exception::FrameBorder ) setFrameBorder( exception.frameBorder() );
|
||||||
|
if( exception.mask() & Exception::BlendColor ) setBlendColor( exception.blendColor() );
|
||||||
|
if( exception.mask() & Exception::DrawSeparator ) setSeparatorMode( exception.separatorMode() );
|
||||||
|
if( exception.mask() & Exception::TitleOutline ) setDrawTitleOutline( exception.drawTitleOutline() );
|
||||||
|
if( exception.mask() & Exception::SizeGripMode ) setSizeGripMode( exception.sizeGripMode() );
|
||||||
|
setHideTitleBar( exception.hideTitleBar() );
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//__________________________________________________
|
//__________________________________________________
|
||||||
void Configuration::write( KConfigGroup& group ) const
|
void Configuration::write( KConfigGroup& group ) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,6 +55,10 @@ namespace OxygenConfig
|
||||||
namespace Oxygen
|
namespace Oxygen
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// forward declaration
|
||||||
|
class Exception;
|
||||||
|
|
||||||
|
//! stores all configuration options needed for decoration appearance
|
||||||
class Configuration
|
class Configuration
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -140,6 +144,9 @@ namespace Oxygen
|
||||||
//! equal to operator
|
//! equal to operator
|
||||||
bool operator == ( const Configuration& ) const;
|
bool operator == ( const Configuration& ) const;
|
||||||
|
|
||||||
|
//! propagate all features found in exception mask to this configuration
|
||||||
|
void readException( const Exception& );
|
||||||
|
|
||||||
//! write to kconfig group
|
//! write to kconfig group
|
||||||
virtual void write( KConfigGroup& ) const;
|
virtual void write( KConfigGroup& ) const;
|
||||||
|
|
||||||
|
|
|
@ -274,14 +274,7 @@ namespace Oxygen
|
||||||
if( iter->regExp().indexIn( value ) < 0 ) continue;
|
if( iter->regExp().indexIn( value ) < 0 ) continue;
|
||||||
|
|
||||||
Configuration configuration( defaultConfiguration() );
|
Configuration configuration( defaultConfiguration() );
|
||||||
|
configuration.readException( *iter );
|
||||||
// propagate all features found in mask to the output configuration
|
|
||||||
if( iter->mask() & Exception::FrameBorder ) configuration.setFrameBorder( iter->frameBorder() );
|
|
||||||
if( iter->mask() & Exception::BlendColor ) configuration.setBlendColor( iter->blendColor() );
|
|
||||||
if( iter->mask() & Exception::DrawSeparator ) configuration.setSeparatorMode( iter->separatorMode() );
|
|
||||||
if( iter->mask() & Exception::TitleOutline ) configuration.setDrawTitleOutline( iter->drawTitleOutline() );
|
|
||||||
if( iter->mask() & Exception::SizeGripMode ) configuration.setSizeGripMode( iter->sizeGripMode() );
|
|
||||||
configuration.setHideTitleBar( iter->hideTitleBar() );
|
|
||||||
return configuration;
|
return configuration;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue