starting cloud save
This commit is contained in:
45
sources/models/day.h
Normal file
45
sources/models/day.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#ifndef DAY_H
|
||||
#define DAY_H
|
||||
|
||||
#define KEY_START "start"
|
||||
#define KEY_END "end"
|
||||
#define KEY_BREAKS "breaks"
|
||||
#define KEY_VALIDATE "validate"
|
||||
|
||||
#include <QTime>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
#include <math.h>
|
||||
|
||||
#include "breakpoint.h"
|
||||
|
||||
class Day
|
||||
{
|
||||
|
||||
private:
|
||||
QTime start;
|
||||
QTime end;
|
||||
QVector<BreakPoint> breaks;
|
||||
bool validate;
|
||||
|
||||
public:
|
||||
Day();
|
||||
|
||||
void set_start(QTime value);
|
||||
void set_end(QTime value);
|
||||
void set_validate(bool);
|
||||
void setBreaks(QVector<BreakPoint>);
|
||||
|
||||
QTime get_start();
|
||||
QTime get_end();
|
||||
QVector<BreakPoint> getBreaks();
|
||||
bool get_validate();
|
||||
float get_time_break();
|
||||
QJsonObject to_json();
|
||||
|
||||
float get_total();
|
||||
|
||||
static Day from_json(QJsonObject);
|
||||
};
|
||||
|
||||
#endif // DAY_H
|
||||
Reference in New Issue
Block a user