Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qqmltablemodelcolumn_p.h
Go to the documentation of this file.
1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QQMLTABLEMODELCOLUMN_P_H
5#define QQMLTABLEMODELCOLUMN_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include "qqmlmodelsglobal_p.h"
19
20#include <QtCore/QObject>
21#include <QtCore/QHash>
22#include <QtQml/qqml.h>
23#include <QtQmlModels/private/qtqmlmodelsglobal_p.h>
24#include <QtQml/qjsvalue.h>
25
26QT_REQUIRE_CONFIG(qml_table_model);
27
29
30class Q_LABSQMLMODELS_EXPORT QQmlTableModelColumn : public QObject
31{
33 Q_PROPERTY(QJSValue display READ display WRITE setDisplay NOTIFY displayChanged FINAL)
34 Q_PROPERTY(QJSValue setDisplay READ getSetDisplay WRITE setSetDisplay NOTIFY setDisplayChanged FINAL)
37 Q_PROPERTY(QJSValue edit READ edit WRITE setEdit NOTIFY editChanged FINAL)
38 Q_PROPERTY(QJSValue setEdit READ getSetEdit WRITE setSetEdit NOTIFY setEditChanged FINAL)
39 Q_PROPERTY(QJSValue toolTip READ toolTip WRITE setToolTip NOTIFY toolTipChanged FINAL)
41 Q_PROPERTY(QJSValue statusTip READ statusTip WRITE setStatusTip NOTIFY statusTipChanged FINAL)
42 Q_PROPERTY(QJSValue setStatusTip READ getSetStatusTip WRITE setSetStatusTip NOTIFY setStatusTipChanged FINAL)
43 Q_PROPERTY(QJSValue whatsThis READ whatsThis WRITE setWhatsThis NOTIFY whatsThisChanged FINAL)
45
46 Q_PROPERTY(QJSValue font READ font WRITE setFont NOTIFY fontChanged FINAL)
47 Q_PROPERTY(QJSValue setFont READ getSetFont WRITE setSetFont NOTIFY setFontChanged FINAL)
48 Q_PROPERTY(QJSValue textAlignment READ textAlignment WRITE setTextAlignment NOTIFY textAlignmentChanged FINAL)
50 Q_PROPERTY(QJSValue background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
51 Q_PROPERTY(QJSValue setBackground READ getSetBackground WRITE setSetBackground NOTIFY setBackgroundChanged FINAL)
52 Q_PROPERTY(QJSValue foreground READ foreground WRITE setForeground NOTIFY foregroundChanged FINAL)
54 Q_PROPERTY(QJSValue checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL)
55 Q_PROPERTY(QJSValue setCheckState READ getSetCheckState WRITE setSetCheckState NOTIFY setCheckStateChanged FINAL)
56
57 Q_PROPERTY(QJSValue accessibleText READ accessibleText WRITE setAccessibleText NOTIFY accessibleTextChanged FINAL)
59 Q_PROPERTY(QJSValue accessibleDescription READ accessibleDescription
60 WRITE setAccessibleDescription NOTIFY accessibleDescriptionChanged FINAL)
61 Q_PROPERTY(QJSValue setAccessibleDescription READ getSetAccessibleDescription
62 WRITE setSetAccessibleDescription NOTIFY setAccessibleDescriptionChanged FINAL)
63
64 Q_PROPERTY(QJSValue sizeHint READ sizeHint WRITE setSizeHint NOTIFY sizeHintChanged FINAL)
66 QML_NAMED_ELEMENT(TableModelColumn)
68
69public:
70 QQmlTableModelColumn(QObject *parent = nullptr);
71 ~QQmlTableModelColumn() override;
72
74 void setDisplay(const QJSValue &stringOrFunction);
75 QJSValue getSetDisplay() const;
76 void setSetDisplay(const QJSValue &function);
77
79 void setDecoration(const QJSValue &stringOrFunction);
81 void setSetDecoration(const QJSValue &function);
82
83 QJSValue edit() const;
84 void setEdit(const QJSValue &stringOrFunction);
85 QJSValue getSetEdit() const;
86 void setSetEdit(const QJSValue &function);
87
88 QJSValue toolTip() const;
89 void setToolTip(const QJSValue &stringOrFunction);
91 void setSetToolTip(const QJSValue &function);
92
93 QJSValue statusTip() const;
94 void setStatusTip(const QJSValue &stringOrFunction);
95 QJSValue getSetStatusTip() const;
96 void setSetStatusTip(const QJSValue &function);
97
98 QJSValue whatsThis() const;
99 void setWhatsThis(const QJSValue &stringOrFunction);
101 void setSetWhatsThis(const QJSValue &function);
102
103 QJSValue font() const;
104 void setFont(const QJSValue &stringOrFunction);
105 QJSValue getSetFont() const;
106 void setSetFont(const QJSValue &function);
107
108 QJSValue textAlignment() const;
109 void setTextAlignment(const QJSValue &stringOrFunction);
111 void setSetTextAlignment(const QJSValue &function);
112
113 QJSValue background() const;
114 void setBackground(const QJSValue &stringOrFunction);
115 QJSValue getSetBackground() const;
116 void setSetBackground(const QJSValue &function);
117
118 QJSValue foreground() const;
119 void setForeground(const QJSValue &stringOrFunction);
121 void setSetForeground(const QJSValue &function);
122
124 void setCheckState(const QJSValue &stringOrFunction);
125 QJSValue getSetCheckState() const;
126 void setSetCheckState(const QJSValue &function);
127
128 QJSValue accessibleText() const;
129 void setAccessibleText(const QJSValue &stringOrFunction);
131 void setSetAccessibleText(const QJSValue &function);
132
133 QJSValue accessibleDescription() const;
134 void setAccessibleDescription(const QJSValue &stringOrFunction);
135 QJSValue getSetAccessibleDescription() const;
136 void setSetAccessibleDescription(const QJSValue &function);
137
138 QJSValue sizeHint() const;
139 void setSizeHint(const QJSValue &stringOrFunction);
141 void setSetSizeHint(const QJSValue &function);
142
143 QJSValue getterAtRole(const QString &roleName);
144 QJSValue setterAtRole(const QString &roleName);
145
146 const QHash<QString, QJSValue> getters() const;
147
148 static const QHash<int, QString> supportedRoleNames();
149
151 void indexChanged();
152 void displayChanged();
153 void setDisplayChanged();
156 void editChanged();
157 void setEditChanged();
160 void statusTipChanged();
161 void setStatusTipChanged();
164
165 void fontChanged();
166 void setFontChanged();
169 void backgroundChanged();
170 void setBackgroundChanged();
173 void checkStateChanged();
174 void setCheckStateChanged();
175
178 void accessibleDescriptionChanged();
179 void setAccessibleDescriptionChanged();
182
183private:
184 // We store these in hashes because QQuickTableModel needs string-based lookup in certain situations.
185 QHash<QString, QJSValue> mGetters;
186 QHash<QString, QJSValue> mSetters;
187};
188
190
191#endif // QQMLTABLEMODELCOLUMN_P_H
\inmodule QtCore
Definition qhash.h:820
The QJSValue class acts as a container for Qt/JavaScript data types.
Definition qjsvalue.h:31
\inmodule QtCore
Definition qobject.h:103
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName accessibleTextRoleName setSizeHintChanged
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName accessibleTextRoleName setSizeHint
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName setForegroundChanged
decorationRoleName toolTipRoleName setSetWhatsThis
decorationRoleName setSetToolTip
decorationRoleName toolTipRoleName getSetWhatsThis
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName accessibleTextRoleName sizeHintChanged
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName setSetAccessibleText
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName accessibleTextRoleName setSetSizeHint
decorationRoleName toolTipRoleName setWhatsThisChanged
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundChanged
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName setAccessibleTextChanged
decorationRoleName toolTipRoleName whatsThisRoleName setTextAlignmentChanged
decorationRoleName toolTipRoleName whatsThisRoleName setSetTextAlignment
decorationRoleName toolTipChanged
decorationRoleName toolTipRoleName whatsThisRoleName setTextAlignment
decorationRoleName toolTipRoleName setWhatsThis
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName setForeground
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName accessibleTextChanged
decorationRoleName getSetToolTip
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName getSetForeground
decorationRoleName toolTipRoleName whatsThisChanged
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentChanged
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName accessibleTextRoleName getSetSizeHint
decorationRoleName setToolTipChanged
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName setAccessibleText
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName getSetAccessibleText
decorationRoleName toolTipRoleName whatsThisRoleName getSetTextAlignment
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName setSetForeground
decorationRoleName setToolTip
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS