blob: e3d1f9da30efa584047d13d09d30e64da521b343 [file] [log] [blame]
swissChili4b3105a2022-02-22 16:34:39 -08001#pragma once
2
3#include <QObject>
4#include <qqml.h>
5
6class Cell : public QObject
7{
8 Q_OBJECT
9 QML_ELEMENT
10
11 Q_PROPERTY(QString code READ code WRITE setCode NOTIFY codeChanged)
12 Q_PROPERTY(QString result READ result WRITE setResult NOTIFY resultChanged)
13
14public:
15 explicit Cell(QObject *parent = nullptr);
16 Cell(const Cell &copy, QObject *parent = nullptr);
17 Cell(QString code, QString result, QObject *parent = nullptr);
18
19 Cell &operator =(const Cell &copy);
20
21 QString code() const;
22 QString result() const;
23
24 void setCode(QString code);
25 void setResult(QString result);
26
27signals:
28 void codeChanged(QString code);
29 void resultChanged(QString result);
30
31private:
32 QString _code, _result;
33};
34
35Q_DECLARE_METATYPE(Cell)