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
tablewidgeteditor.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 TABLEWIDGETEDITOR_H
6#define TABLEWIDGETEDITOR_H
7
8#include "ui_tablewidgeteditor.h"
9
11
12#include <QtWidgets/qdialog.h>
13
15
16class QTableWidget;
17class QDesignerFormWindowInterface;
18
19namespace qdesigner_internal {
20
21class FormWindowBase;
22class PropertySheetIconValue;
23
25{
27public:
29
30 TableWidgetContents fillContentsFromTableWidget(QTableWidget *tableWidget);
32
33private slots:
34
36 void tableWidgetItemChanged(QTableWidgetItem *item);
37
38 void columnEditorIndexChanged(int idx);
39 void columnEditorItemChanged(int idx, int role, const QVariant &v);
40
41 void columnEditorItemInserted(int idx);
42 void columnEditorItemDeleted(int idx);
43 void columnEditorItemMovedUp(int idx);
44 void columnEditorItemMovedDown(int idx);
45
46 void rowEditorIndexChanged(int idx);
47 void rowEditorItemChanged(int idx, int role, const QVariant &v);
48
49 void rowEditorItemInserted(int idx);
50 void rowEditorItemDeleted(int idx);
51 void rowEditorItemMovedUp(int idx);
52 void rowEditorItemMovedDown(int idx);
53
54 void togglePropertyBrowser();
55
56 void cacheReloaded();
57
58protected:
59 void setItemData(int role, const QVariant &v) override;
60 QVariant getItemData(int role) const override;
61 int defaultItemFlags() const override;
62
63private:
64 void setPropertyBrowserVisible(bool v);
65 void updateEditor();
66 void moveColumnsLeft(int fromColumn, int toColumn);
67 void moveColumnsRight(int fromColumn, int toColumn);
68 void moveRowsUp(int fromRow, int toRow);
69 void moveRowsDown(int fromRow, int toRow);
70
71 Ui::TableWidgetEditor ui;
72 ItemListEditor *m_rowEditor;
73 ItemListEditor *m_columnEditor;
74 bool m_updatingBrowser;
75};
76
78{
80public:
82
83 TableWidgetContents fillContentsFromTableWidget(QTableWidget *tableWidget);
85
86private:
87 TableWidgetEditor m_editor;
88};
89
90} // namespace qdesigner_internal
91
92QT_END_NAMESPACE
93
94#endif // TABLEWIDGETEDITOR_H
TableWidgetContents fillContentsFromTableWidget(QTableWidget *tableWidget)
TableWidgetContents fillContentsFromTableWidget(QTableWidget *tableWidget)
void setItemData(int role, const QVariant &v) override
QVariant getItemData(int role) const override
QList< QAction * > taskActions() const override
Combined button and popup list for selecting options.
Auxiliary methods to store/retrieve settings.