1 | /* |
2 | This file is part of KDE. |
3 | |
4 | SPDX-FileCopyrightText: 2008 Cornelius Schumacher <schumacher@kde.org> |
5 | |
6 | SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL |
7 | */ |
8 | |
9 | #ifndef ATTICA_PERSON_H |
10 | #define ATTICA_PERSON_H |
11 | |
12 | #include <QDate> |
13 | #include <QList> |
14 | #include <QMap> |
15 | #include <QSharedDataPointer> |
16 | #include <QUrl> |
17 | |
18 | #include "attica_export.h" |
19 | |
20 | namespace Attica |
21 | { |
22 | |
23 | /*! |
24 | * \class Attica::Person |
25 | * \inheaderfile Attica/Person |
26 | * \inmodule Attica |
27 | * |
28 | * \brief Represents a person. |
29 | */ |
30 | class ATTICA_EXPORT Person |
31 | { |
32 | public: |
33 | /*! |
34 | * |
35 | */ |
36 | typedef QList<Person> List; |
37 | class Parser; |
38 | |
39 | /*! |
40 | * |
41 | */ |
42 | Person(); |
43 | Person(const Person &other); |
44 | Person &operator=(const Person &other); |
45 | ~Person(); |
46 | |
47 | /*! |
48 | * |
49 | */ |
50 | void setId(const QString &); |
51 | |
52 | /*! |
53 | * |
54 | */ |
55 | QString id() const; |
56 | |
57 | /*! |
58 | * |
59 | */ |
60 | void setFirstName(const QString &); |
61 | |
62 | /*! |
63 | * |
64 | */ |
65 | QString firstName() const; |
66 | |
67 | /*! |
68 | * |
69 | */ |
70 | void setLastName(const QString &); |
71 | |
72 | /*! |
73 | * |
74 | */ |
75 | QString lastName() const; |
76 | |
77 | /*! |
78 | * |
79 | */ |
80 | void setBirthday(const QDate &); |
81 | |
82 | /*! |
83 | * |
84 | */ |
85 | QDate birthday() const; |
86 | |
87 | /*! |
88 | * |
89 | */ |
90 | void setCountry(const QString &); |
91 | |
92 | /*! |
93 | * |
94 | */ |
95 | QString country() const; |
96 | |
97 | /*! |
98 | * |
99 | */ |
100 | void setLatitude(qreal); |
101 | |
102 | /*! |
103 | * |
104 | */ |
105 | qreal latitude() const; |
106 | |
107 | /*! |
108 | * |
109 | */ |
110 | void setLongitude(qreal); |
111 | |
112 | /*! |
113 | * |
114 | */ |
115 | qreal longitude() const; |
116 | |
117 | /*! |
118 | * |
119 | */ |
120 | void setAvatarUrl(const QUrl &); |
121 | |
122 | /*! |
123 | * |
124 | */ |
125 | QUrl avatarUrl() const; |
126 | |
127 | /*! |
128 | * |
129 | */ |
130 | void setHomepage(const QString &); |
131 | |
132 | /*! |
133 | * |
134 | */ |
135 | QString homepage() const; |
136 | |
137 | /*! |
138 | * |
139 | */ |
140 | void setCity(const QString &); |
141 | |
142 | /*! |
143 | * |
144 | */ |
145 | QString city() const; |
146 | |
147 | /*! |
148 | * |
149 | */ |
150 | void addExtendedAttribute(const QString &key, const QString &value); |
151 | |
152 | /*! |
153 | * |
154 | */ |
155 | QString extendedAttribute(const QString &key) const; |
156 | |
157 | /*! |
158 | * |
159 | */ |
160 | QMap<QString, QString> extendedAttributes() const; |
161 | |
162 | /*! |
163 | * |
164 | */ |
165 | bool isValid() const; |
166 | |
167 | private: |
168 | class Private; |
169 | QSharedDataPointer<Private> d; |
170 | }; |
171 | |
172 | } |
173 | |
174 | #endif |
175 | |