summaryrefslogtreecommitdiffabout
path: root/kaddressbook/xxportobject.h
authorulf69 <ulf69>2004-08-02 18:28:27 (UTC)
committer ulf69 <ulf69>2004-08-02 18:28:27 (UTC)
commit983127ce46c9ff6663d08dedd450da3fe7dd549b (patch) (unidiff)
treeb6c5bf6bffbddb80ef405a6fc322bfa8bfe13d98 /kaddressbook/xxportobject.h
parent09fe5a5325105b5051d22feb8dae6bb1f9875ff3 (diff)
downloadkdepimpi-983127ce46c9ff6663d08dedd450da3fe7dd549b.zip
kdepimpi-983127ce46c9ff6663d08dedd450da3fe7dd549b.tar.gz
kdepimpi-983127ce46c9ff6663d08dedd450da3fe7dd549b.tar.bz2
implemented the exportclasses for opie, qtopia and sharp as part of kaddressbook and not as additional libraries.
Diffstat (limited to 'kaddressbook/xxportobject.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/xxportobject.h35
1 files changed, 34 insertions, 1 deletions
diff --git a/kaddressbook/xxportobject.h b/kaddressbook/xxportobject.h
index fddc219..d547855 100644
--- a/kaddressbook/xxportobject.h
+++ b/kaddressbook/xxportobject.h
@@ -35,10 +35,14 @@ $Id$
35 35
36#include <kabc/addressbook.h> 36#include <kabc/addressbook.h>
37#include <kabc/addresseelist.h> 37#include <kabc/addresseelist.h>
38#include <kabc/resource.h>
38#include <kxmlguiclient.h> 39#include <kxmlguiclient.h>
39#include <klibloader.h> 40#include <klibloader.h>
40 41
41 42
43
44
45
42class XXPortObject : public QObject, virtual public KXMLGUIClient 46class XXPortObject : public QObject, virtual public KXMLGUIClient
43{ 47{
44 Q_OBJECT 48 Q_OBJECT
@@ -59,6 +63,13 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient
59 */ 63 */
60 virtual bool requiresSorting() const { return false; } 64 virtual bool requiresSorting() const { return false; }
61 65
66 /**
67 Returns true if the XXPortObject can be used.
68 One case it can not be used is for example if a needed lib could not be loaded.
69 */
70 virtual bool isAvailable() const { return true; };
71
72
62 public slots: 73 public slots:
63 /** 74 /**
64 Reimplement this method for exporting the contacts. 75 Reimplement this method for exporting the contacts.
@@ -107,7 +118,7 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient
107 */ 118 */
108 QWidget *parentWidget() const; 119 QWidget *parentWidget() const;
109 120
110 121
111 private slots: 122 private slots:
112 void slotImportActivated( const QString& ); 123 void slotImportActivated( const QString& );
113 void slotExportActivated( const QString& ); 124 void slotExportActivated( const QString& );
@@ -120,6 +131,28 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient
120 XXPortObjectPrivate *d; 131 XXPortObjectPrivate *d;
121}; 132};
122 133
134
135
136class XXPortResourceObject : public XXPortObject
137{
138 Q_OBJECT
139
140 public:
141 XXPortResourceObject( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
142 ~XXPortResourceObject();
143
144 /**
145 Returns true if the XXPortObject can be used.
146 One case it can not be used is for example if a needed lib could not be loaded.
147 */
148 virtual bool isAvailable();
149 protected:
150 KABC::Resource* mResource;
151};
152
153
154
155
123class XXPortFactory : public KLibFactory 156class XXPortFactory : public KLibFactory
124{ 157{
125 public: 158 public: