-rw-r--r-- | libkdepim/ksyncprofile.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp index f34c309..425285e 100644 --- a/libkdepim/ksyncprofile.cpp +++ b/libkdepim/ksyncprofile.cpp | |||
@@ -56,16 +56,17 @@ KSyncProfile* KSyncProfile::clone() | |||
56 | myClone->setWriteBackExisting(mWriteBackExisting ); | 56 | myClone->setWriteBackExisting(mWriteBackExisting ); |
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->setName( "noName" ); | 65 | myClone->setName( "noName" ); |
65 | return myClone; | 66 | return myClone; |
66 | } | 67 | } |
67 | 68 | ||
68 | 69 | ||
69 | void KSyncProfile::setDefault() | 70 | void KSyncProfile::setDefault() |
70 | { | 71 | { |
71 | mName = "noName"; | 72 | mName = "noName"; |
@@ -82,16 +83,20 @@ void KSyncProfile::setDefault() | |||
82 | mWriteBackExisting = false; | 83 | mWriteBackExisting = false; |
83 | mWriteBackFuture = false; | 84 | mWriteBackFuture = false; |
84 | mWriteBackFutureWeeks = 12; | 85 | mWriteBackFutureWeeks = 12; |
85 | mWriteBackFile = true; | 86 | mWriteBackFile = true; |
86 | mIncludeInRingSync = false; | 87 | mIncludeInRingSync = false; |
87 | mIncludeInRingSyncAB = false; | 88 | mIncludeInRingSyncAB = false; |
88 | mSyncPrefs = SYNC_PREF_ASK; | 89 | mSyncPrefs = SYNC_PREF_ASK; |
89 | mIsLocalFileSync = true; | 90 | mIsLocalFileSync = true; |
91 | mIsPhoneSync = false; | ||
92 | mPhoneDevice = "/dev/ircomm"; | ||
93 | mPhoneConnection = "irda"; | ||
94 | mPhoneModel = "6310i"; | ||
90 | 95 | ||
91 | } | 96 | } |
92 | void KSyncProfile::readConfig(KConfig *config ) | 97 | void KSyncProfile::readConfig(KConfig *config ) |
93 | { | 98 | { |
94 | config->setGroup("SyncProfiles"); | 99 | config->setGroup("SyncProfiles"); |
95 | QString prefix = "Profile_"+mName+"_"; | 100 | QString prefix = "Profile_"+mName+"_"; |
96 | //mName = config->readEntry( prefix+ "Name", mName ); | 101 | //mName = config->readEntry( prefix+ "Name", mName ); |
97 | mPreSyncCommand = config->readEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); | 102 | mPreSyncCommand = config->readEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); |
@@ -99,49 +104,61 @@ void KSyncProfile::readConfig(KConfig *config ) | |||
99 | mLocalTempFile = config->readEntry( prefix+ "LocalTempFile", mLocalTempFile ); | 104 | mLocalTempFile = config->readEntry( prefix+ "LocalTempFile", mLocalTempFile ); |
100 | mRemoteFileName = config->readEntry( prefix+ "RemoteFileName", mRemoteFileName ); | 105 | mRemoteFileName = config->readEntry( prefix+ "RemoteFileName", mRemoteFileName ); |
101 | 106 | ||
102 | mPreSyncCommandAB = config->readEntry( prefix+ "PreSyncCommandAB",mPreSyncCommandAB ); | 107 | mPreSyncCommandAB = config->readEntry( prefix+ "PreSyncCommandAB",mPreSyncCommandAB ); |
103 | mPostSyncCommandAB = config->readEntry( prefix+ "PostSyncCommandAB", mPostSyncCommandAB ); | 108 | mPostSyncCommandAB = config->readEntry( prefix+ "PostSyncCommandAB", mPostSyncCommandAB ); |
104 | mLocalTempFileAB = config->readEntry( prefix+ "LocalTempFileAB", mLocalTempFileAB ); | 109 | mLocalTempFileAB = config->readEntry( prefix+ "LocalTempFileAB", mLocalTempFileAB ); |
105 | mRemoteFileNameAB = config->readEntry( prefix+ "RemoteFileNameAB", mRemoteFileNameAB ); | 110 | mRemoteFileNameAB = config->readEntry( prefix+ "RemoteFileNameAB", mRemoteFileNameAB ); |
106 | 111 | ||
112 | |||
113 | mPhoneDevice = config->readEntry( prefix+ "PhoneDevice", mPhoneDevice ); | ||
114 | mPhoneConnection = config->readEntry( prefix+ "PhoneConnection", mPhoneConnection ); | ||
115 | mPhoneModel = config->readEntry( prefix+ "PhoneModel", mPhoneModel ); | ||
116 | |||
107 | mIncludeInRingSync = config->readBoolEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync ); | 117 | mIncludeInRingSync = config->readBoolEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync ); |
108 | mIncludeInRingSyncAB = config->readBoolEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB ); | 118 | mIncludeInRingSyncAB = config->readBoolEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB ); |
109 | mShowSummaryAfterSync = config->readBoolEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync ); | 119 | mShowSummaryAfterSync = config->readBoolEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync ); |
110 | mAskForPreferences = config->readBoolEntry( prefix+ "AskForPreferences",mAskForPreferences ); | 120 | mAskForPreferences = config->readBoolEntry( prefix+ "AskForPreferences",mAskForPreferences ); |
111 | mWriteBackExisting = config->readBoolEntry( prefix+ "WriteBackExisting",mWriteBackExisting ); | 121 | mWriteBackExisting = config->readBoolEntry( prefix+ "WriteBackExisting",mWriteBackExisting ); |
112 | mWriteBackFuture = config->readBoolEntry( prefix+ "WriteBackFuture",mWriteBackFuture ); | 122 | mWriteBackFuture = config->readBoolEntry( prefix+ "WriteBackFuture",mWriteBackFuture ); |
113 | mSyncPrefs = config->readNumEntry( prefix+ "SyncPrefs", mSyncPrefs ); | 123 | mSyncPrefs = config->readNumEntry( prefix+ "SyncPrefs", mSyncPrefs ); |
114 | mWriteBackFutureWeeks = config->readNumEntry( prefix+ "WriteBackFutureWeeks", mWriteBackFutureWeeks ); | 124 | mWriteBackFutureWeeks = config->readNumEntry( prefix+ "WriteBackFutureWeeks", mWriteBackFutureWeeks ); |
115 | mIsLocalFileSync= config->readBoolEntry( prefix+ "IsLocalFileSync", mIsLocalFileSync ); | 125 | mIsLocalFileSync= config->readBoolEntry( prefix+ "IsLocalFileSync", mIsLocalFileSync ); |
126 | mIsPhoneSync= config->readBoolEntry( prefix+ "IsPhoneSync", mIsPhoneSync ); | ||
116 | } | 127 | } |
117 | void KSyncProfile::writeConfig( KConfig * config ) | 128 | void KSyncProfile::writeConfig( KConfig * config ) |
118 | { | 129 | { |
119 | config->setGroup("SyncProfiles"); | 130 | config->setGroup("SyncProfiles"); |
120 | QString prefix = "Profile_"+mName+"_"; | 131 | QString prefix = "Profile_"+mName+"_"; |
121 | // config->writeEntry( prefix+ "Name", mName ); | 132 | // config->writeEntry( prefix+ "Name", mName ); |
122 | config->writeEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); | 133 | config->writeEntry( prefix+ "PreSyncCommand",mPreSyncCommand ); |
123 | config->writeEntry( prefix+ "PostSyncCommand", mPostSyncCommand ); | 134 | config->writeEntry( prefix+ "PostSyncCommand", mPostSyncCommand ); |
124 | config->writeEntry( prefix+ "LocalTempFile", mLocalTempFile ); | 135 | config->writeEntry( prefix+ "LocalTempFile", mLocalTempFile ); |
125 | config->writeEntry( prefix+ "RemoteFileName", mRemoteFileName ); | 136 | config->writeEntry( prefix+ "RemoteFileName", mRemoteFileName ); |
126 | 137 | ||
127 | config->writeEntry( prefix+ "PreSyncCommandAB",mPreSyncCommandAB ); | 138 | config->writeEntry( prefix+ "PreSyncCommandAB",mPreSyncCommandAB ); |
128 | config->writeEntry( prefix+ "PostSyncCommandAB", mPostSyncCommandAB ); | 139 | config->writeEntry( prefix+ "PostSyncCommandAB", mPostSyncCommandAB ); |
129 | config->writeEntry( prefix+ "LocalTempFileAB", mLocalTempFileAB ); | 140 | config->writeEntry( prefix+ "LocalTempFileAB", mLocalTempFileAB ); |
130 | config->writeEntry( prefix+ "RemoteFileNameAB", mRemoteFileNameAB ); | 141 | config->writeEntry( prefix+ "RemoteFileNameAB", mRemoteFileNameAB ); |
142 | |||
143 | config->writeEntry( prefix+ "PhoneDevice", mPhoneDevice ); | ||
144 | config->writeEntry( prefix+ "PhoneConnection", mPhoneConnection ); | ||
145 | config->writeEntry( prefix+ "PhoneModel", mPhoneModel ); | ||
146 | |||
131 | config->writeEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync ); | 147 | config->writeEntry( prefix+ "IncludeInRingSync",mIncludeInRingSync ); |
132 | config->writeEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB ); | 148 | config->writeEntry( prefix+ "IncludeInRingSyncAB",mIncludeInRingSyncAB ); |
133 | config->writeEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync ); | 149 | config->writeEntry( prefix+ "ShowSummaryAfterSync", mShowSummaryAfterSync ); |
134 | config->writeEntry( prefix+ "AskForPreferences",mAskForPreferences ); | 150 | config->writeEntry( prefix+ "AskForPreferences",mAskForPreferences ); |
135 | config->writeEntry( prefix+ "WriteBackExisting",mWriteBackExisting ); | 151 | config->writeEntry( prefix+ "WriteBackExisting",mWriteBackExisting ); |
136 | config->writeEntry( prefix+ "WriteBackFuture",mWriteBackFuture ); | 152 | config->writeEntry( prefix+ "WriteBackFuture",mWriteBackFuture ); |
137 | config->writeEntry( prefix+ "SyncPrefs", mSyncPrefs ); | 153 | config->writeEntry( prefix+ "SyncPrefs", mSyncPrefs ); |
138 | config->writeEntry( prefix+ "WriteBackFutureWeeks", mWriteBackFutureWeeks); | 154 | config->writeEntry( prefix+ "WriteBackFutureWeeks", mWriteBackFutureWeeks); |
139 | config->writeEntry( prefix+ "IsLocalFileSync", mIsLocalFileSync ); | 155 | config->writeEntry( prefix+ "IsLocalFileSync", mIsLocalFileSync ); |
156 | config->writeEntry( prefix+ "IsPhoneSync", mIsPhoneSync ); | ||
140 | } | 157 | } |
141 | 158 | ||
142 | /* | 159 | /* |
143 | class KPrefsItemInt : public KPrefsItem { | 160 | class KPrefsItemInt : public KPrefsItem { |
144 | public: | 161 | public: |
145 | KPrefsItemInt(const QString &group,const QString &name,int *,int defaultValue=0); | 162 | KPrefsItemInt(const QString &group,const QString &name,int *,int defaultValue=0); |
146 | virtual ~KPrefsItemInt() {} | 163 | virtual ~KPrefsItemInt() {} |
147 | 164 | ||