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,
31 * @brief Class to store user information (applies to friends also)
33 * @author Henri Lampela
34 * @class User user.h "user/user.h"
41 * @brief Default constructor, initializes member data
44 User(const QString address, const QPointF coordinates, const QString name, const QString note,
45 const QUrl imageUrl, const QString timestamp, const bool type, const QString userId,
46 const QString units = 0, const double value = 0);
48 /*******************************************************************************
49 * MEMBER FUNCTIONS AND SLOTS
50 ******************************************************************************/
55 * @param address street address
57 void setAddress(const QString &address);
60 * @brief Set coordinates ( x = lon, y = lat )
62 * @param coordinates coordinates
64 void setCoordinates(const QPointF &coordinates);
69 * @param value distance
70 * @param units unit type
72 void setDistance(const double &value, const QString &units);
77 * @param note note/status message
79 void setNote(const QString ¬e);
82 * @brief Set profile image
86 void setProfileImage(const QPixmap &image);
89 * @brief Set download address for profile image
91 * @param imageUrl image url
93 void setProfileImageUrl(const QUrl &imageUrl);
96 * @brief Set timestamp for last status update, timestamp is in literal mode
98 * @param timestamp timestamp
100 void setTimestamp(const QString ×tamp);
105 * @return QString address
107 QString address() const;
110 * @brief Get coordinates
112 * @return QPointF coordinates
114 QPointF coordinates() const;
117 * @brief Get distance and units
119 * @param value distance
120 * @param units unit type
122 void distance(double &value, QString &units) const;
127 * @return QString profile name
129 QString name() const;
132 * @brief Get note/status message
134 * @return QString note
136 QString note() const;
139 * @brief Get profile image
141 * @return QPixmap image
143 QPixmap profileImage() const;
146 * @brief Get download address for profile image
148 * @return QString url
150 QUrl profileImageUrl() const;
153 * @brief Get timestamp of last status update
155 * @return QString timestamp
157 QString timestamp() const;
160 * @brief Get user type
162 * @return bool user type (true = user, false = friend)
169 * @return QString userId
171 QString userId() const;
173 /*******************************************************************************
175 ******************************************************************************/
178 QString m_address; ///< placeholder for address information
179 QPointF m_coordinates; ///< placeholder for coordinates
180 QString m_name; ///< placeholder for name
181 QString m_note; ///< placeholder for note
182 QUrl m_profileImageUrl; ///< placeholder for image url
183 QString m_timestamp; ///< placeholer for timestamp
184 bool m_type; ///< placeholder for user type
185 QString m_units; ///< placeholder for distance unit type
186 QString m_userId; ///< placeholder for userId
187 double m_value; ///< placeholder for distance value
189 QPixmap m_profileImage; ///< placehokder for image