1 #ifndef BOXINGSETTINGS_H 2 #define BOXINGSETTINGS_H 25 Q_PROPERTY(QString presetName READ
getPresetName NOTIFY presetChanged)
29 Q_PROPERTY(QList<int> innerTimers READ
getInnerTimers NOTIFY presetChanged)
36 const int DefaultRounds = 12;
42 const int DefaultRoundMilliseconds = 3 * 60 * 1000;
47 const int DefaultRestMilliseconds = 60 * 1000;
53 const QString DefaultPreset =
"";
59 const QString DefaultPresetName =
"Default";
83 Q_INVOKABLE
void savePreset(
const QString &name,
const int &rounds,
const int &roundMilliseconds,
const int &restMilliseconds,
const QList<int> &innerTimers);
104 BoxingSettings(
const int &rounds,
const int &roundMilliseconds,
const int &restMilliseconds);
154 inline void setRounds(
const int &rounds) { mRounds = rounds; }
182 int mRoundMilliseconds;
183 int mRestMilliseconds;
185 QList<int> mInnerTimers;
202 void setDefaultPreset();
210 inline const QString convertRichNameToGroup(
const QString &richName) {
return richName.toLower().simplified().replace(
" ",
""); }
216 #endif // BOXINGSETTINGS_H void setRestMilliseconds(const int &restMilliseconds)
Setter for milliseconds of rest.
Definition: boxingsettings.h:170
void setPreset(const QString &preset)
Setter for preset.
Definition: boxingsettings.cpp:26
QString getPreset()
Definition: boxingsettings.h:139
Q_INVOKABLE const QStringList presetsList()
Definition: boxingsettings.cpp:90
QList< int > getInnerTimers()
gerInnerTimers()
Definition: boxingsettings.h:132
void setRounds(const int &rounds)
Setter for number of rounds.
Definition: boxingsettings.h:154
int getRestMilliseconds()
Definition: boxingsettings.h:125
int getRoundMilliseconds()
Definition: boxingsettings.h:118
Q_INVOKABLE void deletePreset(const QString &name)
Delete a specified preset.
Definition: boxingsettings.cpp:78
QString getPresetName()
Definition: boxingsettings.h:146
Q_INVOKABLE int getInnerTimer(const int &index)
getInnerTimer(const int &index)
Definition: boxingsettings.cpp:100
Q_INVOKABLE void savePreset(const QString &name, const int &rounds, const int &roundMilliseconds, const int &restMilliseconds, const QList< int > &innerTimers)
Save or override settings about specific preset.
Definition: boxingsettings.cpp:64
BoxingSettings()
Definition: boxingsettings.cpp:6
int getRounds()
Definition: boxingsettings.h:111
Handle settings about timer. Can save, load and delete a specific preset.
Definition: boxingsettings.h:20
void setRoundMilliseconds(const int &roundMilliseconds)
Setter for duration of round (in milliseconds)
Definition: boxingsettings.h:162