• Skip to content
  • Skip to link menu
KDE API Documentation - ActivityInfo.h Source File (GCompris-qt)
  • KDE Home
  • Contact Us
 

GCompris-qt

  • src
  • core
ActivityInfo.h
1 /* GCompris - ActivityInfo.h
2  *
3  * Copyright (C) 2014 Bruno Coudoin <bruno.coudoin@gcompris.net>
4  *
5  * Authors:
6  * Bruno Coudoin <bruno.coudoin@gcompris.net>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 3 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, see <http://www.gnu.org/licenses/>.
20  */
21 #ifndef ACTIVITYINFO_H
22 #define ACTIVITYINFO_H
23 
24 #include <qqml.h>
25 
37 class ActivityInfo : public QObject
38 {
39  Q_OBJECT
40 
46  Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
47 
48 
56  Q_PROPERTY(QString section READ section WRITE setSection NOTIFY sectionChanged)
57 
63  Q_PROPERTY(int difficulty READ difficulty WRITE setDifficulty NOTIFY difficultyChanged)
64 
70  Q_PROPERTY(QString icon READ icon WRITE setIcon NOTIFY iconChanged)
71 
75  Q_PROPERTY(QString author READ author WRITE setAuthor NOTIFY authorChanged)
76 
80  Q_PROPERTY(bool demo READ demo WRITE setDemo NOTIFY demoChanged)
81 
85  Q_PROPERTY(QString title READ title WRITE setTitle NOTIFY titleChanged)
86 
90  Q_PROPERTY(QString description READ description WRITE setDescription NOTIFY descriptionChanged)
91 
95  Q_PROPERTY(QString goal READ goal WRITE setGoal NOTIFY goalChanged)
96 
100  Q_PROPERTY(QString prerequisite READ prerequisite WRITE setPrerequisite NOTIFY prerequisiteChanged)
101 
105  Q_PROPERTY(QString manual READ manual WRITE setManual NOTIFY manualChanged)
106 
110  Q_PROPERTY(QString credit READ credit WRITE setCredit NOTIFY creditChanged)
111 
112  Q_PROPERTY(bool favorite READ favorite WRITE setFavorite NOTIFY favoriteChanged)
113 
117  Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
118 
119 public:
121  explicit ActivityInfo(QObject *parent = 0);
122 
123  QString name() const;
124  void setName(const QString &);
125  QString section() const;
126  void setSection(const QString &);
127  int difficulty() const;
128  void setDifficulty(const int &);
129  QString icon() const;
130  void setIcon(const QString &);
131  QString author() const;
132  void setAuthor(const QString &);
133  bool demo() const;
134  void setDemo(const bool &);
135  QString title() const;
136  void setTitle(const QString &);
137  QString description() const;
138  void setDescription(const QString &);
139  QString goal() const;
140  void setGoal(const QString &);
141  QString prerequisite() const;
142  void setPrerequisite(const QString &);
143  QString manual() const;
144  void setManual(const QString &);
145  QString credit() const;
146  void setCredit(const QString &);
147  bool favorite() const;
148  void setFavorite(const bool);
149  bool enabled() const;
150  void setEnabled(const bool);
151 
152  QStringList getSectionPath();
153 
154 signals:
155  void nameChanged();
156  void typeChanged();
157  void sectionChanged();
158  void difficultyChanged();
159  void iconChanged();
160  void authorChanged();
161  void demoChanged();
162  void titleChanged();
163  void descriptionChanged();
164  void goalChanged();
165  void prerequisiteChanged();
166  void manualChanged();
167  void creditChanged();
168  void favoriteChanged();
169  void enabledChanged();
170 
172 private:
173  QString m_name;
174  QString m_type;
175  QString m_section;
176  int m_difficulty;
177  QString m_icon;
178  QString m_author;
179  bool m_demo;
180  QString m_title;
181  QString m_description;
182  QString m_goal;
183  QString m_prerequisite;
184  QString m_manual;
185  QString m_credit;
186  bool m_favorite;
187  bool m_enabled;
188 };
189 
190 #endif // ACTIVITYINFO_H
ActivityInfo
A QML component holding meta information about an activity.
Definition: ActivityInfo.h:37
ActivityInfo::icon
QString icon
Relative path to the icon of the activity.
Definition: ActivityInfo.h:70
ActivityInfo::title
QString title
Title of the activity.
Definition: ActivityInfo.h:85
ActivityInfo::demo
bool demo
Whether the activity is part of the demo version of GCompris.
Definition: ActivityInfo.h:80
ActivityInfo::section
QString section
Section(s) this activity belongs to.
Definition: ActivityInfo.h:56
ActivityInfo::credit
QString credit
Credits to third parties.
Definition: ActivityInfo.h:110
ActivityInfo::goal
QString goal
Goal that this activity wants to achieve.
Definition: ActivityInfo.h:95
ActivityInfo::name
QString name
Name of the main activity QML file.
Definition: ActivityInfo.h:46
ActivityInfo::description
QString description
Description of the activity.
Definition: ActivityInfo.h:90
ActivityInfo::difficulty
int difficulty
Difficulty of the activity.
Definition: ActivityInfo.h:63
ActivityInfo::enabled
bool enabled
This activity is enabled.
Definition: ActivityInfo.h:117
ActivityInfo::author
QString author
Author of the activity.
Definition: ActivityInfo.h:75
ActivityInfo::prerequisite
QString prerequisite
Prerequisite for using this activity.
Definition: ActivityInfo.h:100
ActivityInfo::manual
QString manual
Manual describing the activity's usage.
Definition: ActivityInfo.h:105
This file is part of the KDE documentation.
Documentation copyright © 1996-2015 The KDE developers.
Generated on Tue Jun 2 2015 21:47:47 by doxygen 1.8.9.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

GCompris-qt

Skip menu "GCompris-qt"
  • Main Page
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • File List
  • Modules

Class Picker

Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal