Corrently add, edit and list journey details
[harbour-pedalo.git] / src / status.h
1 #ifndef STATUS_H
2 #define STATUS_H
3
4 #include <QObject>
5
6 class Status : public QObject
7 {
8 Q_OBJECT
9 public:
10 explicit Status(QObject *parent = nullptr);
11 Q_PROPERTY(bool cycling READ getCycling WRITE setCycling NOTIFY cyclingChanged)
12 Q_PROPERTY(quint64 startTime READ getStartTime WRITE setStartTime NOTIFY startTimeChanged)
13
14 bool getCycling() const;
15 quint64 getStartTime() const;
16 Q_INVOKABLE void startJourney();
17 Q_INVOKABLE quint64 getDuration() const;
18
19 signals:
20 void cyclingChanged(bool cycling);
21 void startTimeChanged(quint64 startTime);
22
23 public slots:
24 void setCycling(bool value);
25 void setStartTime(quint64 value);
26
27 private:
28 bool cycling;
29 quint64 startTime;
30 };
31
32 #endif // STATUS_H