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