summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncprofile.cpp
Side-by-side diff
Diffstat (limited to 'libkdepim/ksyncprofile.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/ksyncprofile.cpp23
1 files changed, 7 insertions, 16 deletions
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp
index e7c35fb..c599208 100644
--- a/libkdepim/ksyncprofile.cpp
+++ b/libkdepim/ksyncprofile.cpp
@@ -1,14 +1,14 @@
/*
- This file is part of KOrganizer.
+ This file is part of KDE-Pim/Pi.
Copyright (c) 2004 Lutz Rogowski <rogowski@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
@@ -53,24 +53,25 @@ KSyncProfile* KSyncProfile::clone()
myClone->setRemoteFileNameAB( mRemoteFileNameAB );
myClone->setShowSummaryAfterSync( mShowSummaryAfterSync );
myClone->setAskForPreferences( mAskForPreferences);
myClone->setWriteBackExisting(mWriteBackExisting );
myClone->setWriteBackFile( mWriteBackFile);
myClone->setWriteBackFuture( mWriteBackFuture );
myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks );
myClone->setIncludeInRingSync( mIncludeInRingSync );
myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB );
myClone->setSyncPrefs( mSyncPrefs);
myClone->setIsLocalFileSync( mIsLocalFileSync );
myClone->setIsPhoneSync( mIsPhoneSync );
+ myClone->setWriteContactToSIM( mWriteContactToSIM );
myClone->setName( "noName" );
//myClone->setIdentifier( "noID" );
return myClone;
}
void KSyncProfile::setDefault()
{
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";
@@ -81,24 +82,25 @@ void KSyncProfile::setDefault()
mShowSummaryAfterSync = true;
mAskForPreferences = true;
mWriteBackExisting = false;
mWriteBackFuture = false;
mWriteBackFutureWeeks = 12;
mWriteBackFile = true;
mIncludeInRingSync = false;
mIncludeInRingSyncAB = false;
mSyncPrefs = SYNC_PREF_ASK;
mIsLocalFileSync = true;
mName = "noName";
mIsPhoneSync = false;
+ mWriteContactToSIM = false;
mPhoneDevice = "/dev/ircomm";
mPhoneConnection = "irda";
mPhoneModel = "6310i";
}
void KSyncProfile::readConfig(KConfig *config )
{
if (config)
{
config->setGroup( mName );
mName = config->readEntry( "Name", mName );
@@ -113,24 +115,26 @@ void KSyncProfile::readConfig(KConfig *config )
mRemoteFileNameAB = config->readEntry( "RemoteFileNameAB", mRemoteFileNameAB );
mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice );
mPhoneConnection = config->readEntry( "PhoneConnection", mPhoneConnection );
mPhoneModel = config->readEntry( "PhoneModel", mPhoneModel );
mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync );
mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences );
mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting );
mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture );
+ mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile );
+ mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM );
mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs );
mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks );
mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync );
mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync );
}
else
{
setDefault();
}
}
void KSyncProfile::deleteConfig(KConfig *config )
@@ -154,33 +158,20 @@ void KSyncProfile::writeConfig( KConfig * config )
config->writeEntry( "RemoteFileNameAB", mRemoteFileNameAB );
config->writeEntry( "PhoneDevice", mPhoneDevice );
config->writeEntry( "PhoneConnection", mPhoneConnection );
config->writeEntry( "PhoneModel", mPhoneModel );
config->writeEntry( "IncludeInRingSync",mIncludeInRingSync );
config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB );
config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync );
config->writeEntry( "AskForPreferences",mAskForPreferences );
config->writeEntry( "WriteBackExisting",mWriteBackExisting );
config->writeEntry( "WriteBackFuture",mWriteBackFuture );
+ config->writeEntry( "WriteBackFile",mWriteBackFile );
+ config->writeEntry( "WriteContactToSIM",mWriteContactToSIM );
config->writeEntry( "SyncPrefs", mSyncPrefs );
config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks);
config->writeEntry( "IsLocalFileSync", mIsLocalFileSync );
config->writeEntry( "IsPhoneSync", mIsPhoneSync );
}
-/*
-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;
-};
-*/