started feature to show bigger profile images
[situare] / src / user / user.cpp
1 /*
2    Situare - A location system for Facebook
3    Copyright (C) 2010  Ixonos Plc. Authors:
4
5       Henri Lampela - henri.lampela@ixonos.com
6
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.
10
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.
15
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,
19    USA.
20 */
21
22 #include "user.h"
23
24 User::User(const QString &address, const QPointF &coordinates, const QString &name,
25            const QString &note, const QUrl &imageUrl, const QUrl &imageUrlBig,
26            const QString &timestamp, const bool &type, const QString &userId,
27            const QString &units, const double &value)
28                : m_address(address)
29                , m_coordinates(coordinates)
30                , m_name(name)
31                , m_note(note)
32                , m_profileImageUrl(imageUrl)
33                , m_profileImageUrlBig(imageUrlBig)
34                , m_timestamp(timestamp)
35                , m_type(type)
36                , m_units(units)
37                , m_userId(userId)
38                , m_value(value)
39 {
40
41 }
42
43 User::User()
44     : m_address()
45     , m_coordinates()
46     , m_name()
47     , m_note()
48     , m_profileImageUrl()
49     , m_timestamp()
50     , m_type()
51     , m_units()
52     , m_userId()
53     , m_value()
54 {
55
56 }
57
58 void User::setAddress(const QString &address)
59 {
60     m_address = address;
61 }
62
63 void User::setCoordinates(const QPointF &coordinates)
64 {
65     m_coordinates = coordinates;
66 }
67
68 void User::setDistance(const double &value, const QString &units)
69 {
70     m_value = value;
71     m_units = units;
72 }
73
74 void User::setNote(const QString &note)
75 {
76     m_note = note;
77 }
78
79 void User::setProfileImage(const QPixmap &image)
80 {
81     m_profileImage = image;
82 }
83
84 void User::setProfileImageBig(const QPixmap &image)
85 {
86     m_profileImageBig = image;
87 }
88
89 void User::setProfileImageUrl(const QUrl &imageUrl)
90 {
91     m_profileImageUrl = imageUrl;
92 }
93
94 void User::setProfileImageUrlBig(const QUrl &imageUrl)
95 {
96     m_profileImageUrlBig = imageUrl;
97 }
98
99 void User::setTimestamp(const QString &timestamp)
100 {
101     m_timestamp = timestamp;
102 }
103
104 const QString& User::address() const
105 {
106     return m_address;
107 }
108
109 const QPointF& User::coordinates() const
110 {
111     return m_coordinates;
112 }
113
114 void User::distance(double &value, QString &units) const
115 {
116     value = m_value;
117     units = m_units;
118 }
119
120 const QString& User::name() const
121 {
122     return m_name;
123 }
124
125 const QString& User::note() const
126 {
127     return m_note;
128 }
129
130 const QPixmap& User::profileImage() const
131 {
132     return m_profileImage;
133 }
134
135 const QPixmap& User::profileImageBig() const
136 {
137     return m_profileImageBig;
138 }
139
140 const QUrl& User::profileImageUrl() const
141 {
142     return m_profileImageUrl;
143 }
144
145 const QUrl& User::profileImageUrlBig() const
146 {
147     return m_profileImageUrlBig;
148 }
149
150 const QString& User::timestamp() const
151 {
152     return m_timestamp;
153 }
154
155 const bool& User::type() const
156 {
157     return m_type;
158 }
159
160 const QString& User::userId() const
161 {
162     return m_userId;
163 }