KReport

KReportItemWeb.h
1 /* This file is part of the KDE project
2  Copyright Shreya Pandit <[email protected]>
3  Copyright 2011 Adam Pigg <[email protected]>
4 
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 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  Library General Public License for more details.
14 
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.
19 */
20 
21 #ifndef KREPORTITEMWEB_H
22 #define KREPORTITEMWEB_H
23 
24 #include <KReportAsyncItemBase>
25 #include <KReportDataSource>
26 
27 #include <QGraphicsScene>
28 #include <QUrl>
29 #include <QDomNode>
30 
31 class QUrl;
32 class QWebPage;
33 
34 namespace Scripting
35 {
36 class Web;
37 }
38 
39 /**
40 */
41 class KReportItemWeb : public KReportAsyncItemBase
42 {
43  Q_OBJECT
44 public:
45  KReportItemWeb();
46  explicit KReportItemWeb(const QDomNode &element);
47  ~KReportItemWeb() override;
48 
49  QString typeName() const override;
50  int renderSimpleData(OROPage *page, OROSection *section, const QPointF &offset, const QVariant &data, KReportScriptHandler *script) override;
51 
52 private Q_SLOTS:
53  void loadFinished(bool);
54 
55 private:
56  bool m_rendering;
57  OROPage *m_targetPage;
58  OROSection *m_targetSection;
59  QPointF m_targetOffset;
60 
61 protected:
62  void createProperties() override;
63 
64  QWebPage *m_webPage;
65 
66  friend class Scripting::Web;
67 };
68 
69 #endif
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
virtual QString typeName() const =0
Return the item type as a string.
Represents a single page in a document and may contain zero or more OROPrimitive objects all of which...
int renderSimpleData(OROPage *page, OROSection *section, const QPointF &offset, const QVariant &data, KReportScriptHandler *script) override=0
Render the item into a primitive which is used by the second stage renderer.
Represents a single a single row in a document and may contain zero or more OROPrimitives.
Field item script interface.
Base class for items that are drawn asyncronously due to unknown loading times.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 04:17:37 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.