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,
28 #include "coordinates/geocoordinate.h"
31 * @brief Container for a single location search result
33 * Contains all data for a single location search result item.
35 * @author Henri Lampela - henri.lampela@ixonos.com
36 * @author Sami Rämö - sami.ramo@ixonos.com
45 * Constructs empty Location object.
49 /*******************************************************************************
50 * MEMBER FUNCTIONS AND SLOTS
51 ******************************************************************************/
53 * @brief Gets the address components of the location
55 * @returns list of address components
57 QStringList addressComponents() const;
60 * @brief Gets the coordinates of the location
62 * @returns coordinates of the location
64 const GeoCoordinate& coordinates() const;
67 * @brief Gets the formatted address of the location
68 * e.g. Oxford street 1, London W1, United kingdom
70 * @returns coordinates of the location
72 const QString& formattedAddress() const;
75 * @brief Sets the coordinates of the location
77 * @param coordinate Coordinates of the location
79 void setCoordinates(const GeoCoordinate &coordinate);
82 * @brief Sets the formatted address of the location
85 void setFormattedAddress(const QString &formattedAddress);
88 * @brief Set recommended viewport corner coordinates
90 * @param southwest Coordinates of the southwest corner
91 * @param northeast Coordinates of the northeast corner
93 void setViewPort(const GeoCoordinate &southwest, const GeoCoordinate &northeast);
96 * @brief Gets the coordinates of the recommended viewport of the location
98 * @param[out] southwest returns southwest corner coordinates of the recommended viewport
99 * @param[out] northeast returns northeast corner coordinates of the recommended viewport
101 void viewport(GeoCoordinate &southwest, GeoCoordinate &northeast) const;
103 /*******************************************************************************
105 ******************************************************************************/
107 QString m_formattedAddress; ///< Placeholder for formatted address
109 GeoCoordinate m_coordinates; ///< Placeholcer for coordinates
110 GeoCoordinate m_viewportNE; ///< Placeholder for viewport northeast corner
111 GeoCoordinate m_viewportSW; ///< Placeholder for viewport southwest corner