File indexing completed on 2024-05-12 04:43:21

0001 /*
0002  * Copyright (C) 2007-2016 by Adam Pigg (adam@piggz.co.uk)
0003  *
0004  * This library is free software; you can redistribute it and/or
0005  * modify it under the terms of the GNU Lesser General Public
0006  * License as published by the Free Software Foundation; either
0007  * version 2.1 of the License, or (at your option) any later version.
0008  *
0009  * This library is distributed in the hope that it will be useful,
0010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
0012  * Lesser General Public License for more details.
0013  *
0014  * You should have received a copy of the GNU Lesser General Public
0015  * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
0016  */
0017 
0018 #include "KReportScriptMaps.h"
0019 #include "KReportItemMaps.h"
0020 
0021 namespace Scripting
0022 {
0023 
0024 Maps::Maps(KReportItemMaps *i)
0025 {
0026     m_map = i;
0027     m_map->m_latDataSetFromScript = false;
0028     m_map->m_longDataSetFromScript = false;
0029     m_map->m_zoomDataSetFromScript = false;
0030 }
0031 
0032 Maps::~Maps()
0033 {
0034 }
0035 
0036 QPointF Maps::position() const
0037 {
0038     return m_map->position();
0039 }
0040 
0041 void Maps::setPosition(const QPointF& position)
0042 {
0043     m_map->setPosition(position);
0044 }
0045 
0046 QSizeF Maps::size() const
0047 {
0048     return m_map->size();
0049 }
0050 
0051 void Maps::setSize(const QSizeF& size)
0052 {
0053     m_map->setSize(size);
0054 }
0055 
0056 void Maps::setLatitude(qreal latitude)
0057 {
0058     m_map->m_latitude = latitude;
0059     m_map->m_latDataSetFromScript = true;
0060 }
0061 
0062 void Maps::setLongitude(qreal longitude)
0063 {
0064     m_map->m_longtitude = longitude;
0065     m_map->m_longDataSetFromScript = true;
0066 }
0067 
0068 void Maps::setZoom(int zoom)
0069 {
0070     m_map->m_zoom = zoom;
0071     m_map->m_zoomDataSetFromScript = true;
0072 }
0073 
0074 }