KReport

KReportScriptMaps.cpp
1 /*
2  * Copyright (C) 2007-2016 by Adam Pigg ([email protected])
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 
21 namespace Scripting
22 {
23 
24 Maps::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 
32 Maps::~Maps()
33 {
34 }
35 
36 QPointF Maps::position() const
37 {
38  return m_map->position();
39 }
40 
41 void Maps::setPosition(const QPointF& position)
42 {
43  m_map->setPosition(position);
44 }
45 
46 QSizeF Maps::size() const
47 {
48  return m_map->size();
49 }
50 
51 void Maps::setSize(const QSizeF& size)
52 {
53  m_map->setSize(size);
54 }
55 
56 void Maps::setLatitude(qreal latitude)
57 {
58  m_map->m_latitude = latitude;
59  m_map->m_latDataSetFromScript = true;
60 }
61 
62 void Maps::setLongitude(qreal longitude)
63 {
64  m_map->m_longtitude = longitude;
65  m_map->m_longDataSetFromScript = true;
66 }
67 
68 void Maps::setZoom(int zoom)
69 {
70  m_map->m_zoom = zoom;
71  m_map->m_zoomDataSetFromScript = true;
72 }
73 
74 }
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-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.