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
qquickcontainer_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 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 QQUICKCONTAINER_P_P_H
5#define QQUICKCONTAINER_P_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 <QtQuickTemplates2/private/qquickcontainer_p.h>
19#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
20#include <private/qqmlobjectmodel_p.h>
21
23
24class Q_QUICKTEMPLATES2_EXPORT QQuickContainerPrivate : public QQuickControlPrivate
25{
26public:
27 Q_DECLARE_PUBLIC(QQuickContainer)
28
30 {
31 return container->d_func();
32 }
33
34 void init();
35 void cleanup();
36
37 QQuickItem *itemAt(int index) const;
38 void insertItem(int index, QQuickItem *item);
39 void moveItem(int from, int to, QQuickItem *item);
40 void removeItem(int index, QQuickItem *item);
41 void reorderItems();
42
43 void _q_currentIndexChanged();
44
45 void itemChildAdded(QQuickItem *item, QQuickItem *child) override;
46 void itemSiblingOrderChanged(QQuickItem *item) override;
47 void itemParentChanged(QQuickItem *item, QQuickItem *parent) override;
48 void itemDestroyed(QQuickItem *item) override;
49
50 static void contentData_append(QQmlListProperty<QObject> *prop, QObject *obj);
51 static qsizetype contentData_count(QQmlListProperty<QObject> *prop);
52 static QObject *contentData_at(QQmlListProperty<QObject> *prop, qsizetype index);
53 static void contentData_clear(QQmlListProperty<QObject> *prop);
54
55 static void contentChildren_append(QQmlListProperty<QQuickItem> *prop, QQuickItem *obj);
56 static qsizetype contentChildren_count(QQmlListProperty<QQuickItem> *prop);
57 static QQuickItem *contentChildren_at(QQmlListProperty<QQuickItem> *prop, qsizetype index);
58 static void contentChildren_clear(QQmlListProperty<QQuickItem> *prop);
59
60 void updateContentWidth();
61 void updateContentHeight();
62
63 bool hasContentWidth = false;
64 bool hasContentHeight = false;
65 qreal contentWidth = 0;
66 qreal contentHeight = 0;
68 QQmlObjectModel *contentModel = nullptr;
69 qsizetype currentIndex = -1;
70 bool updatingCurrent = false;
71 QQuickItemPrivate::ChangeTypes changeTypes = Destroyed | Parent | SiblingOrder;
72};
73
75
76#endif // QQUICKCONTAINER_P_P_H
\inmodule QtCore
Definition qobject.h:103
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
Combined button and popup list for selecting options.
static QDBusError::ErrorType get(const char *name)
GLuint index
[2]
GLhandleARB obj
[2]
static QQuickItemPrivate::ChangeTypes changeTypes
static QT_BEGIN_NAMESPACE void init(QTextBoundaryFinder::BoundaryType type, QStringView str, QCharAttributes *attributes)
ptrdiff_t qsizetype
Definition qtypes.h:165
double qreal
Definition qtypes.h:187
QGraphicsItem * item
QLayoutItem * child
[0]