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
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// Qt-Security score:significant
4
5#ifndef QQMLABSTRACTDELEGATECOMPONENT_P_H
6#define QQMLABSTRACTDELEGATECOMPONENT_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qtqmlmodelsglobal_p.h>
20#include <private/qqmlcomponentattached_p.h>
21#include <qqmlcomponent.h>
22
24
25QT_BEGIN_NAMESPACE
26
27// TODO: consider making QQmlAbstractDelegateComponent public API
28class QQmlAdaptorModel;
29class Q_QMLMODELS_EXPORT QQmlAbstractDelegateComponent : public QQmlComponent
30{
31 Q_OBJECT
32 QML_NAMED_ELEMENT(AbstractDelegateComponent)
33 QML_ADDED_IN_VERSION(2, 0)
34 QML_UNCREATABLE("Cannot create instance of abstract class AbstractDelegateComponent.")
35
36public:
37 QQmlAbstractDelegateComponent(QObject *parent = nullptr);
38 ~QQmlAbstractDelegateComponent() override;
39
40 virtual QQmlComponent *delegate(QQmlAdaptorModel *adaptorModel, int row, int column = 0) const = 0;
41 virtual QString role() const = 0;
42
43Q_SIGNALS:
44 void delegateChanged();
45
46protected:
47 QVariant value(QQmlAdaptorModel *adaptorModel,int row, int column, const QString &role) const;
48};
49
50QT_END_NAMESPACE
51
52#endif // QQMLABSTRACTDELEGATECOMPONENT_P_H
void statusChanged(Status status) override
Called when the status of the incubator changes.
QQmlTableInstanceModelIncubationTask(QQmlTableInstanceModel *tableInstanceModel, QQmlDelegateModelItem *modelItemToIncubate, IncubationMode mode)
void setInitialState(QObject *object) override
Called after the object is first created, but before complex property bindings are evaluated and,...
QT_BEGIN_NAMESPACE const char * kModelItemTag
QT_REQUIRE_CONFIG(qml_table_model)
QT_REQUIRE_CONFIG(thread)