summaryrefslogtreecommitdiff
path: root/src/plugins/qmldesigner/richtexteditordialog.h
blob: 2e695f331a4d8655ec070dcf6b68f9f3ed6f7506 (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
// Copyright (C) 2021 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0

#ifndef RICHTEXTEDITORDIALOG_H
#define RICHTEXTEDITORDIALOG_H

#include <QDialog>
#include "richtexteditor/richtexteditor.h"
#include "formeditor/formeditoritem.h"

namespace QmlDesigner {


class RichTextEditorDialog : public QDialog {
    Q_OBJECT
public:
    explicit RichTextEditorDialog(const QString text);
    void setFormEditorItem(FormEditorItem* formEditorItem);

signals:
    void textChanged(QString text);
private:
    RichTextEditor* m_editor;
    FormEditorItem* m_formEditorItem;

private slots:
    void onTextChanged(QString text);
    void onFinished();
    void setTextToFormEditorItem(QString text);
};

} // namespace QmlDesigner

#endif // RICHTEXTEDITORDIALOG_H