| 1 |
/* |
| 2 |
SPDX-FileCopyrightText: 2013-2014 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 LEARNER_P_H |
| 8 |
#define LEARNER_P_H |
| 9 |
|
| 10 |
#include "learninggoal.h" |
| 11 |
#include <QHash> |
| 12 |
#include <QList> |
| 13 |
#include <QStandardPaths> |
| 14 |
#include <QString> |
| 15 |
|
| 16 |
namespace LearnerProfile |
| 17 |
{ |
| 18 |
class LearningGoal; |
| 19 |
|
| 20 |
class LearnerPrivate |
| 21 |
{ |
| 22 |
public: |
| 23 |
LearnerPrivate() |
| 24 |
: m_name(QString()) |
| 25 |
, m_identifier(-1) |
| 26 |
{ |
| 27 |
} |
| 28 |
~LearnerPrivate() |
| 29 |
{ |
| 30 |
} |
| 31 |
|
| 32 |
QString imagePath() const |
| 33 |
{ |
| 34 |
const QString name = QStringLiteral("learner%1.png").arg(m_identifier); |
| 35 |
return imageDirectory() + name; |
| 36 |
} |
| 37 |
QString imageDirectory() const |
| 38 |
{ |
| 39 |
return QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + QLatin1Char('/') + QStringLiteral("images") + QLatin1Char('/'); |
| 40 |
} |
| 41 |
|
| 42 |
QString m_name; |
| 43 |
int m_identifier; |
| 44 |
QList<LearningGoal *> m_goals; |
| 45 |
QHash<LearningGoal::Category, LearningGoal *> m_activeGoal; |
| 46 |
}; |
| 47 |
} |
| 48 |
|
| 49 |
#endif // LEARNER_P_H |