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