3
Copyright (C) 2010 by Adam Pigg (adam@piggz.co.uk)
5
This library is free software; you can redistribute it and/or
6
modify it under the terms of the GNU Library General Public
7
License as published by the Free Software Foundation; either
8
version 2.1 of the License, or (at your option) any later version.
10
This library is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
Library General Public License for more details.
15
You should have received a copy of the GNU Library General Public License
16
along with this library; see the file COPYING.LIB. If not, write to
17
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18
Boston, MA 02110-1301, USA.
21
#ifndef KOREPORTPLUGININTERFACE_H
22
#define KOREPORTPLUGININTERFACE_H
24
#include <QtCore/QObject>
25
#include <KoReportDesigner.h>
26
#include <QGraphicsScene>
27
#include <KLocalizedString>
28
#include "koreport_export.h"
29
#include <KPluginFactory>
32
class KoReportPluginInfo;
34
class KOREPORT_EXPORT KoReportPluginInterface : public QObject
38
KoReportPluginInterface(QObject *parent, const QVariantList &args = QVariantList());
39
KoReportPluginInterface();
41
virtual ~KoReportPluginInterface();
43
virtual QObject* createDesignerInstance(KoReportDesigner *, QGraphicsScene * scene, const QPointF &pos) = 0;
44
virtual QObject* createDesignerInstance(QDomNode & element, KoReportDesigner *, QGraphicsScene * scene) = 0;
45
virtual QObject* createRendererInstance(QDomNode & element) = 0;
46
virtual QObject* createScriptInstance(KoReportItemBase* item) = 0;
48
void setInfo(KoReportPluginInfo *);
49
KoReportPluginInfo* info() const;
52
KoReportPluginInfo *m_pluginInfo;
56
//! Implementation of driver's static version information and plugin entry point.
59
#define K_EXPORT_KOREPORT_ITEMPLUGIN( class_name, internal_name ) \
60
K_PLUGIN_FACTORY(factory, registerPlugin<class_name>();) \
61
K_EXPORT_PLUGIN(factory("koreport_" # internal_name)) \
62
K_EXPORT_PLUGIN_VERSION(KDE_MAKE_VERSION(0, 0, 1))
64
#endif // KOREPORTPLUGININTERFACE_H