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
qqmlabstractdelegatecomponent_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 QQMLABSTRACTDELEGATECOMPONENT_P_H
5#define QQMLABSTRACTDELEGATECOMPONENT_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 <private/qtqmlmodelsglobal_p.h>
19#include <private/qqmlcomponentattached_p.h>
20#include <qqmlcomponent.h>
21
22QT_REQUIRE_CONFIG(qml_delegate_model);
23
25
26// TODO: consider making QQmlAbstractDelegateComponent public API
28class Q_QMLMODELS_EXPORT QQmlAbstractDelegateComponent : public QQmlComponent
29{
31 QML_NAMED_ELEMENT(AbstractDelegateComponent)
33 QML_UNCREATABLE("Cannot create instance of abstract class AbstractDelegateComponent.")
34
35public:
36 QQmlAbstractDelegateComponent(QObject *parent = nullptr);
38
39 virtual QQmlComponent *delegate(QQmlAdaptorModel *adaptorModel, int row, int column = 0) const = 0;
40 virtual QString role() const = 0;
41
44
45protected:
46 QVariant value(QQmlAdaptorModel *adaptorModel,int row, int column, const QString &role) const;
47};
48
50
51#endif // QQMLABSTRACTDELEGATECOMPONENT_P_H
\inmodule QtCore
Definition qobject.h:103
virtual QQmlComponent * delegate(QQmlAdaptorModel *adaptorModel, int row, int column=0) const =0
virtual QString role() const =0
The QQmlComponent class encapsulates a QML component definition.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLenum GLenum GLsizei void GLsizei void * column
GLenum GLenum GLsizei void * row
#define QML_UNCREATABLE(REASON)
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QT_REQUIRE_CONFIG(feature)
#define Q_OBJECT
#define Q_SIGNALS