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,
30 * @brief Class to store user information (applies to friends also)
32 * @author Henri Lampela
33 * @class User user.h "user/user.h"
40 * @brief Default constructor, initializes member data
43 User(const QString address, const QPointF coordinates, const QString name, const QString note,
44 const QUrl imageUrl, const QString timestamp, const bool type, const QString userId,
45 const QString units = 0, const double value = 0);
50 * @param address street address
52 void setAddress(const QString &address);
55 * @brief Set coordinates ( x = lon, y = lat )
57 * @param coordinates coordinates
59 void setCoordinates(const QPointF &coordinates);
64 * @param value distance
65 * @param units unit type
67 void setDistance(const double &value, const QString &units);
72 * @param note note/status message
74 void setNote(const QString ¬e);
77 * @brief Set download address for profile image
79 * @param imageUrl image url
81 void setProfileImageUrl(const QUrl &imageUrl);
84 * @brief Set timestamp for last status update, timestamp is in literal mode
86 * @param timestamp timestamp
88 void setTimestamp(const QString ×tamp);
93 * @return QString address
95 QString address() const;
98 * @brief Get coordinates
100 * @return QPointF coordinates
102 QPointF coordinates() const;
105 * @brief Get distance and units
107 * @param value distance
108 * @param units unit type
110 void distance(double &value, QString &units) const;
115 * @return QString profile name
117 QString name() const;
120 * @brief Get note/status message
122 * @return QString note
124 QString note() const;
127 * @brief Get download address for profile image
129 * @return QString url
131 QUrl profileImageUrl() const;
134 * @brief Get timestamp of last status update
136 * @return QString timestamp
138 QString timestamp() const;
141 * @brief Get user type
143 * @return bool user type (true = user, false = friend)
150 * @return QString userId
152 QString userId() const;
155 QString m_address; ///< placeholder for address information
156 QPointF m_coordinates; ///< placeholder for coordinates
157 QString m_name; ///< placeholder for name
158 QString m_note; ///< placeholder for note
159 QUrl m_profileImageUrl; ///< placeholder for image url
160 QString m_timestamp; ///< placeholer for timestamp
161 bool m_type; ///< placeholder for user type
162 QString m_units; ///< placeholder for distance unit type
163 QString m_userId; ///< placeholder for userId
164 double m_value; ///< placeholder for distance value