Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
treewidgeteditor.h
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3// Qt-Security score:significant reason:default
4
5#ifndef TREEWIDGETEDITOR_H
6#define TREEWIDGETEDITOR_H
7
8#include "ui_treewidgeteditor.h"
9
11
12#include <QtWidgets/qdialog.h>
13
15
16class QTreeWidget;
17class QDesignerFormWindowInterface;
18
19namespace qdesigner_internal {
20
21class FormWindowBase;
22class PropertySheetIconValue;
23
25{
27public:
29
30 TreeWidgetContents fillContentsFromTreeWidget(QTreeWidget *treeWidget);
32
33private slots:
35 void newSubItemButtonClicked();
36 void deleteItemButtonClicked();
37 void moveItemUpButtonClicked();
38 void moveItemDownButtonClicked();
39 void moveItemRightButtonClicked();
40 void moveItemLeftButtonClicked();
41
42 void treeWidgetCurrentItemChanged();
43 void treeWidgetItemChanged(QTreeWidgetItem *item, int column);
44
45 void columnEditorIndexChanged(int idx);
46 void columnEditorItemChanged(int idx, int role, const QVariant &v);
47
48 void columnEditorItemInserted(int idx);
49 void columnEditorItemDeleted(int idx);
50 void columnEditorItemMovedUp(int idx);
51 void columnEditorItemMovedDown(int idx);
52
53 void togglePropertyBrowser();
54 void cacheReloaded();
55
56protected:
57 void setItemData(int role, const QVariant &v) override;
58 QVariant getItemData(int role) const override;
59 int defaultItemFlags() const override;
60
61private:
62 void setPropertyBrowserVisible(bool v);
63 QtVariantProperty *setupPropertyGroup(const QString &title, PropertyDefinition *propDefs);
64 void updateEditor();
65 void moveColumnItems(const PropertyDefinition *propList, QTreeWidgetItem *item, int fromColumn, int toColumn, int step);
66 void moveColumns(int fromColumn, int toColumn, int step);
67 void moveColumnsLeft(int fromColumn, int toColumn);
68 void moveColumnsRight(int fromColumn, int toColumn);
69 void closeEditors();
70
71 Ui::TreeWidgetEditor ui;
72 ItemListEditor *m_columnEditor;
73 bool m_updatingBrowser;
74};
75
77{
79public:
81
82 TreeWidgetContents fillContentsFromTreeWidget(QTreeWidget *treeWidget);
84
85private:
86 TreeWidgetEditor m_editor;
87};
88
89} // namespace qdesigner_internal
90
91QT_END_NAMESPACE
92
93#endif // TREEWIDGETEDITOR_H
The QtVariantProperty class is a convenience class handling QVariant based properties.
TreeWidgetContents fillContentsFromTreeWidget(QTreeWidget *treeWidget)
TreeWidgetContents fillContentsFromTreeWidget(QTreeWidget *treeWidget)
void setItemData(int role, const QVariant &v) override
QVariant getItemData(int role) const override
QAction * preferredEditAction() const override
QList< QAction * > taskActions() const override
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.