-rw-r--r-- | libkdepim/ksyncprofile.cpp | 23 |
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,10 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KDE-Pim/Pi. |
3 | Copyright (c) 2004 Lutz Rogowski <rogowski@kde.org> | 3 | Copyright (c) 2004 Lutz Rogowski <rogowski@kde.org> |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Library General Public | 6 | modify it under the terms of the GNU Library General Public |
7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
@@ -57,16 +57,17 @@ KSyncProfile* KSyncProfile::clone() | |||
57 | myClone->setWriteBackFile( mWriteBackFile); | 57 | myClone->setWriteBackFile( mWriteBackFile); |
58 | myClone->setWriteBackFuture( mWriteBackFuture ); | 58 | myClone->setWriteBackFuture( mWriteBackFuture ); |
59 | myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks ); | 59 | myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks ); |
60 | myClone->setIncludeInRingSync( mIncludeInRingSync ); | 60 | myClone->setIncludeInRingSync( mIncludeInRingSync ); |
61 | myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); | 61 | myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); |
62 | myClone->setSyncPrefs( mSyncPrefs); | 62 | myClone->setSyncPrefs( mSyncPrefs); |
63 | myClone->setIsLocalFileSync( mIsLocalFileSync ); | 63 | myClone->setIsLocalFileSync( mIsLocalFileSync ); |
64 | myClone->setIsPhoneSync( mIsPhoneSync ); | 64 | myClone->setIsPhoneSync( mIsPhoneSync ); |
65 | myClone->setWriteContactToSIM( mWriteContactToSIM ); | ||
65 | myClone->setName( "noName" ); | 66 | myClone->setName( "noName" ); |
66 | //myClone->setIdentifier( "noID" ); | 67 | //myClone->setIdentifier( "noID" ); |
67 | return myClone; | 68 | return myClone; |
68 | } | 69 | } |
69 | 70 | ||
70 | 71 | ||
71 | void KSyncProfile::setDefault() | 72 | void KSyncProfile::setDefault() |
72 | { | 73 | { |
@@ -85,16 +86,17 @@ void KSyncProfile::setDefault() | |||
85 | mWriteBackFutureWeeks = 12; | 86 | mWriteBackFutureWeeks = 12; |
86 | mWriteBackFile = true; | 87 | mWriteBackFile = true; |
87 | mIncludeInRingSync = false; | 88 | mIncludeInRingSync = false; |
88 | mIncludeInRingSyncAB = false; | 89 | mIncludeInRingSyncAB = false; |
89 | mSyncPrefs = SYNC_PREF_ASK; | 90 | mSyncPrefs = SYNC_PREF_ASK; |
90 | mIsLocalFileSync = true; | 91 | mIsLocalFileSync = true; |
91 | mName = "noName"; | 92 | mName = "noName"; |
92 | mIsPhoneSync = false; | 93 | mIsPhoneSync = false; |
94 | mWriteContactToSIM = false; | ||
93 | mPhoneDevice = "/dev/ircomm"; | 95 | mPhoneDevice = "/dev/ircomm"; |
94 | mPhoneConnection = "irda"; | 96 | mPhoneConnection = "irda"; |
95 | mPhoneModel = "6310i"; | 97 | mPhoneModel = "6310i"; |
96 | } | 98 | } |
97 | void KSyncProfile::readConfig(KConfig *config ) | 99 | void KSyncProfile::readConfig(KConfig *config ) |
98 | { | 100 | { |
99 | if (config) | 101 | if (config) |
100 | { | 102 | { |
@@ -117,16 +119,18 @@ void KSyncProfile::readConfig(KConfig *config ) | |||
117 | mPhoneModel = config->readEntry( "PhoneModel", mPhoneModel ); | 119 | mPhoneModel = config->readEntry( "PhoneModel", mPhoneModel ); |
118 | 120 | ||
119 | mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync ); | 121 | mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync ); |
120 | mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); | 122 | mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); |
121 | mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); | 123 | mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); |
122 | mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences ); | 124 | mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences ); |
123 | mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting ); | 125 | mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting ); |
124 | mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture ); | 126 | mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture ); |
127 | mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile ); | ||
128 | mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM ); | ||
125 | mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs ); | 129 | mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs ); |
126 | mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks ); | 130 | mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks ); |
127 | mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync ); | 131 | mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync ); |
128 | mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync ); | 132 | mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync ); |
129 | } | 133 | } |
130 | else | 134 | else |
131 | { | 135 | { |
132 | setDefault(); | 136 | setDefault(); |
@@ -158,29 +162,16 @@ void KSyncProfile::writeConfig( KConfig * config ) | |||
158 | config->writeEntry( "PhoneModel", mPhoneModel ); | 162 | config->writeEntry( "PhoneModel", mPhoneModel ); |
159 | 163 | ||
160 | config->writeEntry( "IncludeInRingSync",mIncludeInRingSync ); | 164 | config->writeEntry( "IncludeInRingSync",mIncludeInRingSync ); |
161 | config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); | 165 | config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); |
162 | config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); | 166 | config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); |
163 | config->writeEntry( "AskForPreferences",mAskForPreferences ); | 167 | config->writeEntry( "AskForPreferences",mAskForPreferences ); |
164 | config->writeEntry( "WriteBackExisting",mWriteBackExisting ); | 168 | config->writeEntry( "WriteBackExisting",mWriteBackExisting ); |
165 | config->writeEntry( "WriteBackFuture",mWriteBackFuture ); | 169 | config->writeEntry( "WriteBackFuture",mWriteBackFuture ); |
170 | config->writeEntry( "WriteBackFile",mWriteBackFile ); | ||
171 | config->writeEntry( "WriteContactToSIM",mWriteContactToSIM ); | ||
166 | config->writeEntry( "SyncPrefs", mSyncPrefs ); | 172 | config->writeEntry( "SyncPrefs", mSyncPrefs ); |
167 | config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks); | 173 | config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks); |
168 | config->writeEntry( "IsLocalFileSync", mIsLocalFileSync ); | 174 | config->writeEntry( "IsLocalFileSync", mIsLocalFileSync ); |
169 | config->writeEntry( "IsPhoneSync", mIsPhoneSync ); | 175 | config->writeEntry( "IsPhoneSync", mIsPhoneSync ); |
170 | } | 176 | } |
171 | 177 | ||
172 | /* | ||
173 | class KPrefsItemInt : public KPrefsItem { | ||
174 | public: | ||
175 | KPrefsItemInt(const QString &group,const QString &name,int *,int defaultValue=0); | ||
176 | virtual ~KPrefsItemInt() {} | ||
177 | |||
178 | void setDefault(); | ||
179 | void readConfig(KConfig *); | ||
180 | void writeConfig(KConfig *); | ||
181 | |||
182 | private: | ||
183 | int *mReference; | ||
184 | int mDefault; | ||
185 | }; | ||
186 | */ | ||