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 Constructor, initializes member data
44 User(const QString &address, const QPointF &coordinates, const QString &name,
45 const QString ¬e, const QUrl &imageUrl, const QUrl &imageUrlBig,
46 const QString ×tamp, const bool &type, const QString &userId,
47 const QString &units = 0, const double &value = 0);
50 * @brief Default constructor, initializes member data as NULL/0
55 /*******************************************************************************
56 * MEMBER FUNCTIONS AND SLOTS
57 ******************************************************************************/
62 * @param address street address
64 void setAddress(const QString &address);
67 * @brief Set coordinates ( x = lon, y = lat )
69 * @param coordinates coordinates
71 void setCoordinates(const QPointF &coordinates);
76 * @param value distance
77 * @param units unit type
79 void setDistance(const double &value, const QString &units);
84 * @param note note/status message
86 void setNote(const QString ¬e);
89 * @brief Set profile image
93 void setProfileImage(const QPixmap &image);
96 * @brief Set big profile image
98 * @param image big profile Image
100 void setProfileImageBig(const QPixmap &image);
103 * @brief Set download address for profile image
105 * @param imageUrl image url of big image
107 void setProfileImageUrl(const QUrl &imageUrl);
110 * @brief Set download address for big profile image
112 * @param imageUrl image url
114 void setProfileImageUrlBig(const QUrl &imageUrl);
117 * @brief Set timestamp for last status update, timestamp is in literal mode
119 * @param timestamp timestamp
121 void setTimestamp(const QString ×tamp);
126 * @return QString address
128 const QString &address() const;
131 * @brief Get coordinates
133 * @return QPointF coordinates
135 const QPointF &coordinates() const;
138 * @brief Get distance and units
140 * @param value distance
141 * @param units unit type
143 void distance(double &value, QString &units) const;
148 * @return QString profile name
150 const QString &name() const;
153 * @brief Get note/status message
155 * @return QString note
157 const QString ¬e() const;
160 * @brief Get profile image
162 * @return QPixmap image
164 const QPixmap &profileImage() const;
167 * @brief Get big profile image
169 * @return QPixmap big profile image
171 const QPixmap &profileImageBig() const;
174 * @brief Get download address for profile image
176 * @return QString url
178 const QUrl &profileImageUrl() const;
181 * @brief Get download address for big profile image
183 * @return QString url of big profile image
185 const QUrl &profileImageUrlBig() const;
188 * @brief Get timestamp of last status update
190 * @return QString timestamp
192 const QString ×tamp() const;
195 * @brief Get user type
197 * @return bool user type (true = user, false = friend)
199 const bool &type() const;
204 * @return QString userId
206 const QString &userId() const;
208 /*******************************************************************************
210 ******************************************************************************/
213 QString m_address; ///< placeholder for address information
214 QPointF m_coordinates; ///< placeholder for coordinates
215 QString m_name; ///< placeholder for name
216 QString m_note; ///< placeholder for note
217 QUrl m_profileImageUrl; ///< placeholder for image url
218 QUrl m_profileImageUrlBig; ///< placeholder for big profile image url
219 QString m_timestamp; ///< placeholer for timestamp
220 bool m_type; ///< placeholder for user type
221 QString m_units; ///< placeholder for distance unit type
222 QString m_userId; ///< placeholder for userId
223 double m_value; ///< placeholder for distance value
225 QPixmap m_profileImage; ///< placeholder for image
226 QPixmap m_profileImageBig; ///< placeholder for big image