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
4#ifndef TABLEWIDGETEDITOR_H
5#define TABLEWIDGETEDITOR_H
6
7#include "ui_tablewidgeteditor.h"
8
10
11#include <QtWidgets/qdialog.h>
12
14
15class QTableWidget;
16class QDesignerFormWindowInterface;
17
18namespace qdesigner_internal {
19
20class FormWindowBase;
21class PropertySheetIconValue;
22
24{
26public:
28
29 TableWidgetContents fillContentsFromTableWidget(QTableWidget *tableWidget);
31
32private slots:
33
35 void tableWidgetItemChanged(QTableWidgetItem *item);
36
37 void columnEditorIndexChanged(int idx);
38 void columnEditorItemChanged(int idx, int role, const QVariant &v);
39
40 void columnEditorItemInserted(int idx);
41 void columnEditorItemDeleted(int idx);
42 void columnEditorItemMovedUp(int idx);
43 void columnEditorItemMovedDown(int idx);
44
45 void rowEditorIndexChanged(int idx);
46 void rowEditorItemChanged(int idx, int role, const QVariant &v);
47
48 void rowEditorItemInserted(int idx);
49 void rowEditorItemDeleted(int idx);
50 void rowEditorItemMovedUp(int idx);
51 void rowEditorItemMovedDown(int idx);
52
53 void togglePropertyBrowser();
54
55 void cacheReloaded();
56
57protected:
58 void setItemData(int role, const QVariant &v) override;
59 QVariant getItemData(int role) const override;
60 int defaultItemFlags() const override;
61
62private:
63 void setPropertyBrowserVisible(bool v);
64 void updateEditor();
65 void moveColumnsLeft(int fromColumn, int toColumn);
66 void moveColumnsRight(int fromColumn, int toColumn);
67 void moveRowsUp(int fromRow, int toRow);
68 void moveRowsDown(int fromRow, int toRow);
69
70 Ui::TableWidgetEditor ui;
71 ItemListEditor *m_rowEditor;
72 ItemListEditor *m_columnEditor;
73 bool m_updatingBrowser;
74};
75
77{
79public:
81
82 TableWidgetContents fillContentsFromTableWidget(QTableWidget *tableWidget);
84
85private:
86 TableWidgetEditor m_editor;
87};
88
89} // namespace qdesigner_internal
90
91QT_END_NAMESPACE
92
93#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.