6#include <QtQml/qqmlinfo.h>
53#define DEFINE_ROLE_PROPERTIES(getterGetterName, getterSetterName, getterSignal, setterGetterName, setterSetterName, setterSignal, roleName) \
54QJSValue QQmlTableModelColumn::getterGetterName() const \
56 return mGetters.value(roleName); \
59void QQmlTableModelColumn::getterSetterName(const QJSValue &stringOrFunction) \
61 if (!stringOrFunction.isString() && !stringOrFunction.isCallable()) { \
62 qmlWarning(this).quote() << "getter for " << roleName << " must be a function"; \
65 if (stringOrFunction.strictlyEquals(decoration())) \
68 mGetters[roleName] = stringOrFunction; \
69 emit decorationChanged(); \
72QJSValue QQmlTableModelColumn::setterGetterName() const \
74 return mSetters.value(roleName); \
77void QQmlTableModelColumn::setterSetterName(const QJSValue &function) \
79 if (!function.isCallable()) { \
80 qmlWarning(this).quote() << "setter for " << roleName << " must be a function"; \
84 if (function.strictlyEquals(getSetDisplay())) \
87 mSetters[roleName] = function; \
88 emit setDisplayChanged(); \
125 auto it = mGetters.
find(roleName);
126 if (
it == mGetters.
end())
133 auto it = mSetters.
find(roleName);
134 if (
it == mSetters.
end())
166#include "moc_qqmltablemodelcolumn_p.cpp"
iterator find(const Key &key)
Returns an iterator pointing to the item with the key in the hash.
iterator end() noexcept
Returns an \l{STL-style iterators}{STL-style iterator} pointing to the imaginary item after the last ...
The QJSValue class acts as a container for Qt/JavaScript data types.
~QQmlTableModelColumn() override
QJSValue setterAtRole(const QString &roleName)
static const QHash< int, QString > supportedRoleNames()
QQmlTableModelColumn(QObject *parent=nullptr)
const QHash< QString, QJSValue > getters() const
iterator find(const T &value)
\macro QT_RESTRICTED_CAST_FROM_ASCII
QSet< QString >::iterator it
struct wl_display * display
Combined button and popup list for selecting options.
@ AccessibleDescriptionRole
static const QString decorationRoleName
static const QString checkStateRoleName
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName accessibleTextRoleName setSizeHintChanged
static QT_BEGIN_NAMESPACE const QString displayRoleName
Represents a column in a model.
static const QString fontRoleName
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName accessibleTextRoleName setSizeHint
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName setForegroundChanged
decorationRoleName toolTipRoleName setSetWhatsThis
decorationRoleName setSetToolTip
decorationRoleName toolTipRoleName getSetWhatsThis
static const QString editRoleName
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName accessibleTextRoleName sizeHintChanged
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName setSetAccessibleText
static const QString toolTipRoleName
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName accessibleTextRoleName setSetSizeHint
decorationRoleName toolTipRoleName setWhatsThisChanged
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundChanged
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName setAccessibleTextChanged
static const QString accessibleTextRoleName
decorationRoleName toolTipRoleName whatsThisRoleName setTextAlignmentChanged
decorationRoleName toolTipRoleName whatsThisRoleName setSetTextAlignment
decorationRoleName toolTipChanged
static const QString backgroundRoleName
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
static const QString whatsThisRoleName
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentChanged
static const QString sizeHintRoleName
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName accessibleTextRoleName getSetSizeHint
static const QString foregroundRoleName
decorationRoleName setToolTipChanged
#define DEFINE_ROLE_PROPERTIES(getterGetterName, getterSetterName, getterSignal, setterGetterName, setterSetterName, setterSignal, roleName)
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName setAccessibleText
static const QString accessibleDescriptionRoleName
static const QString statusTipRoleName
static const QString textAlignmentRoleName
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName foregroundRoleName getSetAccessibleText
decorationRoleName toolTipRoleName whatsThisRoleName getSetTextAlignment
decorationRoleName toolTipRoleName whatsThisRoleName textAlignmentRoleName setSetForeground
decorationRoleName setToolTip
QLatin1StringView QLatin1String
#define QStringLiteral(str)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent