Open-Typer
Open source typewriting tutor program
Loading...
Searching...
No Matches
IClassManager.h
1/*
2 * IClassManager.h
3 * This file is part of Open-Typer
4 *
5 * Copyright (C) 2023 - adazem009
6 *
7 * Open-Typer is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * Open-Typer is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with Open-Typer. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef ICLASSMANAGER_H
22#define ICLASSMANAGER_H
23
24#include <QObject>
25#include <QQmlListProperty>
26#include "global/modularity/ioc.h"
27#include "internal/Class.h"
28
29class IClassManager : public QObject, MODULE_EXPORT_INTERFACE
30{
31 Q_OBJECT
32 public:
33 virtual ~IClassManager() { }
34
35 enum GradingMethod
36 {
37 GradingMethod_Numbers = 0,
38 GradingMethod_Letters = 1
39 };
40 Q_ENUM(GradingMethod)
41
42 virtual QQmlListProperty<Class> classes(void) = 0;
43 virtual void setClasses(QList<Class *> newClasses) = 0;
44
45 virtual QStringList classNames(void) = 0;
46
47 virtual void createNewClass(void) = 0;
48 virtual void removeClass(Class *classPtr) = 0;
49 virtual int targetHitsPerMinute(void) = 0;
50 virtual int targetHitsPerMinute(int selectedClass) = 0;
51
52 signals:
53 void classesChanged();
54 void classNamesChanged();
55};
56
57#endif // ICLASSMANAGER_H
The Class class encapsulates a class in grading configuration.
Definition Class.h:33
Definition IClassManager.h:30