blob: 46a4d6f7c3e6a3b030d5c1a5a80852babae71d51 (
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
44
45
46
47
48
|
// 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 "modelnode.h"
#include <coreplugin/icore.h>
#include <QWidget>
#include <QDialog>
#include <QListView>
namespace QmlDesigner {
class AnnotationListView;
class AnnotationEditorWidget;
class AnnotationListWidget : public QWidget
{
Q_OBJECT
public:
explicit AnnotationListWidget(ModelNode rootNode, QWidget *parent = nullptr);
~AnnotationListWidget() = default;
void setRootNode(ModelNode rootNode);
void saveAllChanges();
private:
void createUI();
bool validateListSize();
private slots:
void changeAnnotation(const QModelIndex &index);
private:
AnnotationListView *m_listView;
AnnotationEditorWidget *m_editor;
int m_currentItem = -1;
};
}
|