summaryrefslogtreecommitdiffabout
path: root/kaddressbook/xxportobject.h
authorulf69 <ulf69>2004-06-30 21:59:48 (UTC)
committer ulf69 <ulf69>2004-06-30 21:59:48 (UTC)
commit2de4aeb0272fa7d96a55332196a11e52b2f27539 (patch) (side-by-side diff)
treed455673832ac53a085cd3f280f60c11d12d45f83 /kaddressbook/xxportobject.h
parente0e3d743a6b61eaac023c9f284362ab08337da05 (diff)
downloadkdepimpi-2de4aeb0272fa7d96a55332196a11e52b2f27539.zip
kdepimpi-2de4aeb0272fa7d96a55332196a11e52b2f27539.tar.gz
kdepimpi-2de4aeb0272fa7d96a55332196a11e52b2f27539.tar.bz2
preparations for dynamic import/export module loading
Diffstat (limited to 'kaddressbook/xxportobject.h') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/xxportobject.h20
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
@@ -7,67 +7,65 @@
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
/*
Enhanced Version of the file for platform independent KDE tools.
Copyright (c) 2004 Ulf Schenk
$Id$
*/
#ifndef XXPORTOBJECT_H
#define XXPORTOBJECT_H
#include <qobject.h>
#include <kabc/addressbook.h>
#include <kabc/addresseelist.h>
#include <kxmlguiclient.h>
-#ifndef KAB_EMBEDDED
#include <klibloader.h>
-#endif //KAB_EMBEDDED
class XXPortObject : public QObject, virtual public KXMLGUIClient
{
Q_OBJECT
public:
XXPortObject( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
~XXPortObject();
/**
Returns the unique identifier of this xxport modul, it should
be the lowercase name of the import/export format e.g. 'vcard'
*/
virtual QString identifier() const = 0;
/**
Reimplement this method if the XXPortManager shall
pass a sorted list to @ref exportContacts().
*/
virtual bool requiresSorting() const { return false; }
public slots:
/**
Reimplement this method for exporting the contacts.
*/
virtual bool exportContacts( const KABC::AddresseeList &list, const QString& identifier );
/**
Reimplement this method for importing the contacts.
*/
virtual KABC::AddresseeList importContacts( const QString& identifier ) const;
@@ -93,65 +91,47 @@ class XXPortObject : public QObject, virtual public KXMLGUIClient
*/
void createImportAction( const QString &label, const QString &identifier = QString::null );
/**
Create the export action. The identifier is passed in the export slot.
*/
void createExportAction( const QString &label, const QString &identifier = QString::null );
/**
Returns a pointer to the address book object.
*/
KABC::AddressBook *addressBook() const;
/**
Returns a pointer to the parent widget. It can be used as parent for
message boxes.
*/
QWidget *parentWidget() const;
private slots:
void slotImportActivated( const QString& );
void slotExportActivated( const QString& );
private:
KABC::AddressBook *mAddressBook;
QWidget *mParentWidget;
class XXPortObjectPrivate;
XXPortObjectPrivate *d;
};
-#ifndef KAB_EMBEDDED
class XXPortFactory : public KLibFactory
{
public:
virtual XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent,
const char *name = 0 ) = 0;
protected:
virtual QObject* createObject( QObject*, const char*, const char*,
const QStringList & )
{
return 0;
}
};
-#else //KAB_EMBEDDED
-class XXPortFactory
-{
- public:
- virtual XXPortObject *xxportObject( KABC::AddressBook *ab, QWidget *parent,
- const char *name = 0 ) = 0;
-
- protected:
- virtual QObject* createObject( QObject*, const char*, const char*,
- const QStringList & )
- {
- return 0;
- }
-};
-#endif //KAB_EMBEDDED
-
-
#endif