author | ulf69 <ulf69> | 2004-06-30 22:40:39 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-06-30 22:40:39 (UTC) |
commit | e3e162fb75c497b95a9a9b43792fa88c998b265c (patch) (unidiff) | |
tree | ef519a50c505ae5eddb27c176e0d6d588e256044 | |
parent | 34c8059a5400d4a13456a5b4cb90328369999f20 (diff) | |
download | kdepimpi-e3e162fb75c497b95a9a9b43792fa88c998b265c.zip kdepimpi-e3e162fb75c497b95a9a9b43792fa88c998b265c.tar.gz kdepimpi-e3e162fb75c497b95a9a9b43792fa88c998b265c.tar.bz2 |
*** empty log message ***
-rw-r--r-- | kaddressbook/xxport/csv_xxport.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/xxport/kde2_xxport.cpp | 7 | ||||
-rw-r--r-- | kaddressbook/xxport/vcard_xxport.cpp | 6 |
3 files changed, 17 insertions, 3 deletions
diff --git a/kaddressbook/xxport/csv_xxport.cpp b/kaddressbook/xxport/csv_xxport.cpp index ce35053..caee66d 100644 --- a/kaddressbook/xxport/csv_xxport.cpp +++ b/kaddressbook/xxport/csv_xxport.cpp | |||
@@ -45,41 +45,46 @@ $Id$ | |||
45 | #include "csvimportdialog.h" | 45 | #include "csvimportdialog.h" |
46 | 46 | ||
47 | #include "csv_xxport.h" | 47 | #include "csv_xxport.h" |
48 | 48 | ||
49 | 49 | ||
50 | #ifndef KAB_EMBEDDED | 50 | #ifndef KAB_EMBEDDED |
51 | 51 | ||
52 | class CSVXXPortFactory : public XXPortFactory | 52 | class CSVXXPortFactory : public XXPortFactory |
53 | { | 53 | { |
54 | public: | 54 | public: |
55 | XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent, const char *name ) | 55 | XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent, const char *name ) |
56 | { | 56 | { |
57 | return new CSVXXPort( ab, parent, name ); | 57 | return new CSVXXPort( ab, parent, name ); |
58 | } | 58 | } |
59 | }; | 59 | }; |
60 | 60 | ||
61 | #endif //KAB_EMBEDDED | ||
62 | |||
61 | 63 | ||
62 | extern "C" | 64 | extern "C" |
63 | { | 65 | { |
66 | #ifndef KAB_EMBEDDED | ||
64 | void *init_libkaddrbk_csv_xxport() | 67 | void *init_libkaddrbk_csv_xxport() |
68 | #else //KAB_EMBEDDED | ||
69 | void *init_kaddrbk_csv_xxport() | ||
70 | #endif //KAB_EMBEDDED | ||
65 | { | 71 | { |
66 | return ( new CSVXXPortFactory() ); | 72 | return ( new CSVXXPortFactory() ); |
67 | } | 73 | } |
68 | } | 74 | } |
69 | #endif //KAB_EMBEDDED | ||
70 | 75 | ||
71 | 76 | ||
72 | CSVXXPort::CSVXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) | 77 | CSVXXPort::CSVXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) |
73 | : XXPortObject( ab, parent, name ) | 78 | : XXPortObject( ab, parent, name ) |
74 | { | 79 | { |
75 | createImportAction( i18n( "Import CSV List..." ) ); | 80 | createImportAction( i18n( "Import CSV List..." ) ); |
76 | createExportAction( i18n( "Export CSV List..." ) ); | 81 | createExportAction( i18n( "Export CSV List..." ) ); |
77 | } | 82 | } |
78 | 83 | ||
79 | bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& ) | 84 | bool CSVXXPort::exportContacts( const KABC::AddresseeList &list, const QString& ) |
80 | { | 85 | { |
81 | #ifndef KAB_EMBEDDED | 86 | #ifndef KAB_EMBEDDED |
82 | KURL url = KFileDialog::getSaveURL( "addressbook.csv" ); | 87 | KURL url = KFileDialog::getSaveURL( "addressbook.csv" ); |
83 | if ( url.isEmpty() ) | 88 | if ( url.isEmpty() ) |
84 | return true; | 89 | return true; |
85 | 90 | ||
diff --git a/kaddressbook/xxport/kde2_xxport.cpp b/kaddressbook/xxport/kde2_xxport.cpp index d5fc075..3fdb36d 100644 --- a/kaddressbook/xxport/kde2_xxport.cpp +++ b/kaddressbook/xxport/kde2_xxport.cpp | |||
@@ -44,41 +44,46 @@ $Id$ | |||
44 | 44 | ||
45 | #include "xxportmanager.h" | 45 | #include "xxportmanager.h" |
46 | 46 | ||
47 | #include "kde2_xxport.h" | 47 | #include "kde2_xxport.h" |
48 | 48 | ||
49 | #ifndef KAB_EMBEDDED | 49 | #ifndef KAB_EMBEDDED |
50 | 50 | ||
51 | class KDE2XXPortFactory : public XXPortFactory | 51 | class KDE2XXPortFactory : public XXPortFactory |
52 | { | 52 | { |
53 | public: | 53 | public: |
54 | XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent, const char *name ) | 54 | XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent, const char *name ) |
55 | { | 55 | { |
56 | return new KDE2XXPort( ab, parent, name ); | 56 | return new KDE2XXPort( ab, parent, name ); |
57 | } | 57 | } |
58 | }; | 58 | }; |
59 | 59 | ||
60 | #endif //KAB_EMBEDDED | ||
61 | |||
60 | 62 | ||
61 | extern "C" | 63 | extern "C" |
62 | { | 64 | { |
65 | #ifndef KAB_EMBEDDED | ||
63 | void *init_libkaddrbk_kde2_xxport() | 66 | void *init_libkaddrbk_kde2_xxport() |
67 | #else //KAB_EMBEDDED | ||
68 | void *init_kaddrbk_kde2_xxport() | ||
69 | #endif //KAB_EMBEDDED | ||
64 | { | 70 | { |
65 | return ( new KDE2XXPortFactory() ); | 71 | return ( new KDE2XXPortFactory() ); |
66 | } | 72 | } |
67 | } | 73 | } |
68 | #endif //KAB_EMBEDDED | ||
69 | 74 | ||
70 | 75 | ||
71 | KDE2XXPort::KDE2XXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) | 76 | KDE2XXPort::KDE2XXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) |
72 | : XXPortObject( ab, parent, name ) | 77 | : XXPortObject( ab, parent, name ) |
73 | { | 78 | { |
74 | createImportAction( i18n( "Import KDE 2 Addressbook..." ) ); | 79 | createImportAction( i18n( "Import KDE 2 Addressbook..." ) ); |
75 | } | 80 | } |
76 | 81 | ||
77 | KABC::AddresseeList KDE2XXPort::importContacts( const QString& ) const | 82 | KABC::AddresseeList KDE2XXPort::importContacts( const QString& ) const |
78 | { | 83 | { |
79 | QString fileName = locateLocal( "data", "kabc/std.vcf" ); | 84 | QString fileName = locateLocal( "data", "kabc/std.vcf" ); |
80 | if ( !QFile::exists( fileName ) ) { | 85 | if ( !QFile::exists( fileName ) ) { |
81 | KMessageBox::sorry( parentWidget(), i18n( "<qt>Couldn't find a KDE 2 address book <b>%1</b>.</qt>" ).arg( fileName ) ); | 86 | KMessageBox::sorry( parentWidget(), i18n( "<qt>Couldn't find a KDE 2 address book <b>%1</b>.</qt>" ).arg( fileName ) ); |
82 | return KABC::AddresseeList(); | 87 | return KABC::AddresseeList(); |
83 | } | 88 | } |
84 | 89 | ||
diff --git a/kaddressbook/xxport/vcard_xxport.cpp b/kaddressbook/xxport/vcard_xxport.cpp index dd49a9c..c017f5b 100644 --- a/kaddressbook/xxport/vcard_xxport.cpp +++ b/kaddressbook/xxport/vcard_xxport.cpp | |||
@@ -43,42 +43,46 @@ $Id$ | |||
43 | #include <kurl.h> | 43 | #include <kurl.h> |
44 | 44 | ||
45 | #include "xxportmanager.h" | 45 | #include "xxportmanager.h" |
46 | 46 | ||
47 | #include "vcard_xxport.h" | 47 | #include "vcard_xxport.h" |
48 | 48 | ||
49 | #ifndef KAB_EMBEDDED | 49 | #ifndef KAB_EMBEDDED |
50 | 50 | ||
51 | class VCardXXPortFactory : public XXPortFactory | 51 | class VCardXXPortFactory : public XXPortFactory |
52 | { | 52 | { |
53 | public: | 53 | public: |
54 | XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent, const char *name ) | 54 | XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent, const char *name ) |
55 | { | 55 | { |
56 | return new VCardXXPort( ab, parent, name ); | 56 | return new VCardXXPort( ab, parent, name ); |
57 | } | 57 | } |
58 | }; | 58 | }; |
59 | #endif //KAB_EMBEDDED | ||
59 | 60 | ||
60 | 61 | ||
61 | extern "C" | 62 | extern "C" |
62 | { | 63 | { |
64 | #ifndef KAB_EMBEDDED | ||
63 | void *init_libkaddrbk_vcard_xxport() | 65 | void *init_libkaddrbk_vcard_xxport() |
66 | #else //KAB_EMBEDDED | ||
67 | void *init_kaddrbk_vcard_xxport() | ||
68 | #endif //KAB_EMBEDDED | ||
64 | { | 69 | { |
65 | return ( new VCardXXPortFactory() ); | 70 | return ( new VCardXXPortFactory() ); |
66 | } | 71 | } |
67 | } | 72 | } |
68 | #endif //KAB_EMBEDDED | ||
69 | 73 | ||
70 | 74 | ||
71 | VCardXXPort::VCardXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) | 75 | VCardXXPort::VCardXXPort( KABC::AddressBook *ab, QWidget *parent, const char *name ) |
72 | : XXPortObject( ab, parent, name ) | 76 | : XXPortObject( ab, parent, name ) |
73 | { | 77 | { |
74 | createImportAction( i18n( "Import vCard..." ) ); | 78 | createImportAction( i18n( "Import vCard..." ) ); |
75 | createExportAction( i18n( "Export vCard 2.1..." ), "v21" ); | 79 | createExportAction( i18n( "Export vCard 2.1..." ), "v21" ); |
76 | createExportAction( i18n( "Export vCard 3.0..." ), "v30" ); | 80 | createExportAction( i18n( "Export vCard 3.0..." ), "v30" ); |
77 | } | 81 | } |
78 | 82 | ||
79 | bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString &data ) | 83 | bool VCardXXPort::exportContacts( const KABC::AddresseeList &list, const QString &data ) |
80 | { | 84 | { |
81 | QString name; | 85 | QString name; |
82 | 86 | ||
83 | if ( list.count() == 1 ) | 87 | if ( list.count() == 1 ) |
84 | name = list[ 0 ].givenName() + "_" + list[ 0 ].familyName() + ".vcf"; | 88 | name = list[ 0 ].givenName() + "_" + list[ 0 ].familyName() + ".vcf"; |