blob: 86b0b2a5aea86033b684960089dfbe5d0367641a (
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
// Copyright (C) 2020 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include <QObject>
#include <QQuickItem>
QT_BEGIN_NAMESPACE
class QDialog;
QT_END_NAMESPACE
namespace QmlDesigner {
class RichTextEditor;
class RichTextEditorProxy : public QObject
{
Q_OBJECT
Q_PROPERTY(QString richText READ richText WRITE setRichText)
public:
explicit RichTextEditorProxy(QObject *parent = nullptr);
~RichTextEditorProxy();
static void registerDeclarativeType();
Q_INVOKABLE void showWidget();
Q_INVOKABLE void hideWidget();
QString richText() const;
void setRichText(const QString &text);
signals:
void accepted();
void rejected();
private:
QDialog *m_dialog;
RichTextEditor *m_widget;
};
} // namespace QmlDesigner
|