2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Henri Lampela - henri.lampela@ixonos.com
7 Situare is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License
9 version 2 as published by the Free Software Foundation.
11 Situare is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with Situare; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
29 #include "coordinates/geocoordinate.h"
32 * @brief Class to store user information (applies to friends also)
34 * @author Henri Lampela
35 * @class User user.h "user/user.h"
42 * @brief Constructor, initializes member data
45 User(const QString &address, const GeoCoordinate &coordinates, const QString &name,
46 const QString ¬e, const QUrl &imageUrl, const QString ×tamp,
47 const bool &type, const QString &userId, const QString &units = 0,
48 const double &value = 0);
51 * @brief Default constructor, initializes member data as NULL/0
56 /*******************************************************************************
57 * MEMBER FUNCTIONS AND SLOTS
58 ******************************************************************************/
63 * @param address street address
65 void setAddress(const QString &address);
68 * @brief Set coordinates ( x = lon, y = lat )
70 * @param coordinates coordinates
72 void setCoordinates(const GeoCoordinate &coordinates);
77 * @param value distance
78 * @param units unit type
80 void setDistance(const double &value, const QString &units);
85 * @param note note/status message
87 void setNote(const QString ¬e);
90 * @brief Set profile image
94 void setProfileImage(const QPixmap &image);
97 * @brief Set download address for profile image
99 * @param imageUrl image url of big image
101 void setProfileImageUrl(const QUrl &imageUrl);
104 * @brief Set timestamp for last status update, timestamp is in literal mode
106 * @param timestamp timestamp
108 void setTimestamp(const QString ×tamp);
113 * @return QString address
115 const QString &address() const;
118 * @brief Get coordinates
120 * @return GeoCoordinate coordinates
122 const GeoCoordinate &coordinates() const;
125 * @brief Get distance and units
127 * @param value distance
128 * @param units unit type
130 void distance(double &value, QString &units) const;
135 * @return QString profile name
137 const QString &name() const;
140 * @brief Get note/status message
142 * @return QString note
144 const QString ¬e() const;
147 * @brief Get profile image
149 * @return QPixmap image
151 const QPixmap &profileImage() const;
154 * @brief Get download address for profile image
156 * @return QString url
158 const QUrl &profileImageUrl() const;
161 * @brief Get timestamp of last status update
163 * @return QString timestamp
165 const QString ×tamp() const;
168 * @brief Get user type
170 * @return bool user type (true = user, false = friend)
172 const bool &type() const;
177 * @return QString userId
179 const QString &userId() const;
181 /*******************************************************************************
183 ******************************************************************************/
186 QString m_address; ///< placeholder for address information
187 GeoCoordinate m_coordinates; ///< placeholder for coordinates
188 QString m_name; ///< placeholder for name
189 QString m_note; ///< placeholder for note
190 QUrl m_profileImageUrl; ///< placeholder for image url
191 QString m_timestamp; ///< placeholer for timestamp
192 bool m_type; ///< placeholder for user type
193 QString m_units; ///< placeholder for distance unit type
194 QString m_userId; ///< placeholder for userId
195 double m_value; ///< placeholder for distance value
196 QPixmap m_profileImage; ///< placeholder for image