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
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
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
27
29
31{
32 Q_OBJECT
33 Q_PROPERTY(QJSValue display READ display WRITE setDisplay NOTIFY displayChanged FINAL)
34 Q_PROPERTY(QJSValue decoration READ decoration WRITE setDecoration NOTIFY decorationChanged FINAL)
35 Q_PROPERTY(QJSValue edit READ edit WRITE setEdit NOTIFY editChanged FINAL)
36 Q_PROPERTY(QJSValue toolTip READ toolTip WRITE setToolTip NOTIFY toolTipChanged FINAL)
37 Q_PROPERTY(QJSValue statusTip READ statusTip WRITE setStatusTip NOTIFY statusTipChanged FINAL)
38 Q_PROPERTY(QJSValue whatsThis READ whatsThis WRITE setWhatsThis NOTIFY whatsThisChanged FINAL)
39
40 Q_PROPERTY(QJSValue font READ font WRITE setFont NOTIFY fontChanged FINAL)
41 Q_PROPERTY(QJSValue textAlignment READ textAlignment WRITE setTextAlignment NOTIFY textAlignmentChanged FINAL)
42 Q_PROPERTY(QJSValue background READ background WRITE setBackground NOTIFY backgroundChanged FINAL)
43 Q_PROPERTY(QJSValue foreground READ foreground WRITE setForeground NOTIFY foregroundChanged FINAL)
44 Q_PROPERTY(QJSValue checkState READ checkState WRITE setCheckState NOTIFY checkStateChanged FINAL)
45
46 Q_PROPERTY(QJSValue accessibleText READ accessibleText WRITE setAccessibleText NOTIFY accessibleTextChanged FINAL)
47 Q_PROPERTY(QJSValue accessibleDescription READ accessibleDescription
48 WRITE setAccessibleDescription NOTIFY accessibleDescriptionChanged FINAL)
49
50 Q_PROPERTY(QJSValue sizeHint READ sizeHint WRITE setSizeHint NOTIFY sizeHintChanged FINAL)
51 QML_NAMED_ELEMENT(TableModelColumn)
52 QML_ADDED_IN_VERSION(1, 0)
53
54public:
55 QQmlTableModelColumn(QObject *parent = nullptr);
56 ~QQmlTableModelColumn() override;
57
58 QJSValue display() const;
59 void setDisplay(const QJSValue &stringOrFunction);
60
61 QJSValue decoration() const;
62 void setDecoration(const QJSValue &stringOrFunction);
63
64 QJSValue edit() const;
65 void setEdit(const QJSValue &stringOrFunction);
66
67 QJSValue toolTip() const;
68 void setToolTip(const QJSValue &stringOrFunction);
69
70 QJSValue statusTip() const;
71 void setStatusTip(const QJSValue &stringOrFunction);
72
73 QJSValue whatsThis() const;
74 void setWhatsThis(const QJSValue &stringOrFunction);
75
76 QJSValue font() const;
77 void setFont(const QJSValue &stringOrFunction);
78
79 QJSValue textAlignment() const;
80 void setTextAlignment(const QJSValue &stringOrFunction);
81
82 QJSValue background() const;
83 void setBackground(const QJSValue &stringOrFunction);
84
85 QJSValue foreground() const;
86 void setForeground(const QJSValue &stringOrFunction);
87
88 QJSValue checkState() const;
89 void setCheckState(const QJSValue &stringOrFunction);
90
91 QJSValue accessibleText() const;
92 void setAccessibleText(const QJSValue &stringOrFunction);
93
94 QJSValue accessibleDescription() const;
95 void setAccessibleDescription(const QJSValue &stringOrFunction);
96
97 QJSValue sizeHint() const;
98 void setSizeHint(const QJSValue &stringOrFunction);
99
100 QJSValue getterAtRole(const QString &roleName);
101
102 const QHash<QString, QJSValue> getters() const;
103
104 static const QHash<int, QString> supportedRoleNames();
105
106Q_SIGNALS:
107 void indexChanged();
108 void displayChanged();
109 void decorationChanged();
110 void editChanged();
111 void toolTipChanged();
112 void statusTipChanged();
113 void whatsThisChanged();
114
115 void fontChanged();
116 void textAlignmentChanged();
117 void backgroundChanged();
118 void foregroundChanged();
119 void checkStateChanged();
120
121 void accessibleTextChanged();
122 void accessibleDescriptionChanged();
123 void sizeHintChanged();
124
125private:
126 // We store these in a hash because QQuickTableModel needs string-based lookup in certain situations.
127 QHash<QString, QJSValue> mGetters;
128};
129
130QT_END_NAMESPACE
131
132#endif // QQMLTABLEMODELCOLUMN_P_H
Q_STATIC_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core")
QT_REQUIRE_CONFIG(qml_table_model)