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 QString ×tamp, const bool &type,
46 const QString &userId, const QString &units = 0, const double &value = 0);
49 * @brief Default constructor, initializes member data as NULL/0
54 /*******************************************************************************
55 * MEMBER FUNCTIONS AND SLOTS
56 ******************************************************************************/
61 * @param address street address
63 void setAddress(const QString &address);
66 * @brief Set coordinates ( x = lon, y = lat )
68 * @param coordinates coordinates
70 void setCoordinates(const QPointF &coordinates);
75 * @param value distance
76 * @param units unit type
78 void setDistance(const double &value, const QString &units);
83 * @param note note/status message
85 void setNote(const QString ¬e);
88 * @brief Set profile image
92 void setProfileImage(const QPixmap &image);
95 * @brief Set download address for profile image
97 * @param imageUrl image url
99 void setProfileImageUrl(const QUrl &imageUrl);
102 * @brief Set timestamp for last status update, timestamp is in literal mode
104 * @param timestamp timestamp
106 void setTimestamp(const QString ×tamp);
111 * @return QString address
113 const QString &address() const;
116 * @brief Get coordinates
118 * @return QPointF coordinates
120 const QPointF &coordinates() const;
123 * @brief Get distance and units
125 * @param value distance
126 * @param units unit type
128 void distance(double &value, QString &units) const;
133 * @return QString profile name
135 const QString &name() const;
138 * @brief Get note/status message
140 * @return QString note
142 const QString ¬e() const;
145 * @brief Get profile image
147 * @return QPixmap image
149 const QPixmap &profileImage() const;
152 * @brief Get download address for profile image
154 * @return QString url
156 const QUrl &profileImageUrl() const;
159 * @brief Get timestamp of last status update
161 * @return QString timestamp
163 const QString ×tamp() const;
166 * @brief Get user type
168 * @return bool user type (true = user, false = friend)
170 const bool &type() const;
175 * @return QString userId
177 const QString &userId() const;
179 /*******************************************************************************
181 ******************************************************************************/
184 QString m_address; ///< placeholder for address information
185 QPointF m_coordinates; ///< placeholder for coordinates
186 QString m_name; ///< placeholder for name
187 QString m_note; ///< placeholder for note
188 QUrl m_profileImageUrl; ///< placeholder for image url
189 QString m_timestamp; ///< placeholer for timestamp
190 bool m_type; ///< placeholder for user type
191 QString m_units; ///< placeholder for distance unit type
192 QString m_userId; ///< placeholder for userId
193 double m_value; ///< placeholder for distance value
195 QPixmap m_profileImage; ///< placeholder for image