aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/qmldesigner/components/annotationeditor/globalannotationeditor.h
blob: 28cc092cb98261ae8638519eaaadffd2cd65357a (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
// 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

#pragma once

#include "annotation.h"
#include "editorproxy.h"
#include "modelnode.h"

#include <QObject>
#include <QPointer>
#include <QtQml>


namespace QmlDesigner {

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

    QWidget *createWidget() override;

    Q_INVOKABLE void removeFullAnnotation();

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

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

private:
    void applyChanges();
};

} //namespace QmlDesigner