author | zautrix <zautrix> | 2004-10-13 03:05:35 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-13 03:05:35 (UTC) |
commit | 8f852fddc2dc5b63511d6ad1c85a1e74141969ff (patch) (unidiff) | |
tree | 123c7e845e1520a4dcd50dd2361252cc6ab7a76a | |
parent | e7833b80c28e38bfe6316ee5fce150635cdebe03 (diff) | |
download | kdepimpi-8f852fddc2dc5b63511d6ad1c85a1e74141969ff.zip kdepimpi-8f852fddc2dc5b63511d6ad1c85a1e74141969ff.tar.gz kdepimpi-8f852fddc2dc5b63511d6ad1c85a1e74141969ff.tar.bz2 |
fixed one syncing problem
-rw-r--r-- | kaddressbook/kabcore.cpp | 17 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 1 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.h | 1 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.cpp | 14 | ||||
-rw-r--r-- | libkdepim/ksyncprefsdialog.h | 2 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.cpp | 4 | ||||
-rw-r--r-- | libkdepim/ksyncprofile.h | 3 |
7 files changed, 25 insertions, 17 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 282560f..205dbc8 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2689,112 +2689,97 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2689 | mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); | 2689 | mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); |
2690 | // get rid of micro seconds | 2690 | // get rid of micro seconds |
2691 | QTime t = mLastAddressbookSync.time(); | 2691 | QTime t = mLastAddressbookSync.time(); |
2692 | mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); | 2692 | mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); |
2693 | addresseeLSync.setRevision( mLastAddressbookSync ); | 2693 | addresseeLSync.setRevision( mLastAddressbookSync ); |
2694 | addresseeRSync.setRevision( mLastAddressbookSync ); | 2694 | addresseeRSync.setRevision( mLastAddressbookSync ); |
2695 | addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; | 2695 | addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; |
2696 | addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); | 2696 | addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); |
2697 | addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; | 2697 | addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; |
2698 | addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); | 2698 | addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); |
2699 | addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; | 2699 | addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; |
2700 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); | 2700 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); |
2701 | addresseeRSync.setNote( "" ) ; | 2701 | addresseeRSync.setNote( "" ) ; |
2702 | addresseeLSync.setNote( "" ); | 2702 | addresseeLSync.setNote( "" ); |
2703 | 2703 | ||
2704 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) | 2704 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) |
2705 | remote->insertAddressee( addresseeRSync, false ); | 2705 | remote->insertAddressee( addresseeRSync, false ); |
2706 | local->insertAddressee( addresseeLSync, false ); | 2706 | local->insertAddressee( addresseeLSync, false ); |
2707 | QString mes; | 2707 | QString mes; |
2708 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR ); | 2708 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR ); |
2709 | if ( syncManager->mShowSyncSummary ) { | 2709 | if ( syncManager->mShowSyncSummary ) { |
2710 | KMessageBox::information(this, mes, i18n("KA/Pi Synchronization") ); | 2710 | KMessageBox::information(this, mes, i18n("KA/Pi Synchronization") ); |
2711 | } | 2711 | } |
2712 | qDebug( mes ); | 2712 | qDebug( mes ); |
2713 | return syncOK; | 2713 | return syncOK; |
2714 | } | 2714 | } |
2715 | 2715 | ||
2716 | 2716 | ||
2717 | //this is a overwritten callbackmethods from the syncinterface | 2717 | //this is a overwritten callbackmethods from the syncinterface |
2718 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) | 2718 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) |
2719 | { | 2719 | { |
2720 | 2720 | ||
2721 | //pending prepare addresseeview for output | 2721 | //pending prepare addresseeview for output |
2722 | //pending detect, if remote file has REV field. if not switch to external sync | 2722 | //pending detect, if remote file has REV field. if not switch to external sync |
2723 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 2723 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
2724 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 2724 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
2725 | 2725 | ||
2726 | AddressBook abLocal(filename,"syncContact"); | 2726 | AddressBook abLocal(filename,"syncContact"); |
2727 | bool syncOK = false; | 2727 | bool syncOK = false; |
2728 | if ( abLocal.load() ) { | 2728 | if ( abLocal.load() ) { |
2729 | qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode ); | 2729 | qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode ); |
2730 | bool external = false; | 2730 | bool external = false; |
2731 | bool isXML = false; | 2731 | bool isXML = false; |
2732 | if ( filename.right(4) == ".xml") { | 2732 | if ( filename.right(4) == ".xml") { |
2733 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2733 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2734 | isXML = true; | 2734 | isXML = true; |
2735 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice ); | 2735 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice ); |
2736 | } else { | 2736 | } else { |
2737 | Addressee lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); | 2737 | external = !manager->mIsKapiFile; |
2738 | if ( ! lse.isEmpty() ) { | ||
2739 | if ( lse.familyName().left(4) == "!E: " ) | ||
2740 | external = true; | ||
2741 | } else { | ||
2742 | bool found = false; | ||
2743 | AddressBook::Iterator it; | ||
2744 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | ||
2745 | if ( (*it).revision().date().year() > 2003 ) { | ||
2746 | found = true; | ||
2747 | break; | ||
2748 | } | ||
2749 | } | ||
2750 | external = ! found; | ||
2751 | } | ||
2752 | |||
2753 | if ( external ) { | 2738 | if ( external ) { |
2754 | qDebug("Setting vcf mode to external "); | 2739 | qDebug("Setting vcf mode to external "); |
2755 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2740 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2756 | AddressBook::Iterator it; | 2741 | AddressBook::Iterator it; |
2757 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 2742 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
2758 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); | 2743 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); |
2759 | (*it).computeCsum( mCurrentSyncDevice ); | 2744 | (*it).computeCsum( mCurrentSyncDevice ); |
2760 | } | 2745 | } |
2761 | } | 2746 | } |
2762 | } | 2747 | } |
2763 | //AddressBook::Iterator it; | 2748 | //AddressBook::Iterator it; |
2764 | //QStringList vcards; | 2749 | //QStringList vcards; |
2765 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 2750 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
2766 | // qDebug("Name %s ", (*it).familyName().latin1()); | 2751 | // qDebug("Name %s ", (*it).familyName().latin1()); |
2767 | //} | 2752 | //} |
2768 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); | 2753 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); |
2769 | if ( syncOK ) { | 2754 | if ( syncOK ) { |
2770 | if ( syncManager->mWriteBackFile ) | 2755 | if ( syncManager->mWriteBackFile ) |
2771 | { | 2756 | { |
2772 | if ( external ) | 2757 | if ( external ) |
2773 | abLocal.removeSyncAddressees( !isXML); | 2758 | abLocal.removeSyncAddressees( !isXML); |
2774 | qDebug("Saving remote AB "); | 2759 | qDebug("Saving remote AB "); |
2775 | if ( ! abLocal.saveAB()) | 2760 | if ( ! abLocal.saveAB()) |
2776 | qDebug("Error writing back AB to file "); | 2761 | qDebug("Error writing back AB to file "); |
2777 | if ( isXML ) { | 2762 | if ( isXML ) { |
2778 | // afterwrite processing | 2763 | // afterwrite processing |
2779 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); | 2764 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); |
2780 | } | 2765 | } |
2781 | } | 2766 | } |
2782 | } | 2767 | } |
2783 | setModified(); | 2768 | setModified(); |
2784 | 2769 | ||
2785 | } | 2770 | } |
2786 | if ( syncOK ) | 2771 | if ( syncOK ) |
2787 | mViewManager->refreshView(); | 2772 | mViewManager->refreshView(); |
2788 | return syncOK; | 2773 | return syncOK; |
2789 | 2774 | ||
2790 | } | 2775 | } |
2791 | 2776 | ||
2792 | 2777 | ||
2793 | //this is a overwritten callbackmethods from the syncinterface | 2778 | //this is a overwritten callbackmethods from the syncinterface |
2794 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) | 2779 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) |
2795 | { | 2780 | { |
2796 | if ( resource == "phone" ) | 2781 | if ( resource == "phone" ) |
2797 | return syncPhone(); | 2782 | return syncPhone(); |
2798 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 2783 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
2799 | 2784 | ||
2800 | AddressBook abLocal( resource,"syncContact"); | 2785 | AddressBook abLocal( resource,"syncContact"); |
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 6baa2ee..5175f94 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -135,96 +135,97 @@ void KSyncManager::fillSyncMenu() | |||
135 | } | 135 | } |
136 | 136 | ||
137 | void KSyncManager::slotSyncMenu( int action ) | 137 | void KSyncManager::slotSyncMenu( int action ) |
138 | { | 138 | { |
139 | //qDebug("syncaction %d ", action); | 139 | //qDebug("syncaction %d ", action); |
140 | if ( action == 0 ) { | 140 | if ( action == 0 ) { |
141 | 141 | ||
142 | // seems to be a Qt2 event handling bug | 142 | // seems to be a Qt2 event handling bug |
143 | // syncmenu.clear causes a segfault at first time | 143 | // syncmenu.clear causes a segfault at first time |
144 | // when we call it after the main event loop, it is ok | 144 | // when we call it after the main event loop, it is ok |
145 | // same behaviour when calling OM/Pi via QCOP for the first time | 145 | // same behaviour when calling OM/Pi via QCOP for the first time |
146 | QTimer::singleShot ( 1, this, SLOT ( confSync() ) ); | 146 | QTimer::singleShot ( 1, this, SLOT ( confSync() ) ); |
147 | //confSync(); | 147 | //confSync(); |
148 | 148 | ||
149 | return; | 149 | return; |
150 | } | 150 | } |
151 | if ( action == 1 ) { | 151 | if ( action == 1 ) { |
152 | multiSync( true ); | 152 | multiSync( true ); |
153 | return; | 153 | return; |
154 | } | 154 | } |
155 | if ( action == 2 ) { | 155 | if ( action == 2 ) { |
156 | enableQuick(); | 156 | enableQuick(); |
157 | QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); | 157 | QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); |
158 | return; | 158 | return; |
159 | } | 159 | } |
160 | if ( action == 3 ) { | 160 | if ( action == 3 ) { |
161 | delete mServerSocket; | 161 | delete mServerSocket; |
162 | mServerSocket = 0; | 162 | mServerSocket = 0; |
163 | QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); | 163 | QTimer::singleShot ( 1, this, SLOT ( fillSyncMenu() ) ); |
164 | return; | 164 | return; |
165 | } | 165 | } |
166 | 166 | ||
167 | if (blockSave()) | 167 | if (blockSave()) |
168 | return; | 168 | return; |
169 | 169 | ||
170 | setBlockSave(true); | 170 | setBlockSave(true); |
171 | 171 | ||
172 | mCurrentSyncProfile = action - 1000 ; | 172 | mCurrentSyncProfile = action - 1000 ; |
173 | mCurrentSyncDevice = mSyncProfileNames[mCurrentSyncProfile] ; | 173 | mCurrentSyncDevice = mSyncProfileNames[mCurrentSyncProfile] ; |
174 | mCurrentSyncName = mLocalMachineName ; | 174 | mCurrentSyncName = mLocalMachineName ; |
175 | KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); | 175 | KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); |
176 | KSyncProfile* temp = new KSyncProfile (); | 176 | KSyncProfile* temp = new KSyncProfile (); |
177 | temp->setName(mSyncProfileNames[mCurrentSyncProfile]); | 177 | temp->setName(mSyncProfileNames[mCurrentSyncProfile]); |
178 | temp->readConfig(&config); | 178 | temp->readConfig(&config); |
179 | mAskForPreferences = temp->getAskForPreferences(); | 179 | mAskForPreferences = temp->getAskForPreferences(); |
180 | mSyncAlgoPrefs = temp->getSyncPrefs(); | 180 | mSyncAlgoPrefs = temp->getSyncPrefs(); |
181 | mWriteBackFile = temp->getWriteBackFile(); | 181 | mWriteBackFile = temp->getWriteBackFile(); |
182 | mWriteBackExistingOnly = temp->getWriteBackExisting(); | 182 | mWriteBackExistingOnly = temp->getWriteBackExisting(); |
183 | mIsKapiFile = temp->getIsKapiFile(); | ||
183 | mWriteBackInFuture = 0; | 184 | mWriteBackInFuture = 0; |
184 | if ( temp->getWriteBackFuture() ) | 185 | if ( temp->getWriteBackFuture() ) |
185 | mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); | 186 | mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); |
186 | mShowSyncSummary = temp->getShowSummaryAfterSync(); | 187 | mShowSyncSummary = temp->getShowSummaryAfterSync(); |
187 | if ( action == 1000 ) { | 188 | if ( action == 1000 ) { |
188 | syncSharp(); | 189 | syncSharp(); |
189 | 190 | ||
190 | } else if ( action == 1001 ) { | 191 | } else if ( action == 1001 ) { |
191 | syncLocalFile(); | 192 | syncLocalFile(); |
192 | 193 | ||
193 | } else if ( action == 1002 ) { | 194 | } else if ( action == 1002 ) { |
194 | mWriteBackFile = false; | 195 | mWriteBackFile = false; |
195 | mAskForPreferences = false; | 196 | mAskForPreferences = false; |
196 | mShowSyncSummary = false; | 197 | mShowSyncSummary = false; |
197 | mSyncAlgoPrefs = 3; | 198 | mSyncAlgoPrefs = 3; |
198 | quickSyncLocalFile(); | 199 | quickSyncLocalFile(); |
199 | 200 | ||
200 | } else if ( action >= 1003 ) { | 201 | } else if ( action >= 1003 ) { |
201 | if ( temp->getIsLocalFileSync() ) { | 202 | if ( temp->getIsLocalFileSync() ) { |
202 | switch(mTargetApp) | 203 | switch(mTargetApp) |
203 | { | 204 | { |
204 | case (KAPI): | 205 | case (KAPI): |
205 | if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) ) | 206 | if ( syncWithFile( temp->getRemoteFileNameAB( ), false ) ) |
206 | mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB(); | 207 | mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNameAB(); |
207 | break; | 208 | break; |
208 | case (KOPI): | 209 | case (KOPI): |
209 | if ( syncWithFile( temp->getRemoteFileName( ), false ) ) | 210 | if ( syncWithFile( temp->getRemoteFileName( ), false ) ) |
210 | mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName(); | 211 | mPrefs->mLastSyncedLocalFile = temp->getRemoteFileName(); |
211 | break; | 212 | break; |
212 | case (PWMPI): | 213 | case (PWMPI): |
213 | if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) ) | 214 | if ( syncWithFile( temp->getRemoteFileNamePWM( ), false ) ) |
214 | mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM(); | 215 | mPrefs->mLastSyncedLocalFile = temp->getRemoteFileNamePWM(); |
215 | break; | 216 | break; |
216 | default: | 217 | default: |
217 | qDebug("KSyncManager::slotSyncMenu: invalid apptype selected"); | 218 | qDebug("KSyncManager::slotSyncMenu: invalid apptype selected"); |
218 | break; | 219 | break; |
219 | 220 | ||
220 | } | 221 | } |
221 | } else { | 222 | } else { |
222 | if ( temp->getIsPhoneSync() ) { | 223 | if ( temp->getIsPhoneSync() ) { |
223 | mPhoneDevice = temp->getPhoneDevice( ) ; | 224 | mPhoneDevice = temp->getPhoneDevice( ) ; |
224 | mPhoneConnection = temp->getPhoneConnection( ); | 225 | mPhoneConnection = temp->getPhoneConnection( ); |
225 | mPhoneModel = temp->getPhoneModel( ); | 226 | mPhoneModel = temp->getPhoneModel( ); |
226 | syncPhone(); | 227 | syncPhone(); |
227 | } else if ( temp->getIsPiSync() ) { | 228 | } else if ( temp->getIsPiSync() ) { |
228 | if ( mTargetApp == KAPI ) { | 229 | if ( mTargetApp == KAPI ) { |
229 | mPassWordPiSync = temp->getRemotePwAB(); | 230 | mPassWordPiSync = temp->getRemotePwAB(); |
230 | mActiveSyncPort = temp->getRemotePortAB(); | 231 | mActiveSyncPort = temp->getRemotePortAB(); |
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index 5b05383..9094aac 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h | |||
@@ -89,96 +89,97 @@ class KCommandSocket : public QObject | |||
89 | void writeFileToSocket(); | 89 | void writeFileToSocket(); |
90 | private : | 90 | private : |
91 | QSocket* mSocket; | 91 | QSocket* mSocket; |
92 | QString mPassWord; | 92 | QString mPassWord; |
93 | Q_UINT16 mPort; | 93 | Q_UINT16 mPort; |
94 | QString mHost; | 94 | QString mHost; |
95 | QString mFileName; | 95 | QString mFileName; |
96 | QTimer* mTimerSocket; | 96 | QTimer* mTimerSocket; |
97 | int mRetVal; | 97 | int mRetVal; |
98 | QTime mTime; | 98 | QTime mTime; |
99 | QString mFileString; | 99 | QString mFileString; |
100 | bool mFirst; | 100 | bool mFirst; |
101 | }; | 101 | }; |
102 | 102 | ||
103 | 103 | ||
104 | class KSyncManager : public QObject | 104 | class KSyncManager : public QObject |
105 | { | 105 | { |
106 | Q_OBJECT | 106 | Q_OBJECT |
107 | 107 | ||
108 | public: | 108 | public: |
109 | enum TargetApp { | 109 | enum TargetApp { |
110 | KOPI = 0, | 110 | KOPI = 0, |
111 | KAPI = 1, | 111 | KAPI = 1, |
112 | PWMPI = 2 }; | 112 | PWMPI = 2 }; |
113 | 113 | ||
114 | KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu); | 114 | KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu); |
115 | ~KSyncManager() ; | 115 | ~KSyncManager() ; |
116 | 116 | ||
117 | void multiSync( bool askforPrefs ); | 117 | void multiSync( bool askforPrefs ); |
118 | bool blockSave() { return mBlockSaveFlag; } | 118 | bool blockSave() { return mBlockSaveFlag; } |
119 | void setBlockSave(bool sa) { mBlockSaveFlag = sa; } | 119 | void setBlockSave(bool sa) { mBlockSaveFlag = sa; } |
120 | void setDefaultFileName( QString s) { mDefFileName = s ;} | 120 | void setDefaultFileName( QString s) { mDefFileName = s ;} |
121 | QString defaultFileName() { return mDefFileName ;} | 121 | QString defaultFileName() { return mDefFileName ;} |
122 | QString syncFileName(); | 122 | QString syncFileName(); |
123 | 123 | ||
124 | QString getCurrentSyncDevice() { return mCurrentSyncDevice; } | 124 | QString getCurrentSyncDevice() { return mCurrentSyncDevice; } |
125 | QString getCurrentSyncName() { return mCurrentSyncName; } | 125 | QString getCurrentSyncName() { return mCurrentSyncName; } |
126 | 126 | ||
127 | void showProgressBar(int percentage, QString caption = QString::null, int total=100); | 127 | void showProgressBar(int percentage, QString caption = QString::null, int total=100); |
128 | void hideProgressBar(); | 128 | void hideProgressBar(); |
129 | bool isProgressBarCanceled(); | 129 | bool isProgressBarCanceled(); |
130 | 130 | ||
131 | // sync stuff | 131 | // sync stuff |
132 | QString mLocalMachineName; | 132 | QString mLocalMachineName; |
133 | QStringList mExternSyncProfiles; | 133 | QStringList mExternSyncProfiles; |
134 | QStringList mSyncProfileNames; | 134 | QStringList mSyncProfileNames; |
135 | bool mAskForPreferences; | 135 | bool mAskForPreferences; |
136 | bool mShowSyncSummary; | 136 | bool mShowSyncSummary; |
137 | bool mIsKapiFile; | ||
137 | bool mWriteBackExistingOnly; | 138 | bool mWriteBackExistingOnly; |
138 | int mSyncAlgoPrefs; | 139 | int mSyncAlgoPrefs; |
139 | bool mWriteBackFile; | 140 | bool mWriteBackFile; |
140 | int mWriteBackInFuture; | 141 | int mWriteBackInFuture; |
141 | QString mPhoneDevice; | 142 | QString mPhoneDevice; |
142 | QString mPhoneConnection; | 143 | QString mPhoneConnection; |
143 | QString mPhoneModel; | 144 | QString mPhoneModel; |
144 | QString mPassWordPiSync; | 145 | QString mPassWordPiSync; |
145 | QString mActiveSyncPort; | 146 | QString mActiveSyncPort; |
146 | QString mActiveSyncIP ; | 147 | QString mActiveSyncIP ; |
147 | 148 | ||
148 | signals: | 149 | signals: |
149 | void save(); | 150 | void save(); |
150 | void request_file(); | 151 | void request_file(); |
151 | void getFile( bool ); | 152 | void getFile( bool ); |
152 | 153 | ||
153 | public slots: | 154 | public slots: |
154 | void slotSyncMenu( int ); | 155 | void slotSyncMenu( int ); |
155 | void deleteCommandSocket(KCommandSocket*s, int state); | 156 | void deleteCommandSocket(KCommandSocket*s, int state); |
156 | void readFileFromSocket(); | 157 | void readFileFromSocket(); |
157 | void fillSyncMenu(); | 158 | void fillSyncMenu(); |
158 | 159 | ||
159 | private: | 160 | private: |
160 | void syncPi(); | 161 | void syncPi(); |
161 | KServerSocket * mServerSocket; | 162 | KServerSocket * mServerSocket; |
162 | void enableQuick(); | 163 | void enableQuick(); |
163 | KPimPrefs* mPrefs; | 164 | KPimPrefs* mPrefs; |
164 | QString mDefFileName; | 165 | QString mDefFileName; |
165 | QString mCurrentSyncDevice; | 166 | QString mCurrentSyncDevice; |
166 | QString mCurrentSyncName; | 167 | QString mCurrentSyncName; |
167 | void quickSyncLocalFile(); | 168 | void quickSyncLocalFile(); |
168 | bool syncWithFile( QString fn , bool quick ); | 169 | bool syncWithFile( QString fn , bool quick ); |
169 | void syncLocalFile(); | 170 | void syncLocalFile(); |
170 | void syncPhone(); | 171 | void syncPhone(); |
171 | void syncSharp(); | 172 | void syncSharp(); |
172 | bool syncExternalApplication(QString); | 173 | bool syncExternalApplication(QString); |
173 | int mCurrentSyncProfile ; | 174 | int mCurrentSyncProfile ; |
174 | void syncRemote( KSyncProfile* prof, bool ask = true); | 175 | void syncRemote( KSyncProfile* prof, bool ask = true); |
175 | void edit_sync_options(); | 176 | void edit_sync_options(); |
176 | void edit_pisync_options(); | 177 | void edit_pisync_options(); |
177 | int ringSync(); | 178 | int ringSync(); |
178 | QString getPassword( ); | 179 | QString getPassword( ); |
179 | 180 | ||
180 | private slots: | 181 | private slots: |
181 | void confSync(); | 182 | void confSync(); |
182 | private: | 183 | private: |
183 | bool mBlockSaveFlag; | 184 | bool mBlockSaveFlag; |
184 | QWidget* mParent; | 185 | QWidget* mParent; |
diff --git a/libkdepim/ksyncprefsdialog.cpp b/libkdepim/ksyncprefsdialog.cpp index cf8f996..03265d2 100644 --- a/libkdepim/ksyncprefsdialog.cpp +++ b/libkdepim/ksyncprefsdialog.cpp | |||
@@ -197,124 +197,126 @@ void KSyncPrefsDialog::setupSyncAlgTab() | |||
197 | connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); | 197 | connect (mIsPhone, SIGNAL( toggled(bool)), this, SLOT (kindChanged(bool) ) ); |
198 | 198 | ||
199 | 199 | ||
200 | phoneWidget = new QVBox( topFrame); | 200 | phoneWidget = new QVBox( topFrame); |
201 | topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); | 201 | topLayout->addMultiCellWidget(phoneWidget, iii,iii,0,1); |
202 | ++iii; | 202 | ++iii; |
203 | mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); | 203 | mWriteContactToSIM = 0;//new QCheckBox( i18n("Sync contacts with phone SIM card (If not, sync with phone memory)"), phoneWidget ); |
204 | QHBox* temphb = new QHBox( phoneWidget ); | 204 | QHBox* temphb = new QHBox( phoneWidget ); |
205 | new QLabel( i18n("I/O device: "), temphb ); | 205 | new QLabel( i18n("I/O device: "), temphb ); |
206 | mPhoneDevice = new QLineEdit( temphb); | 206 | mPhoneDevice = new QLineEdit( temphb); |
207 | button = new QPushButton( i18n("Help..."), temphb ); | 207 | button = new QPushButton( i18n("Help..."), temphb ); |
208 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) ); | 208 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpDevice() ) ); |
209 | 209 | ||
210 | 210 | ||
211 | temphb = new QHBox( phoneWidget ); | 211 | temphb = new QHBox( phoneWidget ); |
212 | new QLabel( i18n("Connection: "), temphb ); | 212 | new QLabel( i18n("Connection: "), temphb ); |
213 | mPhoneConnection = new QLineEdit( temphb); | 213 | mPhoneConnection = new QLineEdit( temphb); |
214 | button = new QPushButton( i18n("Help..."), temphb ); | 214 | button = new QPushButton( i18n("Help..."), temphb ); |
215 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); | 215 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpConnection() ) ); |
216 | 216 | ||
217 | 217 | ||
218 | temphb = new QHBox( phoneWidget ); | 218 | temphb = new QHBox( phoneWidget ); |
219 | new QLabel( i18n("Model(opt.): "), temphb ); | 219 | new QLabel( i18n("Model(opt.): "), temphb ); |
220 | mPhoneModel = new QLineEdit( temphb); | 220 | mPhoneModel = new QLineEdit( temphb); |
221 | button = new QPushButton( i18n("Help..."), temphb ); | 221 | button = new QPushButton( i18n("Help..."), temphb ); |
222 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) ); | 222 | connect ( button, SIGNAL( clicked()), this, SLOT ( helpModel() ) ); |
223 | 223 | ||
224 | // *** local | 224 | // *** local |
225 | localFileWidget = new QVBox( topFrame); | 225 | localFileWidget = new QVBox( topFrame); |
226 | topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); | 226 | topLayout->addMultiCellWidget(localFileWidget, iii,iii,0,1); |
227 | ++iii; | 227 | ++iii; |
228 | temphb = new QHBox( localFileWidget ); | 228 | temphb = new QHBox( localFileWidget ); |
229 | 229 | ||
230 | lab = new QLabel( i18n("Local file Cal:"), temphb ); | 230 | lab = new QLabel( i18n("Local file Cal:"), temphb ); |
231 | lab = new QLabel( i18n("Local file ABook:"), temphb ); | 231 | lab = new QLabel( i18n("Local file ABook:"), temphb ); |
232 | lab = new QLabel( i18n("Local file PWMgr:"), temphb ); | 232 | lab = new QLabel( i18n("Local file PWMgr:"), temphb ); |
233 | temphb = new QHBox( localFileWidget ); | 233 | temphb = new QHBox( localFileWidget ); |
234 | button = new QPushButton( i18n("Choose..."), temphb ); | 234 | button = new QPushButton( i18n("Choose..."), temphb ); |
235 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); | 235 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFile() ) ); |
236 | button = new QPushButton( i18n("Choose..."), temphb ); | 236 | button = new QPushButton( i18n("Choose..."), temphb ); |
237 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) ); | 237 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFileAB() ) ); |
238 | button = new QPushButton( i18n("Choose..."), temphb ); | 238 | button = new QPushButton( i18n("Choose..."), temphb ); |
239 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) ); | 239 | connect ( button, SIGNAL( clicked()), this, SLOT ( chooseFilePWM() ) ); |
240 | temphb = new QHBox( localFileWidget ); | 240 | temphb = new QHBox( localFileWidget ); |
241 | 241 | ||
242 | mRemoteFile = new QLineEdit( temphb); | 242 | mRemoteFile = new QLineEdit( temphb); |
243 | mRemoteFileAB = new QLineEdit( temphb); | 243 | mRemoteFileAB = new QLineEdit( temphb); |
244 | mRemoteFilePWM = new QLineEdit( temphb); | 244 | mRemoteFilePWM = new QLineEdit( temphb); |
245 | mIsKapiFileL = new QCheckBox( i18n("Addressbook file (*.vcf) is used by KA/Pi"), localFileWidget ); | ||
246 | |||
245 | 247 | ||
246 | // *** remote | 248 | // *** remote |
247 | remoteFileWidget = new QVBox( topFrame); | 249 | remoteFileWidget = new QVBox( topFrame); |
248 | topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1); | 250 | topLayout->addMultiCellWidget(remoteFileWidget, iii,iii,0,1); |
249 | ++iii; | 251 | ++iii; |
250 | temphb = new QHBox( remoteFileWidget ); | 252 | temphb = new QHBox( remoteFileWidget ); |
251 | new QLabel( i18n("Calendar:"), temphb); | 253 | new QLabel( i18n("Calendar:"), temphb); |
252 | new QLabel( i18n("AddressBook:"), temphb); | 254 | new QLabel( i18n("AddressBook:"), temphb); |
253 | new QLabel( i18n("PWManager:"), temphb); | 255 | new QLabel( i18n("PWManager:"), temphb); |
254 | 256 | ||
255 | lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); | 257 | lab = new QLabel( i18n("Pre sync (download) command:"), remoteFileWidget); |
256 | temphb = new QHBox( remoteFileWidget ); | 258 | temphb = new QHBox( remoteFileWidget ); |
257 | mRemotePrecommand = new QLineEdit(temphb); | 259 | mRemotePrecommand = new QLineEdit(temphb); |
258 | mRemotePrecommandAB = new QLineEdit(temphb); | 260 | mRemotePrecommandAB = new QLineEdit(temphb); |
259 | mRemotePrecommandPWM = new QLineEdit(temphb); | 261 | mRemotePrecommandPWM = new QLineEdit(temphb); |
260 | 262 | ||
261 | lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); | 263 | lab = new QLabel( i18n("Local temp file:"), remoteFileWidget); |
262 | temphb = new QHBox( remoteFileWidget ); | 264 | temphb = new QHBox( remoteFileWidget ); |
263 | mLocalTempFile = new QLineEdit(temphb); | 265 | mLocalTempFile = new QLineEdit(temphb); |
264 | mLocalTempFileAB = new QLineEdit(temphb); | 266 | mLocalTempFileAB = new QLineEdit(temphb); |
265 | mLocalTempFilePWM = new QLineEdit(temphb); | 267 | mLocalTempFilePWM = new QLineEdit(temphb); |
266 | 268 | ||
267 | lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); | 269 | lab = new QLabel( i18n("Post sync (upload) command:"), remoteFileWidget); |
268 | temphb = new QHBox( remoteFileWidget ); | 270 | temphb = new QHBox( remoteFileWidget ); |
269 | mRemotePostcommand = new QLineEdit(temphb ); | 271 | mRemotePostcommand = new QLineEdit(temphb ); |
270 | mRemotePostcommandAB = new QLineEdit(temphb ); | 272 | mRemotePostcommandAB = new QLineEdit(temphb ); |
271 | mRemotePostcommandPWM = new QLineEdit(temphb ); | 273 | mRemotePostcommandPWM = new QLineEdit(temphb ); |
272 | 274 | mIsKapiFileR = new QCheckBox( i18n("Addressbook file is used by KA/Pi"), remoteFileWidget ); | |
273 | lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); | 275 | lab = new QLabel( i18n("Fill in default values for:"), remoteFileWidget); |
274 | temphb = new QHBox( remoteFileWidget ); | 276 | temphb = new QHBox( remoteFileWidget ); |
275 | button = new QPushButton( i18n("ssh/scp"), temphb ); | 277 | button = new QPushButton( i18n("ssh/scp"), temphb ); |
276 | connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); | 278 | connect ( button, SIGNAL( clicked()), this, SLOT (fillSSH() ) ); |
277 | button = new QPushButton( i18n("ftp"), temphb ); | 279 | button = new QPushButton( i18n("ftp"), temphb ); |
278 | connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) ); | 280 | connect ( button, SIGNAL( clicked()), this, SLOT (fillFTP() ) ); |
279 | lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); | 281 | lab = new QLabel( i18n("Hint: Use $PWD$ for placeholder of password!"), remoteFileWidget); |
280 | 282 | ||
281 | // *** pi-sync | 283 | // *** pi-sync |
282 | piWidget = new QVBox( topFrame); | 284 | piWidget = new QVBox( topFrame); |
283 | topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); | 285 | topLayout->addMultiCellWidget(piWidget, iii,iii,0,1); |
284 | ++iii; | 286 | ++iii; |
285 | temphb = new QHBox( piWidget ); | 287 | temphb = new QHBox( piWidget ); |
286 | new QLabel( i18n("Calendar:"), temphb); | 288 | new QLabel( i18n("Calendar:"), temphb); |
287 | new QLabel( i18n("AddressBook:"), temphb); | 289 | new QLabel( i18n("AddressBook:"), temphb); |
288 | new QLabel( i18n("PWManager:"), temphb); | 290 | new QLabel( i18n("PWManager:"), temphb); |
289 | 291 | ||
290 | lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); | 292 | lab = new QLabel( i18n("Password for remote access: (could be the same for each)"), piWidget); |
291 | temphb = new QHBox( piWidget ); | 293 | temphb = new QHBox( piWidget ); |
292 | mRemotePw = new QLineEdit(temphb); | 294 | mRemotePw = new QLineEdit(temphb); |
293 | mRemotePwAB = new QLineEdit(temphb); | 295 | mRemotePwAB = new QLineEdit(temphb); |
294 | mRemotePwPWM = new QLineEdit(temphb); | 296 | mRemotePwPWM = new QLineEdit(temphb); |
295 | 297 | ||
296 | lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); | 298 | lab = new QLabel( i18n("Remote IP address: (could be the same for each)"), piWidget); |
297 | temphb = new QHBox( piWidget ); | 299 | temphb = new QHBox( piWidget ); |
298 | mRemoteIP = new QLineEdit(temphb); | 300 | mRemoteIP = new QLineEdit(temphb); |
299 | mRemoteIPAB = new QLineEdit(temphb); | 301 | mRemoteIPAB = new QLineEdit(temphb); |
300 | mRemoteIPPWM = new QLineEdit(temphb); | 302 | mRemoteIPPWM = new QLineEdit(temphb); |
301 | 303 | ||
302 | lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); | 304 | lab = new QLabel( i18n("Remote port number: (should be different for each)"), piWidget); |
303 | temphb = new QHBox( piWidget ); | 305 | temphb = new QHBox( piWidget ); |
304 | mRemotePort = new QLineEdit(temphb); | 306 | mRemotePort = new QLineEdit(temphb); |
305 | mRemotePortAB = new QLineEdit(temphb); | 307 | mRemotePortAB = new QLineEdit(temphb); |
306 | mRemotePortPWM = new QLineEdit(temphb); | 308 | mRemotePortPWM = new QLineEdit(temphb); |
307 | 309 | ||
308 | } | 310 | } |
309 | 311 | ||
310 | 312 | ||
311 | 313 | ||
312 | 314 | ||
313 | 315 | ||
314 | void KSyncPrefsDialog::slotOK() | 316 | void KSyncPrefsDialog::slotOK() |
315 | { | 317 | { |
316 | if ( mMyMachineName->text() == "undefined" ) { | 318 | if ( mMyMachineName->text() == "undefined" ) { |
317 | KMessageBox::error(this,i18n("Local device name undefined!\nPlease define device name!"),i18n("KO/Pi config error")); | 319 | KMessageBox::error(this,i18n("Local device name undefined!\nPlease define device name!"),i18n("KO/Pi config error")); |
318 | return; | 320 | return; |
319 | } | 321 | } |
320 | int i; | 322 | int i; |
@@ -412,218 +414,228 @@ void KSyncPrefsDialog::profileChanged( int item ) | |||
412 | mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM()); | 414 | mRemotePostcommandPWM->setText(prof->getPostSyncCommandPWM()); |
413 | mLocalTempFilePWM->setText(prof->getLocalTempFilePWM()); | 415 | mLocalTempFilePWM->setText(prof->getLocalTempFilePWM()); |
414 | mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ; | 416 | mRemoteFilePWM->setText(prof->getRemoteFileNamePWM()) ; |
415 | 417 | ||
416 | if ( mWriteContactToSIM ) | 418 | if ( mWriteContactToSIM ) |
417 | mWriteContactToSIM->setChecked( prof->getWriteContactToSIM()); | 419 | mWriteContactToSIM->setChecked( prof->getWriteContactToSIM()); |
418 | mPhoneDevice->setText(prof->getPhoneDevice()); | 420 | mPhoneDevice->setText(prof->getPhoneDevice()); |
419 | mPhoneConnection->setText(prof->getPhoneConnection()); | 421 | mPhoneConnection->setText(prof->getPhoneConnection()); |
420 | mPhoneModel->setText(prof->getPhoneModel()); | 422 | mPhoneModel->setText(prof->getPhoneModel()); |
421 | 423 | ||
422 | mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); | 424 | mShowSummaryAfterSync->setChecked( prof->getShowSummaryAfterSync()); |
423 | mAskForPreferences->setChecked( prof->getAskForPreferences()); | 425 | mAskForPreferences->setChecked( prof->getAskForPreferences()); |
424 | mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); | 426 | mWriteBackExisting->setChecked( prof->getWriteBackExisting() ); |
425 | mWriteBackFile->setChecked( prof->getWriteBackFile()); | 427 | mWriteBackFile->setChecked( prof->getWriteBackFile()); |
426 | mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); | 428 | mIncludeInRing->setChecked( prof->getIncludeInRingSync() ); |
427 | mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); | 429 | mIncludeInRingAB->setChecked( prof->getIncludeInRingSyncAB() ); |
428 | mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() ); | 430 | mIncludeInRingPWM->setChecked( prof->getIncludeInRingSyncPWM() ); |
429 | mWriteBackFuture->setChecked( prof->getWriteBackFuture()); | 431 | mWriteBackFuture->setChecked( prof->getWriteBackFuture()); |
430 | mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() ); | 432 | mWriteBackFutureWeeks->setValue( prof->getWriteBackFutureWeeks() ); |
431 | 433 | ||
432 | switch ( prof->getSyncPrefs() ) { | 434 | switch ( prof->getSyncPrefs() ) { |
433 | case 0: | 435 | case 0: |
434 | loc->setChecked( true); | 436 | loc->setChecked( true); |
435 | break; | 437 | break; |
436 | case 1: | 438 | case 1: |
437 | rem->setChecked( true ); | 439 | rem->setChecked( true ); |
438 | break; | 440 | break; |
439 | case 2: | 441 | case 2: |
440 | newest->setChecked( true); | 442 | newest->setChecked( true); |
441 | break; | 443 | break; |
442 | case 3: | 444 | case 3: |
443 | ask->setChecked( true); | 445 | ask->setChecked( true); |
444 | break; | 446 | break; |
445 | case 4: | 447 | case 4: |
446 | f_loc->setChecked( true); | 448 | f_loc->setChecked( true); |
447 | break; | 449 | break; |
448 | case 5: | 450 | case 5: |
449 | f_rem->setChecked( true); | 451 | f_rem->setChecked( true); |
450 | break; | 452 | break; |
451 | case 6: | 453 | case 6: |
452 | //both->setChecked( true); | 454 | //both->setChecked( true); |
453 | break; | 455 | break; |
454 | default: | 456 | default: |
455 | break; | 457 | break; |
456 | } | 458 | } |
457 | mIsLocal->setChecked(prof->getIsLocalFileSync()) ; | 459 | mIsLocal->setChecked(prof->getIsLocalFileSync()) ; |
458 | mIsPhone->setChecked(prof->getIsPhoneSync()) ; | 460 | mIsPhone->setChecked(prof->getIsPhoneSync()) ; |
459 | mIsPi->setChecked(prof->getIsPiSync()) ; | 461 | mIsPi->setChecked(prof->getIsPiSync()) ; |
462 | mIsKapiFileL->setChecked(prof->getIsKapiFile()) ; | ||
463 | mIsKapiFileR->setChecked(prof->getIsKapiFile()) ; | ||
464 | |||
460 | mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() &&!prof->getIsPiSync() ); | 465 | mIsNotLocal->setChecked(!prof->getIsLocalFileSync() && !prof->getIsPhoneSync() &&!prof->getIsPiSync() ); |
461 | proGr->setEnabled( item > 2 ); | 466 | proGr->setEnabled( item > 2 ); |
462 | if ( item < 3 ) { | 467 | if ( item < 3 ) { |
463 | localFileWidget->hide(); | 468 | localFileWidget->hide(); |
464 | remoteFileWidget->hide(); | 469 | remoteFileWidget->hide(); |
465 | phoneWidget->hide(); | 470 | phoneWidget->hide(); |
466 | piWidget->hide(); | 471 | piWidget->hide(); |
467 | 472 | ||
468 | } else | 473 | } else |
469 | kindChanged( prof->getIsLocalFileSync() ); | 474 | kindChanged( prof->getIsLocalFileSync() ); |
470 | } | 475 | } |
471 | 476 | ||
472 | void KSyncPrefsDialog::fillSSH() | 477 | void KSyncPrefsDialog::fillSSH() |
473 | { | 478 | { |
474 | mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); | 479 | mRemotePrecommand->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); |
475 | mLocalTempFile->setText("/tmp/mycalendar.ics" ); | 480 | mLocalTempFile->setText("/tmp/mycalendar.ics" ); |
476 | mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" ); | 481 | mRemotePostcommand->setText("scp /tmp/mycalendar.ics zaurus@192.168.0.65:/home/zaurus/kdepim/apps/korganizer/mycalendar.ics" ); |
477 | mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); | 482 | mRemotePrecommandAB->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); |
478 | mLocalTempFileAB->setText("/tmp/std.vcf" ); | 483 | mLocalTempFileAB->setText("/tmp/std.vcf" ); |
479 | mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" ); | 484 | mRemotePostcommandAB->setText("scp /tmp/std.vcf zaurus@192.168.0.65:/home/zaurus/kdepim/apps/kabc/std.vcf" ); |
480 | mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); | 485 | mRemotePrecommandPWM->setText("scp zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); |
481 | mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); | 486 | mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); |
482 | mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" ); | 487 | mRemotePostcommandPWM->setText("scp /tmp/passwords.pwm zaurus@192.168.0.65:/home/zaurus/kdepim/apps/pwmanager/pwmanager.pwm" ); |
483 | } | 488 | } |
484 | void KSyncPrefsDialog::fillFTP() | 489 | void KSyncPrefsDialog::fillFTP() |
485 | { | 490 | { |
486 | mRemotePrecommand->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics" ); | 491 | mRemotePrecommand->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics" ); |
487 | mLocalTempFile->setText("/tmp/mycalendar.ics" ); | 492 | mLocalTempFile->setText("/tmp/mycalendar.ics" ); |
488 | mRemotePostcommand->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); | 493 | mRemotePostcommand->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/korganizer/mycalendar.ics /tmp/mycalendar.ics" ); |
489 | mRemotePrecommandAB->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf" ); | 494 | mRemotePrecommandAB->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf" ); |
490 | mLocalTempFileAB->setText("/tmp/std.vcf" ); | 495 | mLocalTempFileAB->setText("/tmp/std.vcf" ); |
491 | mRemotePostcommandAB->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); | 496 | mRemotePostcommandAB->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/kabc/std.vcf /tmp/std.vcf" ); |
492 | 497 | ||
493 | mRemotePrecommandPWM->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm" ); | 498 | mRemotePrecommandPWM->setText("cd /tmp;ftp ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm" ); |
494 | mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); | 499 | mLocalTempFilePWM->setText("/tmp/passwords.pwm" ); |
495 | mRemotePostcommandPWM->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); | 500 | mRemotePostcommandPWM->setText("ftp -u ftp://zaurus:a@192.168.0.65/kdepim/apps/pwmanager/passwords.pwm /tmp/passwords.pwm" ); |
496 | 501 | ||
497 | } | 502 | } |
498 | void KSyncPrefsDialog::kindChanged( bool b ) | 503 | void KSyncPrefsDialog::kindChanged( bool b ) |
499 | { | 504 | { |
505 | |||
506 | if ( mIsLocal->isChecked () ) { | ||
507 | mIsKapiFileL->setChecked( mIsKapiFileR->isChecked() ); | ||
508 | } else { | ||
509 | mIsKapiFileR->setChecked( mIsKapiFileL->isChecked() ); | ||
510 | } | ||
500 | 511 | ||
501 | if ( mIsLocal->isChecked () ) | 512 | if ( mIsLocal->isChecked () ) |
502 | localFileWidget->show(); | 513 | localFileWidget->show(); |
503 | else | 514 | else |
504 | localFileWidget->hide(); | 515 | localFileWidget->hide(); |
505 | 516 | ||
506 | if ( mIsNotLocal->isChecked () ) | 517 | if ( mIsNotLocal->isChecked () ) |
507 | remoteFileWidget->show(); | 518 | remoteFileWidget->show(); |
508 | else | 519 | else |
509 | remoteFileWidget->hide(); | 520 | remoteFileWidget->hide(); |
510 | 521 | ||
511 | if ( mIsPhone->isChecked () ) { | 522 | if ( mIsPhone->isChecked () ) { |
512 | phoneWidget->show(); | 523 | phoneWidget->show(); |
513 | } | 524 | } |
514 | else { | 525 | else { |
515 | phoneWidget->hide(); | 526 | phoneWidget->hide(); |
516 | } | 527 | } |
517 | if ( mIsPi->isChecked () ) { | 528 | if ( mIsPi->isChecked () ) { |
518 | piWidget->show(); | 529 | piWidget->show(); |
519 | } | 530 | } |
520 | else { | 531 | else { |
521 | piWidget->hide(); | 532 | piWidget->hide(); |
522 | } | 533 | } |
523 | 534 | ||
524 | } | 535 | } |
525 | void KSyncPrefsDialog::deleteProfile() | 536 | void KSyncPrefsDialog::deleteProfile() |
526 | { | 537 | { |
527 | //qDebug("KSyncPrefsDialog::deleteProfile() "); | 538 | //qDebug("KSyncPrefsDialog::deleteProfile() "); |
528 | if ( currentSelection >= 0 ) { | 539 | if ( currentSelection >= 0 ) { |
529 | if ( currentSelection < 3 ) { | 540 | if ( currentSelection < 3 ) { |
530 | KMessageBox::error(this,i18n("This profil cannot be deleted!\n"),i18n("KO/Pi config error")); | 541 | KMessageBox::error(this,i18n("This profil cannot be deleted!\n"),i18n("KO/Pi config error")); |
531 | return; | 542 | return; |
532 | } | 543 | } |
533 | KSyncProfile* temp = mSyncProfiles.at(currentSelection); | 544 | KSyncProfile* temp = mSyncProfiles.at(currentSelection); |
534 | mSyncProfiles.remove( temp ); | 545 | mSyncProfiles.remove( temp ); |
535 | mSyncProfileNames.remove( mSyncProfileNames.at( currentSelection )); | 546 | mSyncProfileNames.remove( mSyncProfileNames.at( currentSelection )); |
536 | insertProfiles(); | 547 | insertProfiles(); |
537 | } | 548 | } |
538 | } | 549 | } |
539 | 550 | ||
540 | void KSyncPrefsDialog::saveProfile() | 551 | void KSyncPrefsDialog::saveProfile() |
541 | { | 552 | { |
542 | KSyncProfile* prof; | 553 | KSyncProfile* prof; |
543 | if ( currentSelection >= 0 ) { | 554 | if ( currentSelection >= 0 ) { |
544 | prof = mSyncProfiles.at(currentSelection) ; | 555 | prof = mSyncProfiles.at(currentSelection) ; |
545 | 556 | ||
546 | prof->setRemotePw( mRemotePw->text()); | 557 | prof->setRemotePw( mRemotePw->text()); |
547 | prof->setRemoteIP( mRemoteIP->text()); | 558 | prof->setRemoteIP( mRemoteIP->text()); |
548 | prof->setRemotePort( mRemotePort->text()); | 559 | prof->setRemotePort( mRemotePort->text()); |
549 | 560 | ||
550 | prof->setRemotePwAB( mRemotePwAB->text()); | 561 | prof->setRemotePwAB( mRemotePwAB->text()); |
551 | prof->setRemoteIPAB( mRemoteIPAB->text()); | 562 | prof->setRemoteIPAB( mRemoteIPAB->text()); |
552 | prof->setRemotePortAB( mRemotePortAB->text()); | 563 | prof->setRemotePortAB( mRemotePortAB->text()); |
553 | 564 | ||
554 | prof->setRemotePwPWM( mRemotePwPWM->text()); | 565 | prof->setRemotePwPWM( mRemotePwPWM->text()); |
555 | prof->setRemoteIPPWM( mRemoteIPPWM->text()); | 566 | prof->setRemoteIPPWM( mRemoteIPPWM->text()); |
556 | prof->setRemotePortPWM( mRemotePortPWM->text()); | 567 | prof->setRemotePortPWM( mRemotePortPWM->text()); |
557 | 568 | ||
558 | prof->setPreSyncCommand( mRemotePrecommand->text()); | 569 | prof->setPreSyncCommand( mRemotePrecommand->text()); |
559 | prof->setPostSyncCommand( mRemotePostcommand->text() ); | 570 | prof->setPostSyncCommand( mRemotePostcommand->text() ); |
560 | prof->setLocalTempFile( mLocalTempFile->text()); | 571 | prof->setLocalTempFile( mLocalTempFile->text()); |
561 | prof->setRemoteFileName( mRemoteFile->text() ); | 572 | prof->setRemoteFileName( mRemoteFile->text() ); |
562 | prof->setPreSyncCommandAB( mRemotePrecommandAB->text()); | 573 | prof->setPreSyncCommandAB( mRemotePrecommandAB->text()); |
563 | prof->setPostSyncCommandAB( mRemotePostcommandAB->text() ); | 574 | prof->setPostSyncCommandAB( mRemotePostcommandAB->text() ); |
564 | prof->setLocalTempFileAB( mLocalTempFileAB->text()); | 575 | prof->setLocalTempFileAB( mLocalTempFileAB->text()); |
565 | prof->setRemoteFileNameAB( mRemoteFileAB->text() ); | 576 | prof->setRemoteFileNameAB( mRemoteFileAB->text() ); |
566 | prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text()); | 577 | prof->setPreSyncCommandPWM( mRemotePrecommandPWM->text()); |
567 | prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() ); | 578 | prof->setPostSyncCommandPWM( mRemotePostcommandPWM->text() ); |
568 | prof->setLocalTempFilePWM( mLocalTempFilePWM->text()); | 579 | prof->setLocalTempFilePWM( mLocalTempFilePWM->text()); |
569 | prof->setRemoteFileNamePWM( mRemoteFilePWM->text() ); | 580 | prof->setRemoteFileNamePWM( mRemoteFilePWM->text() ); |
570 | prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); | 581 | prof->setShowSummaryAfterSync( mShowSummaryAfterSync->isChecked() ); |
571 | prof->setAskForPreferences( mAskForPreferences->isChecked()); | 582 | prof->setAskForPreferences( mAskForPreferences->isChecked()); |
572 | prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); | 583 | prof->setWriteBackExisting(mWriteBackExisting->isChecked() ); |
573 | prof->setWriteBackFile( mWriteBackFile->isChecked()); | 584 | prof->setWriteBackFile( mWriteBackFile->isChecked()); |
574 | prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); | 585 | prof->setIncludeInRingSync( mIncludeInRing->isChecked() ); |
575 | prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); | 586 | prof->setIncludeInRingSyncAB( mIncludeInRingAB->isChecked() ); |
576 | prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() ); | 587 | prof->setIncludeInRingSyncPWM( mIncludeInRingPWM->isChecked() ); |
577 | int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; | 588 | int syncprefs = rem->isChecked()*1+newest->isChecked()*2+ ask->isChecked()*3+ f_loc->isChecked()*4+ f_rem->isChecked()*5 ;//+ both->isChecked()*6 ; |
578 | prof->setSyncPrefs( syncprefs); | 589 | prof->setSyncPrefs( syncprefs); |
579 | prof->setIsLocalFileSync( mIsLocal->isChecked() ); | 590 | prof->setIsLocalFileSync( mIsLocal->isChecked() ); |
580 | prof->setIsPhoneSync( mIsPhone->isChecked() ); | 591 | prof->setIsPhoneSync( mIsPhone->isChecked() ); |
581 | prof->setIsPiSync( mIsPi->isChecked() ); | 592 | prof->setIsPiSync( mIsPi->isChecked() ); |
593 | prof->setIsKapiFile( mIsKapiFileL->isChecked() ); | ||
582 | prof->setWriteBackFuture(mWriteBackFuture->isChecked()); | 594 | prof->setWriteBackFuture(mWriteBackFuture->isChecked()); |
583 | prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); | 595 | prof->setWriteBackFutureWeeks(mWriteBackFutureWeeks->value()); |
584 | if ( mWriteContactToSIM ) | 596 | if ( mWriteContactToSIM ) |
585 | prof->setWriteContactToSIM(mWriteContactToSIM->isChecked()); | 597 | prof->setWriteContactToSIM(mWriteContactToSIM->isChecked()); |
586 | prof->setPhoneDevice( mPhoneDevice->text() ); | 598 | prof->setPhoneDevice( mPhoneDevice->text() ); |
587 | prof->setPhoneConnection( mPhoneConnection->text() ); | 599 | prof->setPhoneConnection( mPhoneConnection->text() ); |
588 | prof->setPhoneModel( mPhoneModel->text() ); | 600 | prof->setPhoneModel( mPhoneModel->text() ); |
589 | 601 | ||
590 | } | 602 | } |
591 | 603 | ||
592 | } | 604 | } |
593 | 605 | ||
594 | void KSyncPrefsDialog::insertProfiles() | 606 | void KSyncPrefsDialog::insertProfiles() |
595 | { | 607 | { |
596 | int curItem = mProfileBox->currentItem(); | 608 | int curItem = mProfileBox->currentItem(); |
597 | mProfileBox->blockSignals( true ); | 609 | mProfileBox->blockSignals( true ); |
598 | mProfileBox->clear(); | 610 | mProfileBox->clear(); |
599 | mProfileBox->insertStringList (mSyncProfileNames ); | 611 | mProfileBox->insertStringList (mSyncProfileNames ); |
600 | int item = mSyncProfileNames.count() -1; | 612 | int item = mSyncProfileNames.count() -1; |
601 | if ( curItem >= 0 && mSyncProfileNames.count() > 0 && curItem < mSyncProfileNames.count() ) | 613 | if ( curItem >= 0 && mSyncProfileNames.count() > 0 && curItem < mSyncProfileNames.count() ) |
602 | mProfileBox->setCurrentItem( curItem ); | 614 | mProfileBox->setCurrentItem( curItem ); |
603 | else if ( item >= 0 ) { | 615 | else if ( item >= 0 ) { |
604 | mProfileBox->setCurrentItem( item ); | 616 | mProfileBox->setCurrentItem( item ); |
605 | } | 617 | } |
606 | currentSelection = -1; | 618 | currentSelection = -1; |
607 | if ( mSyncProfileNames.count() > 0 ) { | 619 | if ( mSyncProfileNames.count() > 0 ) { |
608 | //qDebug(" profileChanged( mProfileBox->currentItem() "); | 620 | //qDebug(" profileChanged( mProfileBox->currentItem() "); |
609 | profileChanged( mProfileBox->currentItem() ); | 621 | profileChanged( mProfileBox->currentItem() ); |
610 | currentSelection = mProfileBox->currentItem(); | 622 | currentSelection = mProfileBox->currentItem(); |
611 | } | 623 | } |
612 | mProfileBox->blockSignals( false ); | 624 | mProfileBox->blockSignals( false ); |
613 | } | 625 | } |
614 | 626 | ||
615 | void KSyncPrefsDialog::addProfile ( KSyncProfile* temp ) | 627 | void KSyncPrefsDialog::addProfile ( KSyncProfile* temp ) |
616 | { | 628 | { |
617 | saveProfile(); | 629 | saveProfile(); |
618 | mSyncProfiles.append( temp ); | 630 | mSyncProfiles.append( temp ); |
619 | mSyncProfileNames << temp->getName(); | 631 | mSyncProfileNames << temp->getName(); |
620 | insertProfiles(); | 632 | insertProfiles(); |
621 | int last = mProfileBox->count() -1; | 633 | int last = mProfileBox->count() -1; |
622 | mProfileBox->blockSignals( true ); | 634 | mProfileBox->blockSignals( true ); |
623 | mProfileBox->setCurrentItem( last ); | 635 | mProfileBox->setCurrentItem( last ); |
624 | mProfileBox->blockSignals( false ); | 636 | mProfileBox->blockSignals( false ); |
625 | profileChanged(last); | 637 | profileChanged(last); |
626 | } | 638 | } |
627 | void KSyncPrefsDialog::newProfile() | 639 | void KSyncPrefsDialog::newProfile() |
628 | { | 640 | { |
629 | addProfile ( new KSyncProfile () ); | 641 | addProfile ( new KSyncProfile () ); |
diff --git a/libkdepim/ksyncprefsdialog.h b/libkdepim/ksyncprefsdialog.h index d3f8f4c..c601a58 100644 --- a/libkdepim/ksyncprefsdialog.h +++ b/libkdepim/ksyncprefsdialog.h | |||
@@ -101,51 +101,53 @@ class KSyncPrefsDialog : public KDialog | |||
101 | 101 | ||
102 | QRadioButton* loc, *rem, *newest, *ask, *f_loc,* f_rem, *both; | 102 | QRadioButton* loc, *rem, *newest, *ask, *f_loc,* f_rem, *both; |
103 | 103 | ||
104 | 104 | ||
105 | QLineEdit * mRemotePostcommand; | 105 | QLineEdit * mRemotePostcommand; |
106 | QLineEdit * mRemotePrecommand; | 106 | QLineEdit * mRemotePrecommand; |
107 | QLineEdit * mRemoteFile; | 107 | QLineEdit * mRemoteFile; |
108 | QLineEdit * mLocalTempFile; | 108 | QLineEdit * mLocalTempFile; |
109 | 109 | ||
110 | QLineEdit * mRemotePostcommandAB; | 110 | QLineEdit * mRemotePostcommandAB; |
111 | QLineEdit * mRemotePrecommandAB; | 111 | QLineEdit * mRemotePrecommandAB; |
112 | QLineEdit * mRemoteFileAB; | 112 | QLineEdit * mRemoteFileAB; |
113 | QLineEdit * mLocalTempFileAB; | 113 | QLineEdit * mLocalTempFileAB; |
114 | 114 | ||
115 | QLineEdit * mRemotePostcommandPWM; | 115 | QLineEdit * mRemotePostcommandPWM; |
116 | QLineEdit * mRemotePrecommandPWM; | 116 | QLineEdit * mRemotePrecommandPWM; |
117 | QLineEdit * mRemoteFilePWM; | 117 | QLineEdit * mRemoteFilePWM; |
118 | QLineEdit * mLocalTempFilePWM; | 118 | QLineEdit * mLocalTempFilePWM; |
119 | 119 | ||
120 | 120 | ||
121 | QLineEdit * mRemotePw; | 121 | QLineEdit * mRemotePw; |
122 | QLineEdit * mRemoteIP; | 122 | QLineEdit * mRemoteIP; |
123 | QLineEdit * mRemotePort; | 123 | QLineEdit * mRemotePort; |
124 | 124 | ||
125 | QLineEdit * mRemotePwAB; | 125 | QLineEdit * mRemotePwAB; |
126 | QLineEdit * mRemoteIPAB; | 126 | QLineEdit * mRemoteIPAB; |
127 | QLineEdit * mRemotePortAB; | 127 | QLineEdit * mRemotePortAB; |
128 | 128 | ||
129 | QLineEdit * mRemotePwPWM; | 129 | QLineEdit * mRemotePwPWM; |
130 | QLineEdit * mRemoteIPPWM; | 130 | QLineEdit * mRemoteIPPWM; |
131 | QLineEdit * mRemotePortPWM; | 131 | QLineEdit * mRemotePortPWM; |
132 | 132 | ||
133 | QLineEdit * mPhoneDevice; | 133 | QLineEdit * mPhoneDevice; |
134 | QLineEdit * mPhoneConnection; | 134 | QLineEdit * mPhoneConnection; |
135 | QLineEdit * mPhoneModel; | 135 | QLineEdit * mPhoneModel; |
136 | 136 | ||
137 | QWidget* mSetupSyncAlgTab; | 137 | QWidget* mSetupSyncAlgTab; |
138 | QVBox* localFileWidget; | 138 | QVBox* localFileWidget; |
139 | QVBox* remoteFileWidget; | 139 | QVBox* remoteFileWidget; |
140 | QVBox* phoneWidget; | 140 | QVBox* phoneWidget; |
141 | QVBox* piWidget; | 141 | QVBox* piWidget; |
142 | QCheckBox* mWriteBackFile; | 142 | QCheckBox* mWriteBackFile; |
143 | QCheckBox* mWriteBackFuture; | 143 | QCheckBox* mWriteBackFuture; |
144 | QSpinBox* mWriteBackFutureWeeks; | 144 | QSpinBox* mWriteBackFutureWeeks; |
145 | QCheckBox* mWriteBackExisting; | 145 | QCheckBox* mWriteBackExisting; |
146 | QCheckBox* mAskForPreferences; | 146 | QCheckBox* mAskForPreferences; |
147 | QCheckBox* mShowSummaryAfterSync; | 147 | QCheckBox* mShowSummaryAfterSync; |
148 | QCheckBox* mWriteContactToSIM; | 148 | QCheckBox* mWriteContactToSIM; |
149 | QCheckBox* mIsKapiFileL; | ||
150 | QCheckBox* mIsKapiFileR; | ||
149 | }; | 151 | }; |
150 | 152 | ||
151 | #endif | 153 | #endif |
diff --git a/libkdepim/ksyncprofile.cpp b/libkdepim/ksyncprofile.cpp index 76dfe00..029b70b 100644 --- a/libkdepim/ksyncprofile.cpp +++ b/libkdepim/ksyncprofile.cpp | |||
@@ -31,218 +31,222 @@ | |||
31 | 31 | ||
32 | 32 | ||
33 | KSyncProfile::KSyncProfile(): QObject () | 33 | KSyncProfile::KSyncProfile(): QObject () |
34 | { | 34 | { |
35 | setDefault(); | 35 | setDefault(); |
36 | } | 36 | } |
37 | KSyncProfile::~KSyncProfile() | 37 | KSyncProfile::~KSyncProfile() |
38 | { | 38 | { |
39 | 39 | ||
40 | } | 40 | } |
41 | 41 | ||
42 | 42 | ||
43 | KSyncProfile* KSyncProfile::clone() | 43 | KSyncProfile* KSyncProfile::clone() |
44 | { | 44 | { |
45 | KSyncProfile* myClone = new KSyncProfile(); | 45 | KSyncProfile* myClone = new KSyncProfile(); |
46 | myClone->setRemotePw(mRemotePw); | 46 | myClone->setRemotePw(mRemotePw); |
47 | myClone->setRemoteIP(mRemoteIP); | 47 | myClone->setRemoteIP(mRemoteIP); |
48 | myClone->setRemotePort(mRemotePort); | 48 | myClone->setRemotePort(mRemotePort); |
49 | myClone->setRemotePwAB(mRemotePwAB); | 49 | myClone->setRemotePwAB(mRemotePwAB); |
50 | myClone->setRemoteIPAB(mRemoteIPAB); | 50 | myClone->setRemoteIPAB(mRemoteIPAB); |
51 | myClone->setRemotePortAB(mRemotePortAB); | 51 | myClone->setRemotePortAB(mRemotePortAB); |
52 | myClone->setRemotePwPWM(mRemotePwPWM); | 52 | myClone->setRemotePwPWM(mRemotePwPWM); |
53 | myClone->setRemoteIPPWM(mRemoteIPPWM); | 53 | myClone->setRemoteIPPWM(mRemoteIPPWM); |
54 | myClone->setRemotePortPWM (mRemotePortPWM); | 54 | myClone->setRemotePortPWM (mRemotePortPWM); |
55 | myClone->setPreSyncCommand( mPreSyncCommand ); | 55 | myClone->setPreSyncCommand( mPreSyncCommand ); |
56 | myClone->setPostSyncCommand( mPostSyncCommand ); | 56 | myClone->setPostSyncCommand( mPostSyncCommand ); |
57 | myClone->setLocalTempFile( mLocalTempFile); | 57 | myClone->setLocalTempFile( mLocalTempFile); |
58 | myClone->setRemoteFileName( mRemoteFileName ); | 58 | myClone->setRemoteFileName( mRemoteFileName ); |
59 | myClone->setPreSyncCommandAB( mPreSyncCommandAB ); | 59 | myClone->setPreSyncCommandAB( mPreSyncCommandAB ); |
60 | myClone->setPostSyncCommandAB( mPostSyncCommandAB ); | 60 | myClone->setPostSyncCommandAB( mPostSyncCommandAB ); |
61 | myClone->setLocalTempFileAB( mLocalTempFileAB); | 61 | myClone->setLocalTempFileAB( mLocalTempFileAB); |
62 | myClone->setRemoteFileNameAB( mRemoteFileNameAB ); | 62 | myClone->setRemoteFileNameAB( mRemoteFileNameAB ); |
63 | myClone->setPreSyncCommandPWM( mPreSyncCommandPWM ); | 63 | myClone->setPreSyncCommandPWM( mPreSyncCommandPWM ); |
64 | myClone->setPostSyncCommandPWM( mPostSyncCommandPWM ); | 64 | myClone->setPostSyncCommandPWM( mPostSyncCommandPWM ); |
65 | myClone->setLocalTempFilePWM( mLocalTempFilePWM); | 65 | myClone->setLocalTempFilePWM( mLocalTempFilePWM); |
66 | myClone->setRemoteFileNamePWM( mRemoteFileNamePWM ); | 66 | myClone->setRemoteFileNamePWM( mRemoteFileNamePWM ); |
67 | myClone->setShowSummaryAfterSync( mShowSummaryAfterSync ); | 67 | myClone->setShowSummaryAfterSync( mShowSummaryAfterSync ); |
68 | myClone->setAskForPreferences( mAskForPreferences); | 68 | myClone->setAskForPreferences( mAskForPreferences); |
69 | myClone->setWriteBackExisting(mWriteBackExisting ); | 69 | myClone->setWriteBackExisting(mWriteBackExisting ); |
70 | myClone->setWriteBackFile( mWriteBackFile); | 70 | myClone->setWriteBackFile( mWriteBackFile); |
71 | myClone->setWriteBackFuture( mWriteBackFuture ); | 71 | myClone->setWriteBackFuture( mWriteBackFuture ); |
72 | myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks ); | 72 | myClone->setWriteBackFutureWeeks( mWriteBackFutureWeeks ); |
73 | myClone->setIncludeInRingSync( mIncludeInRingSync ); | 73 | myClone->setIncludeInRingSync( mIncludeInRingSync ); |
74 | myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); | 74 | myClone->setIncludeInRingSyncAB( mIncludeInRingSyncAB ); |
75 | myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM ); | 75 | myClone->setIncludeInRingSyncPWM( mIncludeInRingSyncPWM ); |
76 | myClone->setSyncPrefs( mSyncPrefs); | 76 | myClone->setSyncPrefs( mSyncPrefs); |
77 | myClone->setIsLocalFileSync( mIsLocalFileSync ); | 77 | myClone->setIsLocalFileSync( mIsLocalFileSync ); |
78 | myClone->setIsPhoneSync( mIsPhoneSync ); | 78 | myClone->setIsPhoneSync( mIsPhoneSync ); |
79 | myClone->setIsKapiFile( mIsKapiFile ); | ||
79 | myClone->setIsPiSync( mIsPiSync ); | 80 | myClone->setIsPiSync( mIsPiSync ); |
80 | myClone->setWriteContactToSIM( mWriteContactToSIM ); | 81 | myClone->setWriteContactToSIM( mWriteContactToSIM ); |
81 | myClone->setName( "noName" ); | 82 | myClone->setName( "noName" ); |
82 | //myClone->setIdentifier( "noID" ); | 83 | //myClone->setIdentifier( "noID" ); |
83 | return myClone; | 84 | return myClone; |
84 | } | 85 | } |
85 | 86 | ||
86 | 87 | ||
87 | void KSyncProfile::setDefault() | 88 | void KSyncProfile::setDefault() |
88 | { | 89 | { |
89 | mPreSyncCommand = i18n("command for downloading remote file to local device"); | 90 | mPreSyncCommand = i18n("command for downloading remote file to local device"); |
90 | mPostSyncCommand = i18n("command for uploading local temp file to remote device"); | 91 | mPostSyncCommand = i18n("command for uploading local temp file to remote device"); |
91 | mLocalTempFile = "/tmp/mycalendar.ics"; | 92 | mLocalTempFile = "/tmp/mycalendar.ics"; |
92 | mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics"; | 93 | mRemoteFileName = "/home/polo/kdepim/apps/korganizer/localfile.ics"; |
93 | mPreSyncCommandAB = i18n("command for downloading remote file to local device"); | 94 | mPreSyncCommandAB = i18n("command for downloading remote file to local device"); |
94 | mPostSyncCommandAB = i18n("command for uploading local temp file to remote device"); | 95 | mPostSyncCommandAB = i18n("command for uploading local temp file to remote device"); |
95 | mLocalTempFileAB = "/tmp/std.vcf"; | 96 | mLocalTempFileAB = "/tmp/std.vcf"; |
96 | mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf"; | 97 | mRemoteFileNameAB = "/home/polo/kdepim/apps/kabc/localfile.vcf"; |
97 | mPreSyncCommandPWM = i18n("command for downloading remote file to local device"); | 98 | mPreSyncCommandPWM = i18n("command for downloading remote file to local device"); |
98 | mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device"); | 99 | mPostSyncCommandPWM = i18n("command for uploading local temp file to remote device"); |
99 | mLocalTempFilePWM = "/tmp/passwords.pwm"; | 100 | mLocalTempFilePWM = "/tmp/passwords.pwm"; |
100 | mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm"; | 101 | mRemoteFileNamePWM = "/home/polo/kdepim/apps/pwmanager/localfile.pwm"; |
101 | 102 | ||
102 | mRemotePw = "abc"; | 103 | mRemotePw = "abc"; |
103 | mRemoteIP = "192.168.0.99"; | 104 | mRemoteIP = "192.168.0.99"; |
104 | mRemotePort = "9197"; | 105 | mRemotePort = "9197"; |
105 | 106 | ||
106 | mRemotePwAB = "abc"; | 107 | mRemotePwAB = "abc"; |
107 | mRemoteIPAB = "192.168.0.99"; | 108 | mRemoteIPAB = "192.168.0.99"; |
108 | mRemotePortAB = "9198"; | 109 | mRemotePortAB = "9198"; |
109 | 110 | ||
110 | mRemotePwPWM = "abc"; | 111 | mRemotePwPWM = "abc"; |
111 | mRemoteIPPWM = "192.168.0.99"; | 112 | mRemoteIPPWM = "192.168.0.99"; |
112 | mRemotePortPWM = "9199"; | 113 | mRemotePortPWM = "9199"; |
113 | 114 | ||
114 | mShowSummaryAfterSync = true; | 115 | mShowSummaryAfterSync = true; |
115 | mAskForPreferences = true; | 116 | mAskForPreferences = true; |
116 | mWriteBackExisting = false; | 117 | mWriteBackExisting = false; |
117 | mWriteBackFuture = false; | 118 | mWriteBackFuture = false; |
118 | mWriteBackFutureWeeks = 12; | 119 | mWriteBackFutureWeeks = 12; |
119 | mWriteBackFile = true; | 120 | mWriteBackFile = true; |
120 | mIncludeInRingSync = false; | 121 | mIncludeInRingSync = false; |
121 | mIncludeInRingSyncAB = false; | 122 | mIncludeInRingSyncAB = false; |
122 | mIncludeInRingSyncPWM = false; | 123 | mIncludeInRingSyncPWM = false; |
123 | mSyncPrefs = SYNC_PREF_ASK; | 124 | mSyncPrefs = SYNC_PREF_ASK; |
124 | mIsLocalFileSync = true; | 125 | mIsLocalFileSync = true; |
125 | mName = "noName"; | 126 | mName = "noName"; |
126 | mIsPhoneSync = false; | 127 | mIsPhoneSync = false; |
127 | mIsPiSync = false; | 128 | mIsPiSync = false; |
129 | mIsKapiFile = false; | ||
128 | mWriteContactToSIM = false; | 130 | mWriteContactToSIM = false; |
129 | mPhoneDevice = "/dev/ircomm"; | 131 | mPhoneDevice = "/dev/ircomm"; |
130 | mPhoneConnection = "irda"; | 132 | mPhoneConnection = "irda"; |
131 | mPhoneModel = "6310i"; | 133 | mPhoneModel = "6310i"; |
132 | } | 134 | } |
133 | void KSyncProfile::readConfig(KConfig *config ) | 135 | void KSyncProfile::readConfig(KConfig *config ) |
134 | { | 136 | { |
135 | if (config) | 137 | if (config) |
136 | { | 138 | { |
137 | 139 | ||
138 | config->setGroup( mName ); | 140 | config->setGroup( mName ); |
139 | 141 | ||
140 | mName = config->readEntry( "Name", mName ); | 142 | mName = config->readEntry( "Name", mName ); |
141 | 143 | ||
142 | mRemotePw = config->readEntry( "RemotePw",mRemotePw ); | 144 | mRemotePw = config->readEntry( "RemotePw",mRemotePw ); |
143 | mRemoteIP = config->readEntry( "RemoteIP",mRemoteIP ); | 145 | mRemoteIP = config->readEntry( "RemoteIP",mRemoteIP ); |
144 | mRemotePort = config->readEntry( "RemotePort", mRemotePort ); | 146 | mRemotePort = config->readEntry( "RemotePort", mRemotePort ); |
145 | mRemotePwAB = config->readEntry( "RemotePwAB", mRemotePwAB ); | 147 | mRemotePwAB = config->readEntry( "RemotePwAB", mRemotePwAB ); |
146 | mRemoteIPAB = config->readEntry( "RemoteIPAB", mRemoteIPAB ); | 148 | mRemoteIPAB = config->readEntry( "RemoteIPAB", mRemoteIPAB ); |
147 | mRemotePortAB = config->readEntry( "RemotePortAB", mRemotePortAB ); | 149 | mRemotePortAB = config->readEntry( "RemotePortAB", mRemotePortAB ); |
148 | mRemotePwPWM = config->readEntry( "RemotePwPWM", mRemotePwPWM ); | 150 | mRemotePwPWM = config->readEntry( "RemotePwPWM", mRemotePwPWM ); |
149 | mRemoteIPPWM = config->readEntry( "RemoteIPPWM", mRemoteIPPWM ); | 151 | mRemoteIPPWM = config->readEntry( "RemoteIPPWM", mRemoteIPPWM ); |
150 | mRemotePortPWM = config->readEntry( "RemotePortPWM", mRemotePortPWM ); | 152 | mRemotePortPWM = config->readEntry( "RemotePortPWM", mRemotePortPWM ); |
151 | 153 | ||
152 | mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand ); | 154 | mPreSyncCommand = config->readEntry( "PreSyncCommand",mPreSyncCommand ); |
153 | mPostSyncCommand = config->readEntry( "PostSyncCommand", mPostSyncCommand ); | 155 | mPostSyncCommand = config->readEntry( "PostSyncCommand", mPostSyncCommand ); |
154 | mLocalTempFile = config->readEntry( "LocalTempFile", mLocalTempFile ); | 156 | mLocalTempFile = config->readEntry( "LocalTempFile", mLocalTempFile ); |
155 | mRemoteFileName = config->readEntry( "RemoteFileName", mRemoteFileName ); | 157 | mRemoteFileName = config->readEntry( "RemoteFileName", mRemoteFileName ); |
156 | 158 | ||
157 | mPreSyncCommandAB = config->readEntry( "PreSyncCommandAB",mPreSyncCommandAB ); | 159 | mPreSyncCommandAB = config->readEntry( "PreSyncCommandAB",mPreSyncCommandAB ); |
158 | mPostSyncCommandAB = config->readEntry( "PostSyncCommandAB", mPostSyncCommandAB ); | 160 | mPostSyncCommandAB = config->readEntry( "PostSyncCommandAB", mPostSyncCommandAB ); |
159 | mLocalTempFileAB = config->readEntry( "LocalTempFileAB", mLocalTempFileAB ); | 161 | mLocalTempFileAB = config->readEntry( "LocalTempFileAB", mLocalTempFileAB ); |
160 | mRemoteFileNameAB = config->readEntry( "RemoteFileNameAB", mRemoteFileNameAB ); | 162 | mRemoteFileNameAB = config->readEntry( "RemoteFileNameAB", mRemoteFileNameAB ); |
161 | 163 | ||
162 | mPreSyncCommandPWM = config->readEntry( "PreSyncCommandPWM",mPreSyncCommandPWM ); | 164 | mPreSyncCommandPWM = config->readEntry( "PreSyncCommandPWM",mPreSyncCommandPWM ); |
163 | mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM ); | 165 | mPostSyncCommandPWM = config->readEntry( "PostSyncCommandPWM", mPostSyncCommandPWM ); |
164 | mLocalTempFilePWM = config->readEntry( "LocalTempFilePWM", mLocalTempFilePWM ); | 166 | mLocalTempFilePWM = config->readEntry( "LocalTempFilePWM", mLocalTempFilePWM ); |
165 | mRemoteFileNamePWM = config->readEntry( "RemoteFileNamePWM", mRemoteFileNamePWM ); | 167 | mRemoteFileNamePWM = config->readEntry( "RemoteFileNamePWM", mRemoteFileNamePWM ); |
166 | 168 | ||
167 | mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice ); | 169 | mPhoneDevice = config->readEntry( "PhoneDevice", mPhoneDevice ); |
168 | mPhoneConnection = config->readEntry( "PhoneConnection", mPhoneConnection ); | 170 | mPhoneConnection = config->readEntry( "PhoneConnection", mPhoneConnection ); |
169 | mPhoneModel = config->readEntry( "PhoneModel", mPhoneModel ); | 171 | mPhoneModel = config->readEntry( "PhoneModel", mPhoneModel ); |
170 | 172 | ||
171 | mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync ); | 173 | mIncludeInRingSync = config->readBoolEntry( "IncludeInRingSync",mIncludeInRingSync ); |
172 | mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); | 174 | mIncludeInRingSyncAB = config->readBoolEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); |
173 | mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM ); | 175 | mIncludeInRingSyncPWM = config->readBoolEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM ); |
174 | mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); | 176 | mShowSummaryAfterSync = config->readBoolEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); |
175 | mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences ); | 177 | mAskForPreferences = config->readBoolEntry( "AskForPreferences",mAskForPreferences ); |
176 | mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting ); | 178 | mWriteBackExisting = config->readBoolEntry( "WriteBackExisting",mWriteBackExisting ); |
177 | mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture ); | 179 | mWriteBackFuture = config->readBoolEntry( "WriteBackFuture",mWriteBackFuture ); |
178 | mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile ); | 180 | mWriteBackFile = config->readBoolEntry( "WriteBackFile",mWriteBackFile ); |
179 | mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM ); | 181 | mWriteContactToSIM = config->readBoolEntry( "WriteContactToSIM",mWriteContactToSIM ); |
180 | mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs ); | 182 | mSyncPrefs = config->readNumEntry( "SyncPrefs", mSyncPrefs ); |
181 | mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks ); | 183 | mWriteBackFutureWeeks = config->readNumEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks ); |
182 | mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync ); | 184 | mIsLocalFileSync= config->readBoolEntry( "IsLocalFileSync", mIsLocalFileSync ); |
183 | mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync ); | 185 | mIsPhoneSync= config->readBoolEntry( "IsPhoneSync", mIsPhoneSync ); |
184 | mIsPiSync= config->readBoolEntry( "IsPiSync", mIsPiSync ); | 186 | mIsPiSync= config->readBoolEntry( "IsPiSync", mIsPiSync ); |
187 | mIsKapiFile = config->readBoolEntry( "IsKapiFile", mIsKapiFile ); | ||
185 | } | 188 | } |
186 | else | 189 | else |
187 | { | 190 | { |
188 | setDefault(); | 191 | setDefault(); |
189 | } | 192 | } |
190 | } | 193 | } |
191 | 194 | ||
192 | void KSyncProfile::deleteConfig(KConfig *config ) | 195 | void KSyncProfile::deleteConfig(KConfig *config ) |
193 | { | 196 | { |
194 | config->deleteGroup( mName ); | 197 | config->deleteGroup( mName ); |
195 | } | 198 | } |
196 | 199 | ||
197 | void KSyncProfile::writeConfig( KConfig * config ) | 200 | void KSyncProfile::writeConfig( KConfig * config ) |
198 | { | 201 | { |
199 | config->setGroup(mName); | 202 | config->setGroup(mName); |
200 | 203 | ||
201 | config->writeEntry( "RemotePw", mRemotePw); | 204 | config->writeEntry( "RemotePw", mRemotePw); |
202 | config->writeEntry( "RemoteIP", mRemoteIP); | 205 | config->writeEntry( "RemoteIP", mRemoteIP); |
203 | config->writeEntry( "RemotePort", mRemotePort); | 206 | config->writeEntry( "RemotePort", mRemotePort); |
204 | 207 | ||
205 | config->writeEntry( "RemotePwAB", mRemotePwAB); | 208 | config->writeEntry( "RemotePwAB", mRemotePwAB); |
206 | config->writeEntry( "RemoteIPAB", mRemoteIPAB); | 209 | config->writeEntry( "RemoteIPAB", mRemoteIPAB); |
207 | config->writeEntry( "RemotePortAB", mRemotePortAB); | 210 | config->writeEntry( "RemotePortAB", mRemotePortAB); |
208 | 211 | ||
209 | config->writeEntry( "RemotePwPWM", mRemotePwPWM); | 212 | config->writeEntry( "RemotePwPWM", mRemotePwPWM); |
210 | config->writeEntry( "RemoteIPPWM", mRemoteIPPWM); | 213 | config->writeEntry( "RemoteIPPWM", mRemoteIPPWM); |
211 | config->writeEntry( "RemotePortPWM", mRemotePortPWM); | 214 | config->writeEntry( "RemotePortPWM", mRemotePortPWM); |
212 | 215 | ||
213 | config->writeEntry( "Name", mName ); | 216 | config->writeEntry( "Name", mName ); |
214 | config->writeEntry( "PreSyncCommand",mPreSyncCommand ); | 217 | config->writeEntry( "PreSyncCommand",mPreSyncCommand ); |
215 | config->writeEntry( "PostSyncCommand", mPostSyncCommand ); | 218 | config->writeEntry( "PostSyncCommand", mPostSyncCommand ); |
216 | config->writeEntry( "LocalTempFile", mLocalTempFile ); | 219 | config->writeEntry( "LocalTempFile", mLocalTempFile ); |
217 | config->writeEntry( "RemoteFileName", mRemoteFileName ); | 220 | config->writeEntry( "RemoteFileName", mRemoteFileName ); |
218 | 221 | ||
219 | config->writeEntry( "PreSyncCommandAB",mPreSyncCommandAB ); | 222 | config->writeEntry( "PreSyncCommandAB",mPreSyncCommandAB ); |
220 | config->writeEntry( "PostSyncCommandAB", mPostSyncCommandAB ); | 223 | config->writeEntry( "PostSyncCommandAB", mPostSyncCommandAB ); |
221 | config->writeEntry( "LocalTempFileAB", mLocalTempFileAB ); | 224 | config->writeEntry( "LocalTempFileAB", mLocalTempFileAB ); |
222 | config->writeEntry( "RemoteFileNameAB", mRemoteFileNameAB ); | 225 | config->writeEntry( "RemoteFileNameAB", mRemoteFileNameAB ); |
223 | 226 | ||
224 | config->writeEntry( "PreSyncCommandPWM",mPreSyncCommandPWM ); | 227 | config->writeEntry( "PreSyncCommandPWM",mPreSyncCommandPWM ); |
225 | config->writeEntry( "PostSyncCommandPWM", mPostSyncCommandPWM ); | 228 | config->writeEntry( "PostSyncCommandPWM", mPostSyncCommandPWM ); |
226 | config->writeEntry( "LocalTempFilePWM", mLocalTempFilePWM ); | 229 | config->writeEntry( "LocalTempFilePWM", mLocalTempFilePWM ); |
227 | config->writeEntry( "RemoteFileNamePWM", mRemoteFileNamePWM ); | 230 | config->writeEntry( "RemoteFileNamePWM", mRemoteFileNamePWM ); |
228 | 231 | ||
229 | config->writeEntry( "PhoneDevice", mPhoneDevice ); | 232 | config->writeEntry( "PhoneDevice", mPhoneDevice ); |
230 | config->writeEntry( "PhoneConnection", mPhoneConnection ); | 233 | config->writeEntry( "PhoneConnection", mPhoneConnection ); |
231 | config->writeEntry( "PhoneModel", mPhoneModel ); | 234 | config->writeEntry( "PhoneModel", mPhoneModel ); |
232 | 235 | ||
233 | config->writeEntry( "IncludeInRingSync",mIncludeInRingSync ); | 236 | config->writeEntry( "IncludeInRingSync",mIncludeInRingSync ); |
234 | config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); | 237 | config->writeEntry( "IncludeInRingSyncAB",mIncludeInRingSyncAB ); |
235 | config->writeEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM ); | 238 | config->writeEntry( "IncludeInRingSyncPWM",mIncludeInRingSyncPWM ); |
236 | config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); | 239 | config->writeEntry( "ShowSummaryAfterSync", mShowSummaryAfterSync ); |
237 | config->writeEntry( "AskForPreferences",mAskForPreferences ); | 240 | config->writeEntry( "AskForPreferences",mAskForPreferences ); |
238 | config->writeEntry( "WriteBackExisting",mWriteBackExisting ); | 241 | config->writeEntry( "WriteBackExisting",mWriteBackExisting ); |
239 | config->writeEntry( "WriteBackFuture",mWriteBackFuture ); | 242 | config->writeEntry( "WriteBackFuture",mWriteBackFuture ); |
240 | config->writeEntry( "WriteBackFile",mWriteBackFile ); | 243 | config->writeEntry( "WriteBackFile",mWriteBackFile ); |
241 | config->writeEntry( "WriteContactToSIM",mWriteContactToSIM ); | 244 | config->writeEntry( "WriteContactToSIM",mWriteContactToSIM ); |
242 | config->writeEntry( "SyncPrefs", mSyncPrefs ); | 245 | config->writeEntry( "SyncPrefs", mSyncPrefs ); |
243 | config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks); | 246 | config->writeEntry( "WriteBackFutureWeeks", mWriteBackFutureWeeks); |
244 | config->writeEntry( "IsLocalFileSync", mIsLocalFileSync ); | 247 | config->writeEntry( "IsLocalFileSync", mIsLocalFileSync ); |
245 | config->writeEntry( "IsPhoneSync", mIsPhoneSync ); | 248 | config->writeEntry( "IsPhoneSync", mIsPhoneSync ); |
246 | config->writeEntry( "IsPiSync", mIsPiSync ); | 249 | config->writeEntry( "IsPiSync", mIsPiSync ); |
250 | config->writeEntry( "IsKapiFile", mIsKapiFile ); | ||
247 | } | 251 | } |
248 | 252 | ||
diff --git a/libkdepim/ksyncprofile.h b/libkdepim/ksyncprofile.h index 6a68bd7..0a59111 100644 --- a/libkdepim/ksyncprofile.h +++ b/libkdepim/ksyncprofile.h | |||
@@ -89,97 +89,100 @@ class KSyncProfile : public QObject { | |||
89 | void setPostSyncCommandPWM( const QString& n ) {mPostSyncCommandPWM = n;} | 89 | void setPostSyncCommandPWM( const QString& n ) {mPostSyncCommandPWM = n;} |
90 | QString getPostSyncCommandPWM( ) { return mPostSyncCommandPWM;} | 90 | QString getPostSyncCommandPWM( ) { return mPostSyncCommandPWM;} |
91 | void setLocalTempFilePWM( const QString& n ) { mLocalTempFilePWM= n;} | 91 | void setLocalTempFilePWM( const QString& n ) { mLocalTempFilePWM= n;} |
92 | QString getLocalTempFilePWM( ) { return mLocalTempFilePWM;} | 92 | QString getLocalTempFilePWM( ) { return mLocalTempFilePWM;} |
93 | void setRemoteFileNamePWM( const QString& n ) { mRemoteFileNamePWM = n;} | 93 | void setRemoteFileNamePWM( const QString& n ) { mRemoteFileNamePWM = n;} |
94 | QString getRemoteFileNamePWM( ) { return mRemoteFileNamePWM;} | 94 | QString getRemoteFileNamePWM( ) { return mRemoteFileNamePWM;} |
95 | 95 | ||
96 | void setPhoneDevice( const QString& n ) { mPhoneDevice = n;} | 96 | void setPhoneDevice( const QString& n ) { mPhoneDevice = n;} |
97 | QString getPhoneDevice( ) { return mPhoneDevice;} | 97 | QString getPhoneDevice( ) { return mPhoneDevice;} |
98 | void setPhoneConnection( const QString& n ) { mPhoneConnection = n;} | 98 | void setPhoneConnection( const QString& n ) { mPhoneConnection = n;} |
99 | QString getPhoneConnection( ) { return mPhoneConnection;} | 99 | QString getPhoneConnection( ) { return mPhoneConnection;} |
100 | void setPhoneModel( const QString& n ) { mPhoneModel = n;} | 100 | void setPhoneModel( const QString& n ) { mPhoneModel = n;} |
101 | QString getPhoneModel( ) { return mPhoneModel;} | 101 | QString getPhoneModel( ) { return mPhoneModel;} |
102 | /* | 102 | /* |
103 | void set( const QString& n ) { = n;} | 103 | void set( const QString& n ) { = n;} |
104 | QString get( ) { return ;} | 104 | QString get( ) { return ;} |
105 | */ | 105 | */ |
106 | 106 | ||
107 | void setName( const QString& n ) {mName = n;} | 107 | void setName( const QString& n ) {mName = n;} |
108 | QString getName( ) { return mName;} | 108 | QString getName( ) { return mName;} |
109 | void setShowSummaryAfterSync( bool b ) { mShowSummaryAfterSync = b;} | 109 | void setShowSummaryAfterSync( bool b ) { mShowSummaryAfterSync = b;} |
110 | bool getShowSummaryAfterSync( ) { return mShowSummaryAfterSync ;} | 110 | bool getShowSummaryAfterSync( ) { return mShowSummaryAfterSync ;} |
111 | void setAskForPreferences( bool b ) { mAskForPreferences= b;} | 111 | void setAskForPreferences( bool b ) { mAskForPreferences= b;} |
112 | bool getAskForPreferences( ) { return mAskForPreferences;} | 112 | bool getAskForPreferences( ) { return mAskForPreferences;} |
113 | void setWriteBackExisting( bool b ) { mWriteBackExisting = b;} | 113 | void setWriteBackExisting( bool b ) { mWriteBackExisting = b;} |
114 | bool getWriteBackExisting( ) { return mWriteBackExisting;} | 114 | bool getWriteBackExisting( ) { return mWriteBackExisting;} |
115 | void setWriteBackFuture( bool b ) { mWriteBackFuture = b;} | 115 | void setWriteBackFuture( bool b ) { mWriteBackFuture = b;} |
116 | bool getWriteBackFuture( ) { return mWriteBackFuture;} | 116 | bool getWriteBackFuture( ) { return mWriteBackFuture;} |
117 | void setWriteBackFile( bool b ) { mWriteBackFile= b;} | 117 | void setWriteBackFile( bool b ) { mWriteBackFile= b;} |
118 | bool getWriteBackFile( ) { return mWriteBackFile;} | 118 | bool getWriteBackFile( ) { return mWriteBackFile;} |
119 | void setWriteContactToSIM( bool b ) { mWriteContactToSIM= b;} | 119 | void setWriteContactToSIM( bool b ) { mWriteContactToSIM= b;} |
120 | bool getWriteContactToSIM( ) { return mWriteContactToSIM;} | 120 | bool getWriteContactToSIM( ) { return mWriteContactToSIM;} |
121 | void setIncludeInRingSync( bool b ) {mIncludeInRingSync = b;} | 121 | void setIncludeInRingSync( bool b ) {mIncludeInRingSync = b;} |
122 | bool getIncludeInRingSync( ) { return mIncludeInRingSync;} | 122 | bool getIncludeInRingSync( ) { return mIncludeInRingSync;} |
123 | void setIncludeInRingSyncAB( bool b ) {mIncludeInRingSyncAB = b;} | 123 | void setIncludeInRingSyncAB( bool b ) {mIncludeInRingSyncAB = b;} |
124 | bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;} | 124 | bool getIncludeInRingSyncAB( ) { return mIncludeInRingSyncAB;} |
125 | void setIncludeInRingSyncPWM( bool b ) {mIncludeInRingSyncPWM = b;} | 125 | void setIncludeInRingSyncPWM( bool b ) {mIncludeInRingSyncPWM = b;} |
126 | bool getIncludeInRingSyncPWM( ) { return mIncludeInRingSyncPWM;} | 126 | bool getIncludeInRingSyncPWM( ) { return mIncludeInRingSyncPWM;} |
127 | void setSyncPrefs( int n ) { mSyncPrefs= n;} | 127 | void setSyncPrefs( int n ) { mSyncPrefs= n;} |
128 | int getSyncPrefs( ) { return mSyncPrefs;} | 128 | int getSyncPrefs( ) { return mSyncPrefs;} |
129 | void setWriteBackFutureWeeks( int n ) { mWriteBackFutureWeeks= n;} | 129 | void setWriteBackFutureWeeks( int n ) { mWriteBackFutureWeeks= n;} |
130 | int getWriteBackFutureWeeks( ) { return mWriteBackFutureWeeks;} | 130 | int getWriteBackFutureWeeks( ) { return mWriteBackFutureWeeks;} |
131 | void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;} | 131 | void setIsLocalFileSync( bool b ) { mIsLocalFileSync= b;} |
132 | bool getIsLocalFileSync( ) { return mIsLocalFileSync;} | 132 | bool getIsLocalFileSync( ) { return mIsLocalFileSync;} |
133 | void setIsPhoneSync( bool b ) { mIsPhoneSync= b;} | 133 | void setIsPhoneSync( bool b ) { mIsPhoneSync= b;} |
134 | bool getIsPhoneSync( ) { return mIsPhoneSync;} | 134 | bool getIsPhoneSync( ) { return mIsPhoneSync;} |
135 | void setIsPiSync( bool b ) { mIsPiSync= b;} | 135 | void setIsPiSync( bool b ) { mIsPiSync= b;} |
136 | bool getIsPiSync( ) { return mIsPiSync;} | 136 | bool getIsPiSync( ) { return mIsPiSync;} |
137 | void setIsKapiFile( bool b ) { mIsKapiFile= b;} | ||
138 | bool getIsKapiFile( ) { return mIsKapiFile;} | ||
137 | private: | 139 | private: |
138 | QString mName; | 140 | QString mName; |
139 | QString mPreSyncCommand; | 141 | QString mPreSyncCommand; |
140 | QString mPostSyncCommand; | 142 | QString mPostSyncCommand; |
141 | QString mLocalTempFile; | 143 | QString mLocalTempFile; |
142 | QString mRemoteFileName; | 144 | QString mRemoteFileName; |
143 | QString mPreSyncCommandAB; | 145 | QString mPreSyncCommandAB; |
144 | QString mPostSyncCommandAB; | 146 | QString mPostSyncCommandAB; |
145 | QString mLocalTempFileAB; | 147 | QString mLocalTempFileAB; |
146 | QString mRemoteFileNameAB; | 148 | QString mRemoteFileNameAB; |
147 | QString mPreSyncCommandPWM; | 149 | QString mPreSyncCommandPWM; |
148 | QString mPostSyncCommandPWM; | 150 | QString mPostSyncCommandPWM; |
149 | QString mLocalTempFilePWM; | 151 | QString mLocalTempFilePWM; |
150 | QString mRemoteFileNamePWM; | 152 | QString mRemoteFileNamePWM; |
151 | 153 | ||
152 | QString mRemotePw; | 154 | QString mRemotePw; |
153 | QString mRemoteIP; | 155 | QString mRemoteIP; |
154 | QString mRemotePort; | 156 | QString mRemotePort; |
155 | 157 | ||
156 | QString mRemotePwAB; | 158 | QString mRemotePwAB; |
157 | QString mRemoteIPAB; | 159 | QString mRemoteIPAB; |
158 | QString mRemotePortAB; | 160 | QString mRemotePortAB; |
159 | 161 | ||
160 | QString mRemotePwPWM; | 162 | QString mRemotePwPWM; |
161 | QString mRemoteIPPWM; | 163 | QString mRemoteIPPWM; |
162 | QString mRemotePortPWM; | 164 | QString mRemotePortPWM; |
163 | 165 | ||
164 | QString mPhoneDevice; | 166 | QString mPhoneDevice; |
165 | QString mPhoneConnection; | 167 | QString mPhoneConnection; |
166 | QString mPhoneModel; | 168 | QString mPhoneModel; |
167 | 169 | ||
168 | bool mIncludeInRingSync; | 170 | bool mIncludeInRingSync; |
169 | bool mIncludeInRingSyncAB; | 171 | bool mIncludeInRingSyncAB; |
170 | bool mIncludeInRingSyncPWM; | 172 | bool mIncludeInRingSyncPWM; |
171 | int mSyncPrefs; | 173 | int mSyncPrefs; |
172 | bool mWriteBackFile; | 174 | bool mWriteBackFile; |
173 | bool mWriteBackExisting; | 175 | bool mWriteBackExisting; |
174 | bool mWriteBackFuture; | 176 | bool mWriteBackFuture; |
175 | int mWriteBackFutureWeeks; | 177 | int mWriteBackFutureWeeks; |
176 | bool mAskForPreferences; | 178 | bool mAskForPreferences; |
177 | bool mShowSummaryAfterSync; | 179 | bool mShowSummaryAfterSync; |
178 | bool mIsLocalFileSync; | 180 | bool mIsLocalFileSync; |
179 | bool mIsPhoneSync; | 181 | bool mIsPhoneSync; |
180 | bool mWriteContactToSIM; | 182 | bool mWriteContactToSIM; |
181 | 183 | ||
182 | bool mIsPiSync; | 184 | bool mIsPiSync; |
185 | bool mIsKapiFile; | ||
183 | }; | 186 | }; |
184 | 187 | ||
185 | #endif | 188 | #endif |