blob: f4eabbdaaac895af7f1ad6e70e95d55f16a3d636 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef DOCUMENT_H
#define DOCUMENT_H
#include <QObject>
#include <QString>
class Document : public QObject
{
Q_OBJECT
Q_PROPERTY(QString text MEMBER m_text NOTIFY textChanged FINAL)
public:
explicit Document(QObject *parent = nullptr) : QObject(parent) {}
void setText(const QString &text);
signals:
void textChanged(const QString &text);
private:
QString m_text;
};
#endif // DOCUMENT_H
|