BoxingSettings Class Reference

Handle settings about timer. Can save, load and delete a specific preset. More...

`#include <boxingsettings.h>`

Inheritance diagram for BoxingSettings:

## Signals

void | presetChanged ()

## Public Member Functions

Q_INVOKABLE const QStringList | presetsList ()
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. More...
Q_INVOKABLE void | deletePreset (const QString &name)
| Delete a specified preset. More...
Q_INVOKABLE int | getInnerTimer (const int &index)
| getInnerTimer(const int &index) More...
| BoxingSettings ()
| BoxingSettings (const int &rounds, const int &roundMilliseconds, const int &restMilliseconds)
int | getRounds ()
int | getRoundMilliseconds ()
int | getRestMilliseconds ()
QList< int > | getInnerTimers ()
| gerInnerTimers() More...
QString | getPreset ()
QString | getPresetName ()
void | setRounds (const int &rounds)
| Setter for number of rounds. More...
void | setRoundMilliseconds (const int &roundMilliseconds)
| Setter for duration of round (in milliseconds) More...
void | setRestMilliseconds (const int &restMilliseconds)
| Setter for milliseconds of rest. More...
void | setPreset (const QString &preset)
| Setter for preset. More...

## Detailed Description

Handle settings about timer. Can save, load and delete a specific preset.

QML Part of view

## Constructor & Destructor Documentation

## BoxingSettings() [1/2]

BoxingSettings::BoxingSettings | ( |  | ) |

## BoxingSettings() [2/2]

BoxingSettings::BoxingSettings | ( | const int & | rounds,
|  | const int & | roundMilliseconds,
|  | const int & | restMilliseconds
| ) |  |

## Member Function Documentation

## deletePreset()

void BoxingSettings::deletePreset | ( | const QString & | name | ) |

Delete a specified preset.

Parameters

  name | string name of preset

Author
  Claudio Maradonna claud.nosp@m.io@u.nosp@m.nitoo.nosp@m..pw

## getInnerTimer()

int BoxingSettings::getInnerTimer | ( | const int & | index | ) |

getInnerTimer(const int &index)

Returns
  the specific timer in milliseconds

## getInnerTimers()

QList<int> BoxingSettings::getInnerTimers | ( |  | ) |

inline

gerInnerTimers()

Returns
  the list of inner timers

## getPreset()

QString BoxingSettings::getPreset | ( |  | ) |

inline

Returns
  the loaded preset

## getPresetName()

QString BoxingSettings::getPresetName | ( |  | ) |

inline

Returns
  the human readable name of preset

## getRestMilliseconds()

int BoxingSettings::getRestMilliseconds | ( |  | ) |

inline

Returns
  milliseconds of rest

## getRoundMilliseconds()

int BoxingSettings::getRoundMilliseconds | ( |  | ) |

inline

Returns
  duration in milliseconds of a rounds

## getRounds()

int BoxingSettings::getRounds | ( |  | ) |

inline

Returns
  number of rounds

## presetChanged

void BoxingSettings::presetChanged | ( |  | ) |

signal

## presetsList()

const QStringList BoxingSettings::presetsList | ( |  | ) |

Author
  Claudio Maradonna claud.nosp@m.io@u.nosp@m.nitoo.nosp@m..pw

Returns
  a list with available (probably saved) presets

## savePreset()

void BoxingSettings::savePreset | ( | const QString & | name,
|  | const int & | rounds,
|  | const int & | roundMilliseconds,
|  | const int & | restMilliseconds,
|  | const QList< int > & | innerTimers
| ) |  |

Save or override settings about specific preset.

Parameters

  name | string name of preset
  rounds | int number of rounds
  roundMilliseconds | int duration of round
  restMilliseconds | int duration of rest

Author
  Claudio Maradonna claud.nosp@m.io@u.nosp@m.nitoo.nosp@m..pw

## setPreset()

void BoxingSettings::setPreset | ( | const QString & | preset | ) |

Setter for preset.

Parameters

  preset | QString

## setRestMilliseconds()

void BoxingSettings::setRestMilliseconds | ( | const int & | restMilliseconds | ) |

inline

Setter for milliseconds of rest.

Parameters

  restMilliseconds | int

## setRoundMilliseconds()

void BoxingSettings::setRoundMilliseconds | ( | const int & | roundMilliseconds | ) |

inline

Setter for duration of round (in milliseconds)

Parameters

  roundMilliseconds | int

## setRounds()

void BoxingSettings::setRounds | ( | const int & | rounds | ) |

inline

Setter for number of rounds.

Parameters

  rounds | int

The documentation for this class was generated from the following files:

- src/boxingsettings.h
- src/boxingsettings.cpp