Diffstat (limited to 'microkde/kresources/resource.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kresources/resource.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/microkde/kresources/resource.cpp b/microkde/kresources/resource.cpp index 4f69540..f79bcd0 100644 --- a/microkde/kresources/resource.cpp +++ b/microkde/kresources/resource.cpp @@ -38,8 +38,9 @@ class Resource::ResourcePrivate int mOpenCount; QString mType; QString mIdentifier; bool mReadOnly; + bool mIncludeInSync; QString mName; bool mActive; bool mIsOpen; }; @@ -62,14 +63,16 @@ Resource::Resource( const KConfig* config ) #endif d->mType = cfg->readEntry( "ResourceType" ); d->mName = cfg->readEntry( "ResourceName" ); d->mReadOnly = cfg->readBoolEntry( "ResourceIsReadOnly", false ); + d->mIncludeInSync = cfg->readBoolEntry( "ResourceIncludeInSync", true );; d->mActive = cfg->readBoolEntry( "ResourceIsActive", true ); d->mIdentifier = cfg->readEntry( "ResourceIdentifier" ); } else { d->mType = "type"; d->mName = "resource-name"; d->mReadOnly = false; + d->mIncludeInSync = true; d->mActive = true; d->mIdentifier = KApplication::randomString( 10 ); } } @@ -81,13 +84,12 @@ Resource::~Resource() } void Resource::writeConfig( KConfig* config ) { - - config->writeEntry( "ResourceType", d->mType ); config->writeEntry( "ResourceName", d->mName ); config->writeEntry( "ResourceIsReadOnly", d->mReadOnly ); + config->writeEntry( "ResourceIncludeInSync", d->mIncludeInSync ); config->writeEntry( "ResourceIsActive", d->mActive ); config->writeEntry( "ResourceIdentifier", d->mIdentifier ); } @@ -148,8 +150,16 @@ QString Resource::type() const { return d->mType; } +void Resource::setIncludeInSync( bool value ) +{ + d->mIncludeInSync = value; +} +bool Resource::includeInSync() const +{ + return d->mIncludeInSync; +} void Resource::setReadOnly( bool value ) { d->mReadOnly = value; } |