KReport

KReportScriptMaps.cpp
1/*
2 * Copyright (C) 2007-2016 by Adam Pigg (adam@piggz.co.uk)
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#include "KReportScriptMaps.h"
19#include "KReportItemMaps.h"
20
21namespace Scripting
22{
23
24Maps::Maps(KReportItemMaps *i)
25{
26 m_map = i;
27 m_map->m_latDataSetFromScript = false;
28 m_map->m_longDataSetFromScript = false;
29 m_map->m_zoomDataSetFromScript = false;
30}
31
32Maps::~Maps()
33{
34}
35
36QPointF Maps::position() const
37{
38 return m_map->position();
39}
40
41void Maps::setPosition(const QPointF& position)
42{
43 m_map->setPosition(position);
44}
45
46QSizeF Maps::size() const
47{
48 return m_map->size();
49}
50
51void Maps::setSize(const QSizeF& size)
52{
53 m_map->setSize(size);
54}
55
56void Maps::setLatitude(qreal latitude)
57{
58 m_map->m_latitude = latitude;
59 m_map->m_latDataSetFromScript = true;
60}
61
62void Maps::setLongitude(qreal longitude)
63{
64 m_map->m_longtitude = longitude;
65 m_map->m_longDataSetFromScript = true;
66}
67
68void Maps::setZoom(int zoom)
69{
70 m_map->m_zoom = zoom;
71 m_map->m_zoomDataSetFromScript = true;
72}
73
74}
void setSize(const QSizeF &ptSize)
Sets size for the element.
QPointF position() const
Return the position in points.
void setPosition(const QPointF &ptPos)
Sets position for the element.
QSizeF size() const
Return the size in points.
QAction * zoom(const QObject *recvr, const char *slot, QObject *parent)
Field item script interface.
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.