Debian Codegraph @

liblearnerprofile/src/learninggoal.h

raw
1 /*
2 SPDX-FileCopyrightText: 2013 Andreas Cord-Landwehr <[email protected]>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6
7 #ifndef LEARNINGGOAL_H
8 #define LEARNINGGOAL_H
9
10 #include "liblearnerprofile_export.h"
11 #include <QObject>
12
13 class LearningGoalPrivate;
14
15 namespace LearnerProfile
16 {
17 /**
18 * \class LearningGoal
19 */
20 class LIBLEARNERPROFILE_EXPORT LearningGoal : public QObject
21 {
22 Q_OBJECT
23 Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
24 Q_PROPERTY(QString id READ identifier WRITE setIdentifier NOTIFY identifierChanged)
25 Q_PROPERTY(Category category READ category)
26
27 public:
28 Q_ENUMS(Category)
29 enum Category { Unspecified = 0, Language = 1 };
30
31 explicit LearningGoal(QObject *parent = nullptr);
32 explicit LearningGoal(LearningGoal::Category category, const QString &identifier, QObject *parent = nullptr);
33 ~LearningGoal() override;
34
35 QString name() const;
36 void setName(const QString &name);
37 QString identifier() const;
38 void setIdentifier(const QString &identifier);
39 LearningGoal::Category category() const;
40
41 Q_SIGNALS:
42 void nameChanged();
43 void identifierChanged();
44
45 private:
46 Q_DISABLE_COPY(LearningGoal)
47 const QScopedPointer<LearningGoalPrivate> d;
48 };
49 }
50
51 #endif // LEARNINGGOAL_H