aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/annotationeditor/annotationeditor.h
blob: 5fc5fa8e08f2436c5955347f1d276260c0cf853e (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
// 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 <QtQml>

#include "editorproxy.h"

namespace QmlDesigner {

class AnnotationEditor : public ModelNodeEditorProxy
{
    Q_OBJECT
public:
    explicit AnnotationEditor(QObject *parent = nullptr);
    ~AnnotationEditor() = default;

    QWidget *createWidget() override;
    Q_INVOKABLE void removeFullAnnotation();

    static void registerDeclarativeType();

signals:
    void accepted();
    void canceled();
    void applied();

private slots:
    void acceptedClicked();
    void cancelClicked();
    void appliedClicked();

private:
    void applyChanges();
};

} //namespace QmlDesigner

QML_DECLARE_TYPE(QmlDesigner::AnnotationEditor)