xxport.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef KAB_XXPORT_H
00025 #define KAB_XXPORT_H
00026
00027 #include <qobject.h>
00028
00029 #include <kabc/addressbook.h>
00030 #include <kabc/addresseelist.h>
00031 #include <klibloader.h>
00032 #include <kxmlguiclient.h>
00033
00034 namespace KAB {
00035
00036 class XXPort : public QObject, virtual public KXMLGUIClient
00037 {
00038 Q_OBJECT
00039
00040 public:
00041 XXPort( KABC::AddressBook *ab, QWidget *parent, const char *name = 0 );
00042 ~XXPort();
00043
00048 virtual QString identifier() const = 0;
00049
00054 virtual bool requiresSorting() const { return false; }
00055
00056 public slots:
00060 virtual bool exportContacts( const KABC::AddresseeList &list, const QString& identifier );
00061
00065 virtual KABC::AddresseeList importContacts( const QString& identifier ) const;
00066
00067 signals:
00073 void exportActivated( const QString&, const QString& );
00074
00080 void importActivated( const QString&, const QString& );
00081
00082 protected:
00086 void createImportAction( const QString &label, const QString &identifier = QString::null );
00087
00091 void createExportAction( const QString &label, const QString &identifier = QString::null );
00092
00096 KABC::AddressBook *addressBook() const;
00097
00102 QWidget *parentWidget() const;
00103
00104 private slots:
00105 void slotImportActivated( const QString& );
00106 void slotExportActivated( const QString& );
00107
00108 private:
00109 KABC::AddressBook *mAddressBook;
00110 QWidget *mParentWidget;
00111
00112 class XXPortPrivate;
00113 XXPortPrivate *d;
00114 };
00115
00116 class XXPortFactory : public KLibFactory
00117 {
00118 public:
00119 virtual XXPort *xxportObject( KABC::AddressBook *ab, QWidget *parent,
00120 const char *name = 0 ) = 0;
00121
00122 protected:
00123 virtual QObject* createObject( QObject*, const char*, const char*,
00124 const QStringList & )
00125 {
00126 return 0;
00127 }
00128 };
00129
00130 }
00131
00132 #endif
This file is part of the documentation for kaddressbook Library Version 3.2.2.