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
qdeclarativegeomapitemgroup.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 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
7
9
113
118
125
127{
128 if (!quickMap && m_quickMap)
129 m_quickMap->disconnect(this);
130 m_quickMap = quickMap;
131 if (m_quickMap) {
135 }
136}
137
139{
140 return m_quickMap;
141}
142
144{
145 return ((m_parentGroup) ? m_parentGroup->mapItemOpacity() : 1.0) * opacity();
146}
147
152
154{
156
157 // In certain cases the parent won't be set via the constructor, but rather later on
158 // during the instantiation/incubation process.
159 // Therefore calling setParentGroup here, when the parent is known.
160 // The childrenChanged use case to handle dynamically-added items is currently unsupported.
161 const QList<QQuickItem *> &quickKids = childItems();
162 for (QQuickItem *k : quickKids) {
164 = qobject_cast<QDeclarativeGeoMapItemGroup *>(k);
165 if (childGroup) {
166 childGroup->setParentGroup(*this);
167 continue;
168 }
170 = qobject_cast<QDeclarativeGeoMapItemBase *>(k);
171 if (childItem) {
172 childItem->setParentGroup(*this);
173 continue;
174 }
175 }
176}
177
179{
180 setWidth(m_quickMap->width());
181 setHeight(m_quickMap->height());
182}
183
void classBegin() override
Invoked after class creation, but before any properties have been set.
QDeclarativeGeoMapItemGroup(QQuickItem *parent=nullptr)
\qmltype MapItemGroup \instantiates QDeclarativeGeoMapItemGroup \inqmlmodule QtLocation
void setQuickMap(QDeclarativeGeoMap *quickMap)
QDeclarativeGeoMap * quickMap() const
void setParentGroup(QDeclarativeGeoMapItemGroup &parentGroup)
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2960
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
Definition qobject.cpp:3236
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
void heightChanged()
void classBegin() override
\reimp Derived classes should call the base class method before adding their own action to perform at...
QList< QQuickItem * > childItems() const
Returns the children of this item.
void widthChanged()
void componentComplete() override
\reimp Derived classes should call the base class method before adding their own actions to perform a...
void opacityChanged()
void setHeight(qreal)
qreal width
This property holds the width of this item.
Definition qquickitem.h:75
qreal height
This property holds the height of this item.
Definition qquickitem.h:76
void setWidth(qreal)
qreal opacity
\qmlproperty real QtQuick::Item::opacity
Definition qquickitem.h:78
Combined button and popup list for selecting options.
double qreal
Definition qtypes.h:187