summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncprofile.cpp
authorzautrix <zautrix>2004-08-01 14:19:41 (UTC)
committer zautrix <zautrix>2004-08-01 14:19:41 (UTC)
commit3a4186926d078692ad3c2261b70406c391f27554 (patch) (side-by-side diff)
tree6f71c51606a786711ca2885beb8ee20068e3ccd0 /libkdepim/ksyncprofile.cpp
parent43d6cf3619675856333d82ae2fcad6ce81d824b8 (diff)
downloadkdepimpi-3a4186926d078692ad3c2261b70406c391f27554.zip
kdepimpi-3a4186926d078692ad3c2261b70406c391f27554.tar.gz
kdepimpi-3a4186926d078692ad3c2261b70406c391f27554.tar.bz2
Fixed sync config
Diffstat (limited to 'libkdepim/ksyncprofile.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncprofile.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index d6d8fa3..ea41a85 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -23,103 +23,107 @@
#include <qcolor.h>
#include <kconfig.h>
#include <kstandarddirs.h>
#include <kglobal.h>
#include <kdebug.h>
#include "ksyncprofile.h"
KSyncProfile::KSyncProfile( const char * name): QObject (0, name )
{
setDefault();
}
KSyncProfile::~KSyncProfile()
{
}
KSyncProfile* KSyncProfile::clone()
{
KSyncProfile* myClone = new KSyncProfile();
myClone->setPreSyncCommand( mPreSyncCommand );
myClone->setPostSyncCommand( mPostSyncCommand );
myClone->setLocalTempFile( mLocalTempFile);
myClone->setRemoteFileName( mRemoteFileName );
myClone->setShowSummaryAfterSync( mShowSummaryAfterSync );
myClone->setAskForPreferences( mAskForPreferences);
myClone->setWriteBackExisting(mWriteBackExisting );
myClone->setWriteBackFile( mWriteBackFile);
myClone->setIncludeInRingSync( mIncludeInRingSync );
+ myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB );
myClone->setSyncPrefs( mSyncPrefs);
myClone->setIsLocalFileSync( mIsLocalFileSync );
myClone->setName( "noName" );
return myClone;
}
void KSyncProfile::setDefault()
{
mName = "noName";
mPreSyncCommand = i18n("command for downloading remote file to local device");
mPostSyncCommand = i18n("command for uploading local temp file to remote device");
mLocalTempFile = "/tmp/mycalendar.ics";
mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics";
mShowSummaryAfterSync = true;
mAskForPreferences = true;
mWriteBackExisting = false;
mWriteBackFile = true;
mIncludeInRingSync = false;
+ mIncludeInRingSyncAB = false;
mSyncPrefs = SYNC_PREF_ASK;
mIsLocalFileSync = true;
}
void KSyncProfile::readConfig(KConfig *config )
{
config->setGroup("SyncProfiles");
QString prefix = "Profile_"+mName+"_";
//mName = config->readEntry( prefix+ "Name", mName );
mPreSyncCommand = config->readEntry( prefix+ "PreSyncCommand",mPreSyncCommand );
mPostSyncCommand = config->readEntry( prefix+ "PostSyncCommand", mPostSyncCommand );
mIncludeInRingSync = config->readBoolEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
+ mIncludeInRingSyncAB = config->readBoolEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
mLocalTempFile = config->readEntry( prefix+ "LocalTempFile", mLocalTempFile );
mRemoteFileName = config->readEntry( prefix+ "RemoteFileName", mRemoteFileName );
mShowSummaryAfterSync = config->readBoolEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync );
mAskForPreferences = config->readBoolEntry( prefix+ "AskForPreferences",mAskForPreferences );
mWriteBackExisting = config->readBoolEntry( prefix+ "WriteBackExisting",mWriteBackExisting );
mSyncPrefs = config->readNumEntry( prefix+ "SyncPrefs", mSyncPrefs );
mIsLocalFileSync= config->readBoolEntry( prefix+ "IsLocalFileSync", mIsLocalFileSync );
}
void KSyncProfile::writeConfig( KConfig * config )
{
config->setGroup("SyncProfiles");
QString prefix = "Profile_"+mName+"_";
// config->writeEntry( prefix+ "Name", mName );
config->writeEntry( prefix+ "PreSyncCommand",mPreSyncCommand );
config->writeEntry( prefix+ "PostSyncCommand", mPostSyncCommand );
config->writeEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync );
+ config->writeEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB );
config->writeEntry( prefix+ "LocalTempFile", mLocalTempFile );
config->writeEntry( prefix+ "RemoteFileName", mRemoteFileName );
config->writeEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync );
config->writeEntry( prefix+ "AskForPreferences",mAskForPreferences );
config->writeEntry( prefix+ "WriteBackExisting",mWriteBackExisting );
config->writeEntry( prefix+ "SyncPrefs", mSyncPrefs );
config->writeEntry( prefix+ "IsLocalFileSync", mIsLocalFileSync );
}
/*
class KPrefsItemInt : public KPrefsItem {
public:
KPrefsItemInt(const QString &group,const QString &name,int *,int defaultValue=0);
virtual ~KPrefsItemInt() {}
void setDefault();
void readConfig(KConfig *);
void writeConfig(KConfig *);
private:
int *mReference;
int mDefault;
};
*/