-rw-r--r-- | kaddressbook/kabcore.cpp | 12 | ||||
-rw-r--r-- | kaddressbook/kabcore.h | 1 |
2 files changed, 10 insertions, 3 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index 6404410..fa80f5c 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2733,149 +2733,155 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2733 | 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 ); | 2733 | 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 ); |
2734 | if ( syncManager->mShowSyncSummary ) { | 2734 | if ( syncManager->mShowSyncSummary ) { |
2735 | KMessageBox::information(this, mes, i18n("KA/Pi Synchronization") ); | 2735 | KMessageBox::information(this, mes, i18n("KA/Pi Synchronization") ); |
2736 | } | 2736 | } |
2737 | qDebug( mes ); | 2737 | qDebug( mes ); |
2738 | return syncOK; | 2738 | return syncOK; |
2739 | } | 2739 | } |
2740 | 2740 | ||
2741 | 2741 | ||
2742 | //this is a overwritten callbackmethods from the syncinterface | 2742 | //this is a overwritten callbackmethods from the syncinterface |
2743 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) | 2743 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) |
2744 | { | 2744 | { |
2745 | 2745 | ||
2746 | //pending prepare addresseeview for output | 2746 | //pending prepare addresseeview for output |
2747 | //pending detect, if remote file has REV field. if not switch to external sync | 2747 | //pending detect, if remote file has REV field. if not switch to external sync |
2748 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 2748 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
2749 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 2749 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
2750 | 2750 | ||
2751 | AddressBook abLocal(filename,"syncContact"); | 2751 | AddressBook abLocal(filename,"syncContact"); |
2752 | bool syncOK = false; | 2752 | bool syncOK = false; |
2753 | if ( abLocal.load() ) { | 2753 | if ( abLocal.load() ) { |
2754 | qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode ); | 2754 | qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode ); |
2755 | bool external = false; | 2755 | bool external = false; |
2756 | bool isXML = false; | 2756 | bool isXML = false; |
2757 | if ( filename.right(4) == ".xml") { | 2757 | if ( filename.right(4) == ".xml") { |
2758 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2758 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2759 | isXML = true; | 2759 | isXML = true; |
2760 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice ); | 2760 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice ); |
2761 | } else { | 2761 | } else { |
2762 | Addressee lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); | 2762 | Addressee lse = mAddressBook->findByUid( "last-syncAddressee-"+mCurrentSyncDevice ); |
2763 | if ( ! lse.isEmpty() ) { | 2763 | if ( ! lse.isEmpty() ) { |
2764 | if ( lse.familyName().left(4) == "!E: " ) | 2764 | if ( lse.familyName().left(4) == "!E: " ) |
2765 | external = true; | 2765 | external = true; |
2766 | } else { | 2766 | } else { |
2767 | bool found = false; | 2767 | bool found = false; |
2768 | AddressBook::Iterator it; | 2768 | AddressBook::Iterator it; |
2769 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 2769 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
2770 | if ( (*it).revision().date().year() > 2003 ) { | 2770 | if ( (*it).revision().date().year() > 2003 ) { |
2771 | found = true; | 2771 | found = true; |
2772 | break; | 2772 | break; |
2773 | } | 2773 | } |
2774 | } | 2774 | } |
2775 | external = ! found; | 2775 | external = ! found; |
2776 | } | 2776 | } |
2777 | 2777 | ||
2778 | if ( external ) { | 2778 | if ( external ) { |
2779 | qDebug("Setting vcf mode to external "); | 2779 | qDebug("Setting vcf mode to external "); |
2780 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2780 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2781 | AddressBook::Iterator it; | 2781 | AddressBook::Iterator it; |
2782 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 2782 | for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
2783 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); | 2783 | (*it).setID( mCurrentSyncDevice, (*it).uid() ); |
2784 | (*it).computeCsum( mCurrentSyncDevice ); | 2784 | (*it).computeCsum( mCurrentSyncDevice ); |
2785 | } | 2785 | } |
2786 | } | 2786 | } |
2787 | } | 2787 | } |
2788 | //AddressBook::Iterator it; | 2788 | //AddressBook::Iterator it; |
2789 | //QStringList vcards; | 2789 | //QStringList vcards; |
2790 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { | 2790 | //for ( it = abLocal.begin(); it != abLocal.end(); ++it ) { |
2791 | // qDebug("Name %s ", (*it).familyName().latin1()); | 2791 | // qDebug("Name %s ", (*it).familyName().latin1()); |
2792 | //} | 2792 | //} |
2793 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); | 2793 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, mode ); |
2794 | if ( syncOK ) { | 2794 | if ( syncOK ) { |
2795 | if ( syncManager->mWriteBackFile ) | 2795 | if ( syncManager->mWriteBackFile ) |
2796 | { | 2796 | { |
2797 | if ( external ) | 2797 | if ( external ) |
2798 | abLocal.removeSyncAddressees( !isXML); | 2798 | abLocal.removeSyncAddressees( !isXML); |
2799 | qDebug("Saving remote AB "); | 2799 | qDebug("Saving remote AB "); |
2800 | abLocal.saveAB(); | 2800 | abLocal.saveAB(); |
2801 | if ( isXML ) { | 2801 | if ( isXML ) { |
2802 | // afterwrite processing | 2802 | // afterwrite processing |
2803 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); | 2803 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); |
2804 | } | 2804 | } |
2805 | } | 2805 | } |
2806 | } | 2806 | } |
2807 | setModified(); | 2807 | setModified(); |
2808 | 2808 | ||
2809 | } | 2809 | } |
2810 | if ( syncOK ) | 2810 | if ( syncOK ) |
2811 | mViewManager->refreshView(); | 2811 | mViewManager->refreshView(); |
2812 | return syncOK; | 2812 | return syncOK; |
2813 | #if 0 | 2813 | #if 0 |
2814 | 2814 | ||
2815 | if ( storage->load(KOPrefs::instance()->mUseQuicksave) ) { | 2815 | if ( storage->load(KOPrefs::instance()->mUseQuicksave) ) { |
2816 | getEventViewerDialog()->setSyncMode( true ); | 2816 | getEventViewerDialog()->setSyncMode( true ); |
2817 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); | 2817 | syncOK = synchronizeCalendar( mCalendar, calendar, mode ); |
2818 | getEventViewerDialog()->setSyncMode( false ); | 2818 | getEventViewerDialog()->setSyncMode( false ); |
2819 | if ( syncOK ) { | 2819 | if ( syncOK ) { |
2820 | if ( KOPrefs::instance()->mWriteBackFile ) | 2820 | if ( KOPrefs::instance()->mWriteBackFile ) |
2821 | { | 2821 | { |
2822 | storage->setSaveFormat( new ICalFormat( KOPrefs::instance()->mUseQuicksave) ); | 2822 | storage->setSaveFormat( new ICalFormat( KOPrefs::instance()->mUseQuicksave) ); |
2823 | storage->save(); | 2823 | storage->save(); |
2824 | } | 2824 | } |
2825 | } | 2825 | } |
2826 | setModified(); | 2826 | setModified(); |
2827 | } | 2827 | } |
2828 | 2828 | ||
2829 | #endif | 2829 | #endif |
2830 | } | 2830 | } |
2831 | 2831 | ||
2832 | 2832 | ||
2833 | //this is a overwritten callbackmethods from the syncinterface | 2833 | //this is a overwritten callbackmethods from the syncinterface |
2834 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) | 2834 | bool KABCore::syncExternal(KSyncManager* manager, QString resource) |
2835 | { | 2835 | { |
2836 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 2836 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
2837 | 2837 | ||
2838 | AddressBook abLocal( resource,"syncContact"); | 2838 | AddressBook abLocal( resource,"syncContact"); |
2839 | bool syncOK = false; | 2839 | bool syncOK = false; |
2840 | if ( abLocal.load() ) { | 2840 | if ( abLocal.load() ) { |
2841 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); | 2841 | qDebug("AB sharp loaded ,sync device %s",mCurrentSyncDevice.latin1()); |
2842 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2842 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2843 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice ); | 2843 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice ); |
2844 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); | 2844 | syncOK = synchronizeAddressbooks( mAddressBook, &abLocal, syncManager->mSyncAlgoPrefs ); |
2845 | if ( syncOK ) { | 2845 | if ( syncOK ) { |
2846 | if ( syncManager->mWriteBackFile ) { | 2846 | if ( syncManager->mWriteBackFile ) { |
2847 | abLocal.saveAB(); | 2847 | abLocal.saveAB(); |
2848 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); | 2848 | abLocal.postExternSync( mAddressBook,mCurrentSyncDevice ); |
2849 | } | 2849 | } |
2850 | } | 2850 | } |
2851 | setModified(); | 2851 | setModified(); |
2852 | } | 2852 | } |
2853 | if ( syncOK ) | 2853 | if ( syncOK ) |
2854 | mViewManager->refreshView(); | 2854 | mViewManager->refreshView(); |
2855 | return syncOK; | 2855 | return syncOK; |
2856 | 2856 | ||
2857 | } | 2857 | } |
2858 | 2858 | ||
2859 | void KABCore::getFile( bool success ) | 2859 | void KABCore::getFile( bool success ) |
2860 | { | 2860 | { |
2861 | qDebug("KABCore::getFile "); | ||
2862 | QTimer::singleShot( 15000, this , SLOT ( setCaptionBack())); | ||
2861 | if ( ! success ) { | 2863 | if ( ! success ) { |
2862 | setCaption( i18n("Error receiving file. Nothing changed!") ); | 2864 | setCaption( i18n("Error receiving file. Nothing changed!") ); |
2863 | return; | 2865 | return; |
2864 | } | 2866 | } |
2865 | mAddressBook->importFromFile( sentSyncFile() ); | 2867 | mAddressBook->importFromFile( sentSyncFile() ); |
2866 | setCaption( i18n("Pi-Sync successful!") ); | 2868 | topLevelWidget()->setCaption( i18n("Pi-Sync successful!") ); |
2867 | } | 2869 | } |
2868 | void KABCore::syncFileRequest() | 2870 | void KABCore::syncFileRequest() |
2869 | { | 2871 | { |
2870 | mAddressBook->export2File( sentSyncFile() ); | 2872 | mAddressBook->export2File( sentSyncFile() ); |
2871 | } | 2873 | } |
2872 | QString KABCore::sentSyncFile() | 2874 | QString KABCore::sentSyncFile() |
2873 | { | 2875 | { |
2874 | #ifdef _WIN32_ | 2876 | #ifdef _WIN32_ |
2875 | return locateLocal( "tmp", "syncab.ics" ); | 2877 | return locateLocal( "tmp", "copysyncab.vcf" ); |
2876 | #else | 2878 | #else |
2877 | return QString( "/tmp/kapitempfile.vcf" ); | 2879 | return QString( "/tmp/copysyncab.vcf" ); |
2878 | #endif | 2880 | #endif |
2879 | } | 2881 | } |
2880 | 2882 | ||
2883 | void KABCore::setCaptionBack() | ||
2884 | { | ||
2885 | topLevelWidget()->setCaption( i18n("KAddressbook/Pi") ); | ||
2886 | } | ||
2881 | 2887 | ||
diff --git a/kaddressbook/kabcore.h b/kaddressbook/kabcore.h index 987369d..c628399 100644 --- a/kaddressbook/kabcore.h +++ b/kaddressbook/kabcore.h | |||
@@ -224,256 +224,257 @@ class KABCore : public QWidget, public KSyncInterface | |||
224 | void pasteContacts( KABC::Addressee::List &list ); | 224 | void pasteContacts( KABC::Addressee::List &list ); |
225 | 225 | ||
226 | /** | 226 | /** |
227 | Sets the whoAmI contact, that is used by many other programs to | 227 | Sets the whoAmI contact, that is used by many other programs to |
228 | get personal information about the current user. | 228 | get personal information about the current user. |
229 | */ | 229 | */ |
230 | void setWhoAmI(); | 230 | void setWhoAmI(); |
231 | 231 | ||
232 | /** | 232 | /** |
233 | Displays the category dialog and applies the result to all | 233 | Displays the category dialog and applies the result to all |
234 | selected contacts. | 234 | selected contacts. |
235 | */ | 235 | */ |
236 | void setCategories(); | 236 | void setCategories(); |
237 | 237 | ||
238 | /** | 238 | /** |
239 | Sets the field list of the Incremental Search Widget. | 239 | Sets the field list of the Incremental Search Widget. |
240 | */ | 240 | */ |
241 | void setSearchFields( const KABC::Field::List &fields ); | 241 | void setSearchFields( const KABC::Field::List &fields ); |
242 | 242 | ||
243 | /** | 243 | /** |
244 | Search with the current search field for a contact, that matches | 244 | Search with the current search field for a contact, that matches |
245 | the given text, and selects it in the view. | 245 | the given text, and selects it in the view. |
246 | */ | 246 | */ |
247 | void incrementalSearch( const QString& text ); | 247 | void incrementalSearch( const QString& text ); |
248 | 248 | ||
249 | /** | 249 | /** |
250 | Marks the address book as modified. | 250 | Marks the address book as modified. |
251 | */ | 251 | */ |
252 | void setModified(); | 252 | void setModified(); |
253 | /** | 253 | /** |
254 | Marks the address book as modified without refreshing the view. | 254 | Marks the address book as modified without refreshing the view. |
255 | */ | 255 | */ |
256 | void setModifiedWOrefresh(); | 256 | void setModifiedWOrefresh(); |
257 | 257 | ||
258 | /** | 258 | /** |
259 | Marks the address book as modified concerning the argument. | 259 | Marks the address book as modified concerning the argument. |
260 | */ | 260 | */ |
261 | void setModified( bool modified ); | 261 | void setModified( bool modified ); |
262 | 262 | ||
263 | /** | 263 | /** |
264 | Returns whether the address book is modified. | 264 | Returns whether the address book is modified. |
265 | */ | 265 | */ |
266 | bool modified() const; | 266 | bool modified() const; |
267 | 267 | ||
268 | /** | 268 | /** |
269 | Called whenever an contact is modified in the contact editor | 269 | Called whenever an contact is modified in the contact editor |
270 | dialog or the quick edit. | 270 | dialog or the quick edit. |
271 | */ | 271 | */ |
272 | void contactModified( const KABC::Addressee &addr ); | 272 | void contactModified( const KABC::Addressee &addr ); |
273 | 273 | ||
274 | /** | 274 | /** |
275 | DCOP METHODS. | 275 | DCOP METHODS. |
276 | */ | 276 | */ |
277 | void addEmail( QString addr ); | 277 | void addEmail( QString addr ); |
278 | void importVCard( const KURL& url, bool showPreview ); | 278 | void importVCard( const KURL& url, bool showPreview ); |
279 | void importVCard( const QString& vCard, bool showPreview ); | 279 | void importVCard( const QString& vCard, bool showPreview ); |
280 | void newContact(); | 280 | void newContact(); |
281 | QString getNameByPhone( const QString& phone ); | 281 | QString getNameByPhone( const QString& phone ); |
282 | /** | 282 | /** |
283 | END DCOP METHODS | 283 | END DCOP METHODS |
284 | */ | 284 | */ |
285 | 285 | ||
286 | /** | 286 | /** |
287 | Saves the contents of the AddressBook back to disk. | 287 | Saves the contents of the AddressBook back to disk. |
288 | */ | 288 | */ |
289 | void save(); | 289 | void save(); |
290 | 290 | ||
291 | /** | 291 | /** |
292 | Undos the last command using the undo stack. | 292 | Undos the last command using the undo stack. |
293 | */ | 293 | */ |
294 | void undo(); | 294 | void undo(); |
295 | 295 | ||
296 | /** | 296 | /** |
297 | Redos the last command that was undone, using the redo stack. | 297 | Redos the last command that was undone, using the redo stack. |
298 | */ | 298 | */ |
299 | void redo(); | 299 | void redo(); |
300 | 300 | ||
301 | /** | 301 | /** |
302 | Shows the edit dialog for the given uid. If the uid is QString::null, | 302 | Shows the edit dialog for the given uid. If the uid is QString::null, |
303 | the method will try to find a selected addressee in the view. | 303 | the method will try to find a selected addressee in the view. |
304 | */ | 304 | */ |
305 | void editContact( const QString &uid /*US = QString::null*/ ); | 305 | void editContact( const QString &uid /*US = QString::null*/ ); |
306 | //US added a second method without defaultparameter | 306 | //US added a second method without defaultparameter |
307 | void editContact2(); | 307 | void editContact2(); |
308 | 308 | ||
309 | /** | 309 | /** |
310 | Shows or edits the detail view for the given uid. If the uid is QString::null, | 310 | Shows or edits the detail view for the given uid. If the uid is QString::null, |
311 | the method will try to find a selected addressee in the view. | 311 | the method will try to find a selected addressee in the view. |
312 | */ | 312 | */ |
313 | void executeContact( const QString &uid /*US = QString::null*/ ); | 313 | void executeContact( const QString &uid /*US = QString::null*/ ); |
314 | 314 | ||
315 | /** | 315 | /** |
316 | Launches the configuration dialog. | 316 | Launches the configuration dialog. |
317 | */ | 317 | */ |
318 | void openConfigDialog(); | 318 | void openConfigDialog(); |
319 | 319 | ||
320 | /** | 320 | /** |
321 | Launches the ldap search dialog. | 321 | Launches the ldap search dialog. |
322 | */ | 322 | */ |
323 | void openLDAPDialog(); | 323 | void openLDAPDialog(); |
324 | 324 | ||
325 | /** | 325 | /** |
326 | Creates a KAddressBookPrinter, which will display the print | 326 | Creates a KAddressBookPrinter, which will display the print |
327 | dialog and do the printing. | 327 | dialog and do the printing. |
328 | */ | 328 | */ |
329 | void print(); | 329 | void print(); |
330 | 330 | ||
331 | /** | 331 | /** |
332 | Registers a new GUI client, so plugins can register its actions. | 332 | Registers a new GUI client, so plugins can register its actions. |
333 | */ | 333 | */ |
334 | void addGUIClient( KXMLGUIClient *client ); | 334 | void addGUIClient( KXMLGUIClient *client ); |
335 | 335 | ||
336 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid); | 336 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& sessionuid); |
337 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); | 337 | void requestForDetails(const QString& sourceChannel, const QString& sessionuid, const QString& name, const QString& email, const QString& uid); |
338 | void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid); | 338 | void requestForBirthdayList(const QString& sourceChannel, const QString& sessionuid); |
339 | 339 | ||
340 | 340 | ||
341 | signals: | 341 | signals: |
342 | void contactSelected( const QString &name ); | 342 | void contactSelected( const QString &name ); |
343 | void contactSelected( const QPixmap &pixmap ); | 343 | void contactSelected( const QPixmap &pixmap ); |
344 | public slots: | 344 | public slots: |
345 | void getFile( bool success ); | 345 | void getFile( bool success ); |
346 | void syncFileRequest(); | 346 | void syncFileRequest(); |
347 | void setDetailsVisible( bool visible ); | 347 | void setDetailsVisible( bool visible ); |
348 | void setDetailsToState(); | 348 | void setDetailsToState(); |
349 | // void slotSyncMenu( int ); | 349 | // void slotSyncMenu( int ); |
350 | private slots: | 350 | private slots: |
351 | void setJumpButtonBarVisible( bool visible ); | 351 | void setJumpButtonBarVisible( bool visible ); |
352 | void setCaptionBack(); | ||
352 | void importFromOL(); | 353 | void importFromOL(); |
353 | void extensionModified( const KABC::Addressee::List &list ); | 354 | void extensionModified( const KABC::Addressee::List &list ); |
354 | void extensionChanged( int id ); | 355 | void extensionChanged( int id ); |
355 | void clipboardDataChanged(); | 356 | void clipboardDataChanged(); |
356 | void updateActionMenu(); | 357 | void updateActionMenu(); |
357 | void configureKeyBindings(); | 358 | void configureKeyBindings(); |
358 | void removeVoice(); | 359 | void removeVoice(); |
359 | #ifdef KAB_EMBEDDED | 360 | #ifdef KAB_EMBEDDED |
360 | void configureResources(); | 361 | void configureResources(); |
361 | #endif //KAB_EMBEDDED | 362 | #endif //KAB_EMBEDDED |
362 | 363 | ||
363 | void slotEditorDestroyed( const QString &uid ); | 364 | void slotEditorDestroyed( const QString &uid ); |
364 | void configurationChanged(); | 365 | void configurationChanged(); |
365 | void addressBookChanged(); | 366 | void addressBookChanged(); |
366 | 367 | ||
367 | private: | 368 | private: |
368 | void initGUI(); | 369 | void initGUI(); |
369 | void initActions(); | 370 | void initActions(); |
370 | 371 | ||
371 | AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, | 372 | AddresseeEditorDialog *createAddresseeEditorDialog( QWidget *parent, |
372 | const char *name = 0 ); | 373 | const char *name = 0 ); |
373 | 374 | ||
374 | KXMLGUIClient *mGUIClient; | 375 | KXMLGUIClient *mGUIClient; |
375 | 376 | ||
376 | KABC::AddressBook *mAddressBook; | 377 | KABC::AddressBook *mAddressBook; |
377 | 378 | ||
378 | ViewManager *mViewManager; | 379 | ViewManager *mViewManager; |
379 | // QSplitter *mDetailsSplitter; | 380 | // QSplitter *mDetailsSplitter; |
380 | KDGanttMinimizeSplitter *mExtensionBarSplitter; | 381 | KDGanttMinimizeSplitter *mExtensionBarSplitter; |
381 | ViewContainer *mDetails; | 382 | ViewContainer *mDetails; |
382 | KDGanttMinimizeSplitter* mMiniSplitter; | 383 | KDGanttMinimizeSplitter* mMiniSplitter; |
383 | XXPortManager *mXXPortManager; | 384 | XXPortManager *mXXPortManager; |
384 | JumpButtonBar *mJumpButtonBar; | 385 | JumpButtonBar *mJumpButtonBar; |
385 | IncSearchWidget *mIncSearchWidget; | 386 | IncSearchWidget *mIncSearchWidget; |
386 | ExtensionManager *mExtensionManager; | 387 | ExtensionManager *mExtensionManager; |
387 | 388 | ||
388 | KCMultiDialog *mConfigureDialog; | 389 | KCMultiDialog *mConfigureDialog; |
389 | 390 | ||
390 | #ifndef KAB_EMBEDDED | 391 | #ifndef KAB_EMBEDDED |
391 | LDAPSearchDialog *mLdapSearchDialog; | 392 | LDAPSearchDialog *mLdapSearchDialog; |
392 | #endif //KAB_EMBEDDED | 393 | #endif //KAB_EMBEDDED |
393 | // QDict<AddresseeEditorDialog> mEditorDict; | 394 | // QDict<AddresseeEditorDialog> mEditorDict; |
394 | AddresseeEditorDialog *mEditorDialog; | 395 | AddresseeEditorDialog *mEditorDialog; |
395 | bool mReadWrite; | 396 | bool mReadWrite; |
396 | bool mModified; | 397 | bool mModified; |
397 | bool mIsPart; | 398 | bool mIsPart; |
398 | bool mMultipleViewsAtOnce; | 399 | bool mMultipleViewsAtOnce; |
399 | 400 | ||
400 | 401 | ||
401 | //US file menu | 402 | //US file menu |
402 | KAction *mActionMail; | 403 | KAction *mActionMail; |
403 | KAction *mActionBeam; | 404 | KAction *mActionBeam; |
404 | KAction *mActionExport2phone; | 405 | KAction *mActionExport2phone; |
405 | KAction* mActionPrint; | 406 | KAction* mActionPrint; |
406 | KAction* mActionNewContact; | 407 | KAction* mActionNewContact; |
407 | KAction *mActionSave; | 408 | KAction *mActionSave; |
408 | KAction *mActionEditAddressee; | 409 | KAction *mActionEditAddressee; |
409 | KAction *mActionMailVCard; | 410 | KAction *mActionMailVCard; |
410 | KAction *mActionBeamVCard; | 411 | KAction *mActionBeamVCard; |
411 | 412 | ||
412 | KAction *mActionQuit; | 413 | KAction *mActionQuit; |
413 | 414 | ||
414 | //US edit menu | 415 | //US edit menu |
415 | KAction *mActionCopy; | 416 | KAction *mActionCopy; |
416 | KAction *mActionCut; | 417 | KAction *mActionCut; |
417 | KAction *mActionPaste; | 418 | KAction *mActionPaste; |
418 | KAction *mActionSelectAll; | 419 | KAction *mActionSelectAll; |
419 | KAction *mActionUndo; | 420 | KAction *mActionUndo; |
420 | KAction *mActionRedo; | 421 | KAction *mActionRedo; |
421 | KAction *mActionDelete; | 422 | KAction *mActionDelete; |
422 | 423 | ||
423 | //US settings menu | 424 | //US settings menu |
424 | KAction *mActionConfigResources; | 425 | KAction *mActionConfigResources; |
425 | KAction *mActionConfigKAddressbook; | 426 | KAction *mActionConfigKAddressbook; |
426 | KAction *mActionConfigShortcuts; | 427 | KAction *mActionConfigShortcuts; |
427 | KAction *mActionConfigureToolbars; | 428 | KAction *mActionConfigureToolbars; |
428 | KAction *mActionKeyBindings; | 429 | KAction *mActionKeyBindings; |
429 | KToggleAction *mActionJumpBar; | 430 | KToggleAction *mActionJumpBar; |
430 | KToggleAction *mActionDetails; | 431 | KToggleAction *mActionDetails; |
431 | KAction *mActionWhoAmI; | 432 | KAction *mActionWhoAmI; |
432 | KAction *mActionCategories; | 433 | KAction *mActionCategories; |
433 | KAction *mActionAboutKAddressbook; | 434 | KAction *mActionAboutKAddressbook; |
434 | KAction *mActionLicence; | 435 | KAction *mActionLicence; |
435 | KAction *mActionFaq; | 436 | KAction *mActionFaq; |
436 | 437 | ||
437 | KAction *mActionDeleteView; | 438 | KAction *mActionDeleteView; |
438 | 439 | ||
439 | QPopupMenu *viewMenu; | 440 | QPopupMenu *viewMenu; |
440 | QPopupMenu *filterMenu; | 441 | QPopupMenu *filterMenu; |
441 | QPopupMenu *settingsMenu; | 442 | QPopupMenu *settingsMenu; |
442 | QPopupMenu *changeMenu; | 443 | QPopupMenu *changeMenu; |
443 | //US QAction *mActionSave; | 444 | //US QAction *mActionSave; |
444 | QPopupMenu *ImportMenu; | 445 | QPopupMenu *ImportMenu; |
445 | QPopupMenu *ExportMenu; | 446 | QPopupMenu *ExportMenu; |
446 | //LR additional methods | 447 | //LR additional methods |
447 | KAction *mActionRemoveVoice; | 448 | KAction *mActionRemoveVoice; |
448 | KAction * mActionImportOL; | 449 | KAction * mActionImportOL; |
449 | 450 | ||
450 | #ifndef KAB_EMBEDDED | 451 | #ifndef KAB_EMBEDDED |
451 | KAddressBookService *mAddressBookService; | 452 | KAddressBookService *mAddressBookService; |
452 | #endif //KAB_EMBEDDED | 453 | #endif //KAB_EMBEDDED |
453 | 454 | ||
454 | class KABCorePrivate; | 455 | class KABCorePrivate; |
455 | KABCorePrivate *d; | 456 | KABCorePrivate *d; |
456 | //US bool mBlockSaveFlag; | 457 | //US bool mBlockSaveFlag; |
457 | 458 | ||
458 | #ifdef KAB_EMBEDDED | 459 | #ifdef KAB_EMBEDDED |
459 | KAddressBookMain *mMainWindow; // should be the same like mGUIClient | 460 | KAddressBookMain *mMainWindow; // should be the same like mGUIClient |
460 | #endif //KAB_EMBEDDED | 461 | #endif //KAB_EMBEDDED |
461 | 462 | ||
462 | //this are the overwritten callbackmethods from the syncinterface | 463 | //this are the overwritten callbackmethods from the syncinterface |
463 | virtual bool sync(KSyncManager* manager, QString filename, int mode); | 464 | virtual bool sync(KSyncManager* manager, QString filename, int mode); |
464 | virtual bool syncExternal(KSyncManager* manager, QString resource); | 465 | virtual bool syncExternal(KSyncManager* manager, QString resource); |
465 | 466 | ||
466 | 467 | ||
467 | // LR ******************************* | 468 | // LR ******************************* |
468 | // sync stuff! | 469 | // sync stuff! |
469 | QString sentSyncFile(); | 470 | QString sentSyncFile(); |
470 | QPopupMenu *syncMenu; | 471 | QPopupMenu *syncMenu; |
471 | KSyncManager* syncManager; | 472 | KSyncManager* syncManager; |
472 | int mGlobalSyncMode; | 473 | int mGlobalSyncMode; |
473 | bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); | 474 | bool synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBook* remote,int mode); |
474 | KABC::Addressee getLastSyncAddressee(); | 475 | KABC::Addressee getLastSyncAddressee(); |
475 | QDateTime mLastAddressbookSync; | 476 | QDateTime mLastAddressbookSync; |
476 | int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); | 477 | int takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, int mode , bool full ); |
477 | // ********************* | 478 | // ********************* |
478 | 479 | ||
479 | }; | 480 | }; |