2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Henri Lampela - henri.lampela@ixonos.com
6 Sami Rämö - sami.ramo@ixonos.com
8 Situare is free software; you can redistribute it and/or
9 modify it under the terms of the GNU General Public License
10 version 2 as published by the Free Software Foundation.
12 Situare is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Situare; if not, write to the Free Software
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
24 #include <QStringList>
26 #include "routingcommon.h"
32 qDebug() << __PRETTY_FUNCTION__;
35 QStringList Location::addressComponents() const
37 qDebug() << __PRETTY_FUNCTION__;
39 QStringList list = m_formattedAddress.split(",");
40 QStringList trimmedList;
42 foreach(QString str, list) {
43 trimmedList.append(str.trimmed());
49 const GeoCoordinate& Location::coordinates() const
51 qDebug() << __PRETTY_FUNCTION__;
56 const QString& Location::formattedAddress() const
58 qDebug() << __PRETTY_FUNCTION__;
60 return m_formattedAddress;
63 void Location::setCoordinates(const GeoCoordinate &coordinate)
65 qDebug() << __PRETTY_FUNCTION__;
67 m_coordinates = coordinate;
70 void Location::setFormattedAddress(const QString &formattedAddress)
72 qDebug() << __PRETTY_FUNCTION__;
74 m_formattedAddress = formattedAddress;
77 void Location::setViewPort(const GeoCoordinate &southwest, const GeoCoordinate &northeast)
79 qDebug() << __PRETTY_FUNCTION__;
81 m_viewportSW = southwest;
82 m_viewportNE = northeast;
85 void Location::viewport(GeoCoordinate &southwest, GeoCoordinate &northeast) const
87 qDebug() << __PRETTY_FUNCTION__;
89 southwest = m_viewportSW;
90 northeast = m_viewportNE;