kword
KWMailMergeDataSource.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef _SERIALLETTER_INTERFACE_H_
00022 #define _SERIALLETTER_INTERFACE_H_
00023 #include <qcstring.h>
00024 #include <qdom.h>
00025 #include <kinstance.h>
00026 #include <qmap.h>
00027 #include <qobject.h>
00028 #include <dcopobject.h>
00029 #include <koffice_export.h>
00030 typedef QMap<QString,QString> DbRecord;
00031 #define KWSLUnspecified 0
00032 #define KWSLEdit 1
00033 #define KWSLCreate 2
00034 #define KWSLOpen 3
00035 #define KWSLMergePreview 4
00036 #define KWSLMergeDocument 5
00037
00038 #define KWSLCreate_text "create"
00039 #define KWSLOpen_text "open"
00040
00041
00042
00043
00044
00045
00046 class KWORD_EXPORT KWMailMergeDataSource: public QObject, public DCOPObject
00047 {
00048 Q_OBJECT
00049 K_DCOP
00050 public:
00051 KWMailMergeDataSource(KInstance* inst,QObject *parent);
00052 virtual ~KWMailMergeDataSource(){;}
00053 virtual class QString getValue( const class QString &name, int record = -1 ) const=0;
00054
00055 const QMap< QString, QString > &getRecordEntries() const;
00056
00057 KInstance *KWInstance(){return m_instance;}
00058 virtual bool showConfigDialog(class QWidget*,int) =0;
00059
00060 virtual void save(QDomDocument&, QDomElement&)=0;
00061 virtual void load( class QDomElement& elem )=0;
00062
00063 virtual void refresh(bool force)=0;
00064 QByteArray info;
00065 protected:
00066 DbRecord sampleRecord;
00067 private:
00068 KInstance *m_instance;
00069 k_dcop:
00070 virtual int getNumRecords() const =0;
00071 };
00072
00073
00074
00075
00076 #endif
|