-
Notifications
You must be signed in to change notification settings - Fork 0
/
paramsmodel.cpp
64 lines (55 loc) · 1.38 KB
/
paramsmodel.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#include "paramsmodel.h"
#include "common.h"
ParamsModel* ParamsModel::instance = nullptr;
ParamsModel* ParamsModel::getInstance() {
if (instance == nullptr) {
instance = new ParamsModel();
}
return instance;
}
ParamsModel::ParamsModel(QObject *parent) : QObject(parent) {
this->setName("...");
this->setPrimary(false);
}
QString ParamsModel::getName() {
return this->name;
}
void ParamsModel::setName(QString name) {
this->name = name;
emit nameChanged(name);
}
bool ParamsModel::getPrimary() {
return this->primary;
}
void ParamsModel::setPrimary(bool primary) {
this->primary = primary;
emit primaryChanged(primary);
}
bool ParamsModel::getPami() {
return this->pami;
}
void ParamsModel::setPami(bool pami) {
this->pami = pami;
emit pamiChanged(pami);
}
QList<TeamAndColor> ParamsModel::getTeams() {
return this->teams;
}
void ParamsModel::setTeams(QList<TeamAndColor> teams) {
this->teams = teams;
emit teamsChanged(teams);
}
QStringList ParamsModel::getStrategies() {
return this->strategies;
}
void ParamsModel::setStrategies(QStringList strategies) {
this->strategies = strategies;
emit strategiesChanged(strategies);
}
QStringList ParamsModel::getOptions() {
return this->options;
}
void ParamsModel::setOptions(QStringList options) {
this->options = options;
emit optionsChanged(options);
}