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"
42 * @brief Default constructor, initializes member data
45 User(const QString address, const QPointF coordinates, const QString name, const QString note,
46 const QUrl imageUrl, const QString timestamp, const bool type, const QString userId,
47 const QString units = 0, const double value = 0);
49 /*******************************************************************************
50 * MEMBER FUNCTIONS AND SLOTS
51 ******************************************************************************/
56 * @param address street address
58 void setAddress(const QString &address);
61 * @brief Set coordinates ( x = lon, y = lat )
63 * @param coordinates coordinates
65 void setCoordinates(const QPointF &coordinates);
70 * @param value distance
71 * @param units unit type
73 void setDistance(const double &value, const QString &units);
78 * @param note note/status message
80 void setNote(const QString ¬e);
83 * @brief Set download address for profile image
85 * @param imageUrl image url
87 void setProfileImageUrl(const QUrl &imageUrl);
90 * @brief Set timestamp for last status update, timestamp is in literal mode
92 * @param timestamp timestamp
94 void setTimestamp(const QString ×tamp);
99 * @return QString address
101 QString address() const;
104 * @brief Get coordinates
106 * @return QPointF coordinates
108 QPointF coordinates() const;
111 * @brief Get distance and units
113 * @param value distance
114 * @param units unit type
116 void distance(double &value, QString &units) const;
121 * @return QString profile name
123 QString name() const;
126 * @brief Get note/status message
128 * @return QString note
130 QString note() const;
133 * @brief Get download address for profile image
135 * @return QString url
137 QUrl profileImageUrl() const;
140 * @brief Get timestamp of last status update
142 * @return QString timestamp
144 QString timestamp() const;
147 * @brief Get user type
149 * @return bool user type (true = user, false = friend)
156 * @return QString userId
158 QString userId() const;
160 /*******************************************************************************
162 ******************************************************************************/
165 QString m_address; ///< placeholder for address information
166 QPointF m_coordinates; ///< placeholder for coordinates
167 QString m_name; ///< placeholder for name
168 QString m_note; ///< placeholder for note
169 QUrl m_profileImageUrl; ///< placeholder for image url
170 QString m_timestamp; ///< placeholer for timestamp
171 bool m_type; ///< placeholder for user type
172 QString m_units; ///< placeholder for distance unit type
173 QString m_userId; ///< placeholder for userId
174 double m_value; ///< placeholder for distance value