KReport

KReportPreRenderer.h
1/* This file is part of the KDE project
2 * Copyright (C) 2001-2007 by OpenMFG, LLC (info@openmfg.com)
3 * Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk)
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser 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.
9 *
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 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef KREPORTPRERENDERER_H
20#define KREPORTPRERENDERER_H
21
22#include "config-kreport.h"
23#include "kreport_export.h"
24
25#include <QObject>
26
27#ifdef KREPORT_SCRIPTING
28class KReportScriptHandler;
30#else
31#define KReportScriptHandler void
32#endif
33class KReportPreRendererPrivate;
34class ORODocument;
36class KReportDocument;
37class QDomElement;
38
39/*!
40 * @brief Takes a report definition and prerenders the result to
41 * an ORODocument that can be used to pass to any number of renderers.
42 */
43class KREPORT_EXPORT KReportPreRenderer : public QObject
44{
45 Q_OBJECT
46public:
47 explicit KReportPreRenderer(const QDomElement& document);
48
49 ~KReportPreRenderer() override;
50
51 //! Sets data source to @a data, takes ownership
52 void setDataSource(KReportDataSource* dataSource);
53
54#ifdef KREPORT_SCRIPTING
55 //!Sets the script source to @a source, does NOT take ownership as it may be an application window
56 void setScriptSource(KReportScriptSource* source);
57
58 KReportScriptHandler *scriptHandler();
59 void registerScriptObject(QObject *obj, const QString &name);
60#endif
61
62 bool generateDocument();
63
64 ORODocument *document();
65
66 /**
67 @brief Set the name of the report so that it can be used internally by the script engine
68 */
69 void setName(const QString &);
70
71 bool isValid() const;
72
73 const KReportDocument *reportData() const;
74
76 void groupChanged(const QMap<QString, QVariant> &groupData);
77 void finishedAllASyncItems();
78
79private:
80 bool setDocument(const QDomElement &document);
81
82 Q_DISABLE_COPY(KReportPreRenderer)
83 KReportPreRendererPrivate *const d;
84};
85
86#endif // KREPORTPRERENDERER_H
Abstraction of report data source.
Top level report document definition. A KReportDocment defines the design of a document,...
Takes a report definition and prerenders the result to an ORODocument that can be used to pass to any...
Abstraction of report script source.
Represents a single document containing one or more OROPage elements.
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Oct 11 2024 12:16:24 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.