summaryrefslogtreecommitdiffabout
path: root/microkde/kresources/resource.cpp
Side-by-side diff
Diffstat (limited to 'microkde/kresources/resource.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kresources/resource.cpp14
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
@@ -34,16 +34,17 @@ class Resource::ResourcePrivate
public:
#ifdef QT_THREAD_SUPPORT
QMutex mMutex;
#endif
int mOpenCount;
QString mType;
QString mIdentifier;
bool mReadOnly;
+ bool mIncludeInSync;
QString mName;
bool mActive;
bool mIsOpen;
};
Resource::Resource( const KConfig* config )
: QObject( 0, "" ), d( new ResourcePrivate )
{
@@ -58,40 +59,41 @@ Resource::Resource( const KConfig* config )
// such that group info not available on win32 plugins
// to fix that, it would be a looooot of work
if ( !cfg->tempGroup().isEmpty() )
cfg->setGroup( cfg->tempGroup() );
#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 );
}
}
Resource::~Resource()
{
delete d;
d = 0;
}
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 );
}
bool Resource::open()
{
d->mIsOpen = true;
#ifdef QT_THREAD_SUPPORT
@@ -144,16 +146,24 @@ void Resource::setType( const QString& type )
d->mType = type;
}
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;
}
bool Resource::readOnly() const
{
return d->mReadOnly;