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
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
23
24QT_BEGIN_NAMESPACE
25
26// TODO: consider making QQmlAbstractDelegateComponent public API
27class QQmlAdaptorModel;
28class Q_QMLMODELS_EXPORT QQmlAbstractDelegateComponent : public QQmlComponent
29{
30 Q_OBJECT
31 QML_NAMED_ELEMENT(AbstractDelegateComponent)
32 QML_ADDED_IN_VERSION(2, 0)
33 QML_UNCREATABLE("Cannot create instance of abstract class AbstractDelegateComponent.")
34
35public:
36 QQmlAbstractDelegateComponent(QObject *parent = nullptr);
37 ~QQmlAbstractDelegateComponent() override;
38
39 virtual QQmlComponent *delegate(QQmlAdaptorModel *adaptorModel, int row, int column = 0) const = 0;
40 virtual QString role() const = 0;
41
42Q_SIGNALS:
43 void delegateChanged();
44
45protected:
46 QVariant value(QQmlAdaptorModel *adaptorModel,int row, int column, const QString &role) const;
47};
48
49QT_END_NAMESPACE
50
51#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,...
Combined button and popup list for selecting options.
QT_REQUIRE_CONFIG(itemmodel)
QT_BEGIN_NAMESPACE const char * kModelItemTag
QT_REQUIRE_CONFIG(qml_table_model)