starting cloud save

This commit is contained in:
Aurélie Delhaie
2022-01-09 21:21:18 +01:00
parent c49966b47c
commit ffebb3c7d7
26 changed files with 983 additions and 213 deletions

45
sources/models/day.h Normal file
View 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