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);
47 /*******************************************************************************
48 * MEMBER FUNCTIONS AND SLOTS
49 ******************************************************************************/
54 * @param address street address
56 void setAddress(const QString &address);
59 * @brief Set coordinates ( x = lon, y = lat )
61 * @param coordinates coordinates
63 void setCoordinates(const QPointF &coordinates);
68 * @param value distance
69 * @param units unit type
71 void setDistance(const double &value, const QString &units);
76 * @param note note/status message
78 void setNote(const QString ¬e);
81 * @brief Set download address for profile image
83 * @param imageUrl image url
85 void setProfileImageUrl(const QUrl &imageUrl);
88 * @brief Set timestamp for last status update, timestamp is in literal mode
90 * @param timestamp timestamp
92 void setTimestamp(const QString ×tamp);
97 * @return QString address
99 QString address() const;
102 * @brief Get coordinates
104 * @return QPointF coordinates
106 QPointF coordinates() const;
109 * @brief Get distance and units
111 * @param value distance
112 * @param units unit type
114 void distance(double &value, QString &units) const;
119 * @return QString profile name
121 QString name() const;
124 * @brief Get note/status message
126 * @return QString note
128 QString note() const;
131 * @brief Get download address for profile image
133 * @return QString url
135 QUrl profileImageUrl() const;
138 * @brief Get timestamp of last status update
140 * @return QString timestamp
142 QString timestamp() const;
145 * @brief Get user type
147 * @return bool user type (true = user, false = friend)
154 * @return QString userId
156 QString userId() const;
158 /*******************************************************************************
160 ******************************************************************************/
163 QString m_address; ///< placeholder for address information
164 QPointF m_coordinates; ///< placeholder for coordinates
165 QString m_name; ///< placeholder for name
166 QString m_note; ///< placeholder for note
167 QUrl m_profileImageUrl; ///< placeholder for image url
168 QString m_timestamp; ///< placeholer for timestamp
169 bool m_type; ///< placeholder for user type
170 QString m_units; ///< placeholder for distance unit type
171 QString m_userId; ///< placeholder for userId
172 double m_value; ///< placeholder for distance value