File indexing completed on 2024-06-23 05:49:20

0001 /*
0002     This file is part of the Kasten Framework, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2008 Friedrich W. H. Kossebau <kossebau@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 KASTEN_PERSON_HPP
0010 #define KASTEN_PERSON_HPP
0011 
0012 // lib
0013 #include "kastencore_export.hpp"
0014 // Qt
0015 #include <QExplicitlySharedDataPointer>
0016 
0017 class QIcon;
0018 class QString;
0019 
0020 namespace Kasten {
0021 
0022 class KASTENCORE_EXPORT Person
0023 {
0024 public: // TODO: remove me again, hack!
0025     static Person createEgo();
0026     static void setEgoId(int egoId);
0027 
0028 public:
0029     Person(const QString& name, const QIcon& faceIcon);
0030     Person();
0031     Person(const Person& other);
0032     ~Person();
0033 
0034 public:
0035     Person& operator=(const Person& other);
0036 
0037 public:
0038     bool operator==(const Person& other) const;
0039 
0040 public:
0041     QString name() const;
0042     QIcon faceIcon() const;
0043 
0044 private:
0045     QExplicitlySharedDataPointer<class PersonPrivate> d;
0046 };
0047 
0048 }
0049 
0050 Q_DECLARE_TYPEINFO(Kasten::Person, Q_MOVABLE_TYPE);
0051 
0052 #endif