kword

KWMailMergeDataSource.h

00001 /* This file is part of the KDE project
00002    Original file (mailmerge.h): Copyright (C) 1998, 1999 Reginald Stadlbauer <reggie@kde.org>
00003    Copyright (C) 2001 Joseph Wenninger <jowenn@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
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  * Class: KWMailMergeDataSource
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
KDE Home | KDE Accessibility Home | Description of Access Keys