KReport

KReportItemMaps.h
1/*
2 * Copyright (C) 2007-2008 by Adam Pigg (adam@piggz.co.uk)
3 * Copyright (C) 2011-2015 by Radoslaw Wicik (radoslaw@wicik.pl)
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 KREPORTITEMMAPS_H
20#define KREPORTITEMMAPS_H
21
22#include "KReportAsyncItemBase.h"
23
24#include <marble/MarbleWidget.h>
25#include <marble/MapThemeManager.h>
26
27#include <KProperty>
28
29#include "KReportMapRenderer.h"
30
31#include <QDomNode>
32
33class OROImage;
34class OROPicture;
35class OROPage;
36class OROSection;
37
38namespace Scripting
39{
40class Maps;
41}
42
43class KReportItemMaps : public KReportAsyncItemBase
44{
46public:
47 KReportItemMaps();
48 explicit KReportItemMaps(const QDomNode &element);
49 ~KReportItemMaps() override;
50
51 QString typeName() const override;
52 int renderSimpleData(OROPage *page, OROSection *section, const QPointF &offset, const QVariant &data, KReportScriptHandler *script) override;
53
54 QVariant realItemData(const QVariant &itemData) const override;
55
56 void renderFinished();
57
58 qreal longtitude() const;
59 qreal latitude() const;
60 int zoom() const;
61 QString themeId() const;
62
63 OROPicture* oroImage();
64
65protected:
66 KProperty* m_latitudeProperty;
67 KProperty* m_longitudeProperty;
68 KProperty* m_zoomProperty;
69 KProperty* m_themeProperty;
70
71 qreal m_longtitude = 0.0;
72 qreal m_latitude = 0.0;
73 int m_zoom = 1200;
74 OROPage *m_pageId = nullptr;
75 OROSection *m_sectionId = nullptr;
76 QPointF m_offset;
77 OROPicture * m_oroPicture = nullptr;
78 KReportMapRenderer m_mapRenderer;
79 Marble::MapThemeManager m_themeManager;
80
81private:
82 void createProperties() override;
83 void deserializeData(const QVariant& serialized);
84
85 bool m_longDataSetFromScript = false;
86 bool m_latDataSetFromScript = false;
87 bool m_zoomDataSetFromScript = false;
88
89 friend class Scripting::Maps;
90};
91
92#endif
Base class for items that are drawn asyncronously due to unknown loading times.
Defines an image. An image is a bitmap.
Represents a single page in a document and may contain zero or more OROPrimitive objects all of which...
Defines a picture. A picture is different to an image, in that it is drawn using commands.
Represents a single a single row in a document and may contain zero or more OROPrimitives.
Field item script interface.
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:06:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.