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
qdeclarativegeomapitemview_p.h
Go to the documentation of this file.
1// Copyright (C) 2015 Jolla Ltd.
2// Copyright (C) 2022 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QDECLARATIVEGEOMAPITEMVIEW_H
6#define QDECLARATIVEGEOMAPITEMVIEW_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 <QtLocation/private/qlocationglobal_p.h>
20#include <map>
21#include <QtCore/QModelIndex>
22#include <QtQml/QQmlParserStatus>
23#include <QtQml/QQmlIncubator>
24#include <QtQml/qqml.h>
25#include <private/qqmldelegatemodel_p.h>
26#include <QtQuick/private/qquicktransition_p.h>
27#include <QtLocation/private/qdeclarativegeomapitemgroup_p.h>
28
30
32class QQmlComponent;
33class QQuickItem;
38class MapItemViewDelegateIncubator;
39class QDeclarativeGeoMapItemViewItemData;
42
44{
46 QML_NAMED_ELEMENT(MapItemView)
48 Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged)
49 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
50 Q_PROPERTY(bool autoFitViewport READ autoFitViewport WRITE setAutoFitViewport NOTIFY autoFitViewportChanged)
51 Q_PROPERTY(QQuickTransition *add MEMBER m_enter REVISION(5, 12))
52 Q_PROPERTY(QQuickTransition *remove MEMBER m_exit REVISION(5, 12))
53 Q_PROPERTY(QList<QQuickItem *> mapItems READ mapItems REVISION(5, 12))
54 Q_PROPERTY(bool incubateDelegates READ incubateDelegates WRITE setIncubateDelegates NOTIFY incubateDelegatesChanged REVISION(5, 12))
55
56public:
59
60 QVariant model() const;
61 void setModel(const QVariant &);
62
63 QQmlComponent *delegate() const;
64 void setDelegate(QQmlComponent *);
65
66 bool autoFitViewport() const;
67 void setAutoFitViewport(const bool &fit);
68
69 void setMap(QDeclarativeGeoMap *);
70 void removeInstantiatedItems(bool transition = true);
71 void instantiateAllItems();
72
73 void setIncubateDelegates(bool useIncubators);
74 bool incubateDelegates() const;
75
76 QList<QQuickItem *> mapItems();
77
78 // From QQmlParserStatus
79 void componentComplete() override;
80 void classBegin() override;
81
83 void modelChanged();
84 void delegateChanged();
85 void autoFitViewportChanged();
86 void incubateDelegatesChanged();
87
89 void destroyingItem(QObject *object);
90 void initItem(int index, QObject *object);
91 void createdItem(int index, QObject *object);
92 void modelUpdated(const QQmlChangeSet &changeSet, bool reset);
93 void exitTransitionFinished();
94
96 void fitViewport();
97 void removeDelegateFromMap(int index, bool transition = true);
98 void removeDelegateFromMap(QQuickItem *o);
99 void transitionItemOut(QQuickItem *o);
100 void terminateExitTransition(QQuickItem *o);
101 QQmlInstanceModel::ReleaseFlags disposeDelegate(QQuickItem *item);
102
103 void insertInstantiatedItem(int index, QQuickItem *o, bool createdItem);
104 void addItemToMap(QDeclarativeGeoMapItemBase *item, int index, bool createdItem);
105 void addItemViewToMap(QDeclarativeGeoMapItemView *item, int index, bool createdItem);
106 void addItemGroupToMap(QDeclarativeGeoMapItemGroup *item, int index, bool createdItem);
107 void addDelegateToMap(QQuickItem *object, int index, bool createdItem = false);
108
109 bool m_componentCompleted = false;
110 QQmlIncubator::IncubationMode m_incubationMode = QQmlIncubator::Asynchronous;
111 QQmlComponent *m_delegate = nullptr;
112 QVariant m_itemModel;
113 QDeclarativeGeoMap *m_map = nullptr;
114 QList<QQuickItem *> m_instantiatedItems;
115 bool m_fitViewport = false;
116 bool m_creatingObject = false;
117 QQmlDelegateModel *m_delegateModel = nullptr;
118 QQuickTransition *m_enter = nullptr;
119 QQuickTransition *m_exit = nullptr;
120
121 friend class QDeclarativeGeoMap;
124};
125
127
129
130#endif
DarwinBluetooth::DeviceInquiryDelegate * m_delegate
Definition qlist.h:75
\inmodule QtCore
Definition qobject.h:103
The QQmlChangeSet class stores an ordered list of notifications about changes to a linear data set.
The QQmlComponent class encapsulates a QML component definition.
The QQmlIncubator class allows QML objects to be created asynchronously.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
GLuint index
[2]
GLboolean reset
static void add(QPainterPath &path, const QWingedEdge &list, int edge, QPathEdge::Traversal traversal)
#define QML_DECLARE_TYPE(TYPE)
Definition qqml.h:19
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define Q_SIGNALS
#define explicit
view setModel(model)
[17] //! [18]
QSqlQueryModel * model
[16]
settings remove("monkey")
QGraphicsItem * item