Removed unnecessary images from res folder and made a few cosmetic changes
[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 QString &timestamp, const bool &type,
26            const QString &userId, const QString &units, const double &value)
27                : m_address(address)
28                , m_coordinates(coordinates)
29                , m_name(name)
30                , m_note(note)
31                , m_profileImageUrl(imageUrl)
32                , m_timestamp(timestamp)
33                , m_type(type)
34                , m_units(units)
35                , m_userId(userId)
36                , m_value(value)
37 {
38
39 }
40
41 User::User()
42     : m_address()
43     , m_coordinates()
44     , m_name()
45     , m_note()
46     , m_profileImageUrl()
47     , m_timestamp()
48     , m_type()
49     , m_units()
50     , m_userId()
51     , m_value()
52 {
53
54 }
55
56 void User::setAddress(const QString &address)
57 {
58     m_address = address;
59 }
60
61 void User::setCoordinates(const QPointF &coordinates)
62 {
63     m_coordinates = coordinates;
64 }
65
66 void User::setDistance(const double &value, const QString &units)
67 {
68     m_value = value;
69     m_units = units;
70 }
71
72 void User::setNote(const QString &note)
73 {
74     m_note = note;
75 }
76
77 void User::setProfileImage(const QPixmap &image)
78 {
79     m_profileImage = image;
80 }
81
82 void User::setProfileImageUrl(const QUrl &imageUrl)
83 {
84     m_profileImageUrl = imageUrl;
85 }
86
87 void User::setTimestamp(const QString &timestamp)
88 {
89     m_timestamp = timestamp;
90 }
91
92 const QString& User::address() const
93 {
94     return m_address;
95 }
96
97 const QPointF& User::coordinates() const
98 {
99     return m_coordinates;
100 }
101
102 void User::distance(double &value, QString &units) const
103 {
104     value = m_value;
105     units = m_units;
106 }
107
108 const QString& User::name() const
109 {
110     return m_name;
111 }
112
113 const QString& User::note() const
114 {
115     return m_note;
116 }
117
118 const QPixmap& User::profileImage() const
119 {
120     return m_profileImage;
121 }
122
123 const QUrl& User::profileImageUrl() const
124 {
125     return m_profileImageUrl;
126 }
127
128 const QString& User::timestamp() const
129 {
130     return m_timestamp;
131 }
132
133 const bool& User::type() const
134 {
135     return m_type;
136 }
137
138 const QString& User::userId() const
139 {
140     return m_userId;
141 }