swissChili | 25620b0 | 2022-02-23 17:15:16 -0800 | [diff] [blame^] | 1 | #pragma once |
| 2 | |
| 3 | #include <QObject> |
| 4 | |
| 5 | #include "Cell.h" |
| 6 | |
| 7 | class CellModel; |
| 8 | |
| 9 | class Notebook : public QObject |
| 10 | { |
| 11 | Q_OBJECT |
| 12 | QML_ELEMENT |
| 13 | |
| 14 | Q_PROPERTY(CellModel *cellModel READ cellModel NOTIFY cellModelChanged) |
| 15 | |
| 16 | public: |
| 17 | explicit Notebook(QObject *parent = nullptr); |
| 18 | Notebook(const Notebook &other, QObject *parent = nullptr); |
| 19 | |
| 20 | CellModel *cellModel(); |
| 21 | |
| 22 | signals: |
| 23 | void cellModelChanged(); |
| 24 | |
| 25 | protected: |
| 26 | friend class CellModel; |
| 27 | |
| 28 | QList<Cell> _cells; |
| 29 | CellModel *_cellModel; |
| 30 | }; |
| 31 | |
| 32 | Q_DECLARE_METATYPE(Notebook) |