File indexing completed on 2024-03-24 15:23:51

0001 /*
0002     This file is part of KDE.
0003 
0004     SPDX-FileCopyrightText: 2008 Cornelius Schumacher <schumacher@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #ifndef ATTICA_PERSON_H
0010 #define ATTICA_PERSON_H
0011 
0012 #include <QDate>
0013 #include <QList>
0014 #include <QMap>
0015 #include <QSharedDataPointer>
0016 #include <QUrl>
0017 
0018 #include "attica_export.h"
0019 
0020 namespace Attica
0021 {
0022 
0023 /**
0024  * @class Person person.h <Attica/Person>
0025  *
0026  * Represents a person.
0027  */
0028 class ATTICA_EXPORT Person
0029 {
0030 public:
0031     typedef QList<Person> List;
0032     class Parser;
0033 
0034     Person();
0035     Person(const Person &other);
0036     Person &operator=(const Person &other);
0037     ~Person();
0038 
0039     void setId(const QString &);
0040     QString id() const;
0041 
0042     void setFirstName(const QString &);
0043     QString firstName() const;
0044 
0045     void setLastName(const QString &);
0046     QString lastName() const;
0047 
0048     void setBirthday(const QDate &);
0049     QDate birthday() const;
0050 
0051     void setCountry(const QString &);
0052     QString country() const;
0053 
0054     void setLatitude(qreal);
0055     qreal latitude() const;
0056 
0057     void setLongitude(qreal);
0058     qreal longitude() const;
0059 
0060     void setAvatarUrl(const QUrl &);
0061     QUrl avatarUrl() const;
0062 
0063     void setHomepage(const QString &);
0064     QString homepage() const;
0065 
0066     void setCity(const QString &);
0067     QString city() const;
0068 
0069     void addExtendedAttribute(const QString &key, const QString &value);
0070     QString extendedAttribute(const QString &key) const;
0071 
0072     QMap<QString, QString> extendedAttributes() const;
0073 
0074     bool isValid() const;
0075 
0076 private:
0077     class Private;
0078     QSharedDataPointer<Private> d;
0079 };
0080 
0081 }
0082 
0083 #endif