From b8762ddb38dd975b0acb217b793594dfed83a824 Mon Sep 17 00:00:00 2001 From: link2xt Date: Sat, 12 Sep 2020 14:10:13 +0300 Subject: Initial commit --- lot.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 lot.h (limited to 'lot.h') diff --git a/lot.h b/lot.h new file mode 100644 index 0000000..3170d85 --- /dev/null +++ b/lot.h @@ -0,0 +1,30 @@ +#pragma once + +#include + +#include + +class DcLot : public QObject { + Q_OBJECT + + Q_PROPERTY(QString text1 READ getText1 CONSTANT); + Q_PROPERTY(QString text2 READ getText2 CONSTANT); + Q_PROPERTY(int text1Meaning READ getText1Meaning CONSTANT); + Q_PROPERTY(int state READ getState CONSTANT); + Q_PROPERTY(uint32_t id READ getId CONSTANT); + Q_PROPERTY(int64_t timestamp READ getTimestamp CONSTANT); + + dc_lot_t *m_lot{nullptr}; + +public: + explicit DcLot(QObject *parent = nullptr); + explicit DcLot(dc_lot_t *lot); + ~DcLot(); + + Q_INVOKABLE QString getText1() const; + Q_INVOKABLE QString getText2() const; + Q_INVOKABLE int getText1Meaning() const; + Q_INVOKABLE int getState() const; + Q_INVOKABLE uint32_t getId() const; + Q_INVOKABLE int64_t getTimestamp() const; +}; -- cgit v1.2.3-70-g09d2