-rw-r--r-- | kaddressbook/xxportobject.h | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/kaddressbook/xxportobject.h b/kaddressbook/xxportobject.h index d697700..fddc219 100644 --- a/kaddressbook/xxportobject.h +++ b/kaddressbook/xxportobject.h | |||
@@ -15,51 +15,49 @@ | |||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | 23 | ||
24 | /* | 24 | /* |
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #ifndef XXPORTOBJECT_H | 31 | #ifndef XXPORTOBJECT_H |
32 | #define XXPORTOBJECT_H | 32 | #define XXPORTOBJECT_H |
33 | 33 | ||
34 | #include <qobject.h> | 34 | #include <qobject.h> |
35 | 35 | ||
36 | #include <kabc/addressbook.h> | 36 | #include <kabc/addressbook.h> |
37 | #include <kabc/addresseelist.h> | 37 | #include <kabc/addresseelist.h> |
38 | #include <kxmlguiclient.h> | 38 | #include <kxmlguiclient.h> |
39 | #ifndef KAB_EMBEDDED | ||
40 | #include <klibloader.h> | 39 | #include <klibloader.h> |
41 | #endif //KAB_EMBEDDED | ||
42 | 40 | ||
43 | 41 | ||
44 | class XXPortObject : public QObject, virtual public KXMLGUIClient | 42 | class XXPortObject : public QObject, virtual public KXMLGUIClient |
45 | { | 43 | { |
46 | Q_OBJECT | 44 | Q_OBJECT |
47 | 45 | ||
48 | public: | 46 | public: |
49 | XXPortObject( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); | 47 | XXPortObject( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 ); |
50 | ~XXPortObject(); | 48 | ~XXPortObject(); |
51 | 49 | ||
52 | /** | 50 | /** |
53 | Returns the unique identifier of this xxport modul, it should | 51 | Returns the unique identifier of this xxport modul, it should |
54 | be the lowercase name of the import/export format e.g. 'vcard' | 52 | be the lowercase name of the import/export format e.g. 'vcard' |
55 | */ | 53 | */ |
56 | virtual QString identifier() const = 0; | 54 | virtual QString identifier() const = 0; |
57 | 55 | ||
58 | /** | 56 | /** |
59 | Reimplement this method if the XXPortManager shall | 57 | Reimplement this method if the XXPortManager shall |
60 | pass a sorted list to @ref exportContacts(). | 58 | pass a sorted list to @ref exportContacts(). |
61 | */ | 59 | */ |
62 | virtual bool requiresSorting() const { return false; } | 60 | virtual bool requiresSorting() const { return false; } |
63 | 61 | ||
64 | public slots: | 62 | public slots: |
65 | /** | 63 | /** |
@@ -101,57 +99,39 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient | |||
101 | /** | 99 | /** |
102 | Returns a pointer to the address book object. | 100 | Returns a pointer to the address book object. |
103 | */ | 101 | */ |
104 | KABC::AddressBook *addressBook() const; | 102 | KABC::AddressBook *addressBook() const; |
105 | 103 | ||
106 | /** | 104 | /** |
107 | Returns a pointer to the parent widget. It can be used as parent for | 105 | Returns a pointer to the parent widget. It can be used as parent for |
108 | message boxes. | 106 | message boxes. |
109 | */ | 107 | */ |
110 | QWidget *parentWidget() const; | 108 | QWidget *parentWidget() const; |
111 | 109 | ||
112 | 110 | ||
113 | private slots: | 111 | private slots: |
114 | void slotImportActivated( const QString& ); | 112 | void slotImportActivated( const QString& ); |
115 | void slotExportActivated( const QString& ); | 113 | void slotExportActivated( const QString& ); |
116 | 114 | ||
117 | private: | 115 | private: |
118 | KABC::AddressBook *mAddressBook; | 116 | KABC::AddressBook *mAddressBook; |
119 | QWidget *mParentWidget; | 117 | QWidget *mParentWidget; |
120 | 118 | ||
121 | class XXPortObjectPrivate; | 119 | class XXPortObjectPrivate; |
122 | XXPortObjectPrivate *d; | 120 | XXPortObjectPrivate *d; |
123 | }; | 121 | }; |
124 | 122 | ||
125 | #ifndef KAB_EMBEDDED | ||
126 | class XXPortFactory : public KLibFactory | 123 | class XXPortFactory : public KLibFactory |
127 | { | 124 | { |
128 | public: | 125 | public: |
129 | virtual XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent, | 126 | virtual XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent, |
130 | const char *name = 0 ) = 0; | 127 | const char *name = 0 ) = 0; |
131 | 128 | ||
132 | protected: | 129 | protected: |
133 | virtual QObject* createObject( QObject*, const char*, const char*, | 130 | virtual QObject* createObject( QObject*, const char*, const char*, |
134 | const QStringList & ) | 131 | const QStringList & ) |
135 | { | 132 | { |
136 | return 0; | 133 | return 0; |
137 | } | 134 | } |
138 | }; | 135 | }; |
139 | 136 | ||
140 | #else //KAB_EMBEDDED | ||
141 | class XXPortFactory | ||
142 | { | ||
143 | public: | ||
144 | virtual XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent, | ||
145 | const char *name = 0 ) = 0; | ||
146 | |||
147 | protected: | ||
148 | virtual QObject* createObject( QObject*, const char*, const char*, | ||
149 | const QStringList & ) | ||
150 | { | ||
151 | return 0; | ||
152 | } | ||
153 | }; | ||
154 | #endif //KAB_EMBEDDED | ||
155 | |||
156 | |||
157 | #endif | 137 | #endif |