7#include <QtQml/QQmlInfo>
8#include <QtQuick/QSGOpacityNode>
10#include <QtQuick/private/qquickmousearea_p.h>
11#include <QtQuick/private/qquickitem_p.h>
12#include <QtPositioning/private/qdoublevector2d_p.h>
13#include <QtLocation/private/qgeomap_p.h>
14#include <QtLocation/private/qgeoprojection_p.h>
16#include <QtQuickShapes/private/qquickshape_p_p.h>
44 if (kids.
size() > 0) {
45 bool printedWarning =
false;
46 for (
auto *
i : kids) {
48 && !qobject_cast<QQuickMouseArea *>(
i)
51 if (!printedWarning) {
52 qmlWarning(
this) <<
"Geographic map items do not support child items";
53 printedWarning =
true;
76 if (map_ && quickMap_) {
88void QDeclarativeGeoMapItemBase::baseCameraDataChanged(
const QGeoCameraData &cameraData)
94 if (evt.
mapSize != lastMapSize_)
101 if (cameraData.
roll() != lastCameraData_.
roll())
103 if (cameraData.
tilt() != lastCameraData_.
tilt())
109 lastCameraData_ = cameraData;
114void QDeclarativeGeoMapItemBase::visibleAreaChanged()
126 if (!map_ || !quickMap_)
132 QDoubleVector2D wrappedProjection =
p.geoToWrappedMapProjection(coordinate);
133 if (!
p.isProjectable(wrappedProjection))
135 pos =
p.wrappedMapProjectionToItemPosition(wrappedProjection);
157 if (fadeIn == m_autoFadeIn)
159 m_autoFadeIn = fadeIn;
166 return m_referenceSurface;
180 return m_lodThreshold;
185 if (lt == m_lodThreshold)
200 if (zoom >= m_lodThreshold)
227 const qint64 COORD_LIMIT = (1 << 21) / 32;
228 while (
coord > COORD_LIMIT) {
229 coord /= COORD_LIMIT;
230 scale /= COORD_LIMIT;
291 parentGroup_ = &parentGroup;
qreal mapItemOpacity() const
QGeoMap::ItemType itemType() const
virtual ~QDeclarativeGeoMapItemBase()
virtual void afterViewportChanged(const QGeoMapViewportChangeEvent &event)=0
QSGNode * updatePaintNode(QSGNode *, UpdatePaintNodeData *) override
void setLodThreshold(int lt)
virtual void setPositionOnMap(const QGeoCoordinate &coordinate, const QPointF &offset)
virtual QSGNode * updateMapItemPaintNode(QSGNode *, UpdatePaintNodeData *)
void setParentGroup(QDeclarativeGeoMapItemGroup &parentGroup)
void setShapeTriangulationScale(QQuickShape *shape, qreal maxCoord) const
void setAutoFadeIn(bool fadeIn)
QDeclarativeGeoMapItemBase(QQuickItem *parent=nullptr)
void mapItemOpacityChanged()
float zoomLevelOpacity() const
virtual void afterChildrenChanged()
virtual void setMap(QDeclarativeGeoMap *quickMap, QGeoMap *map)
void referenceSurfaceChanged()
bool isPolishScheduled() const
QLocation::ReferenceSurface referenceSurface
void setReferenceSurface(QLocation::ReferenceSurface referenceSurface)
QDeclarativeGeoMap * quickMap() const
unsigned int zoomForLOD(int zoom) const
void mapItemOpacityChanged()
qreal mapItemOpacity() const
Q_INVOKABLE void removeMapItem(QDeclarativeGeoMapItemBase *item)
\qmlmethod void QtLocation::Map::removeMapItem(MapItem item)
QGeoCoordinate center() const
const QGeoProjection & geoProjection() const
ItemTypes supportedMapItemTypes() const
const QGeoCameraData & cameraData() const
virtual QDoubleVector2D coordinateToItemPosition(const QGeoCoordinate &coordinate, bool clipToViewport=true) const =0
qsizetype size() const noexcept
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
\inmodule QtCore\reentrant
static QQuickItemPrivate * get(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
QList< QQuickItem * > childItems() const
Returns the children of this item.
qreal width
This property holds the width of this item.
qreal height
This property holds the height of this item.
virtual void updatePolish()
This function should perform any layout as required for this item.
qreal scale
\qmlproperty real QtQuick::Item::scale This property holds the scale factor for this item.
qreal opacity
\qmlproperty real QtQuick::Item::opacity
void update()
Schedules a call to updatePaintNode() for this item.
void polish()
Schedules a polish event for this item.
static QQuickShapePrivate * get(QQuickShape *item)
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
int childCount() const
Returns the number of child nodes.
void appendChildNode(QSGNode *node)
Appends node to this node's list of children.
QSGNode * firstChild() const
Returns the first child of this node.
void removeAllChildNodes()
Removes all child nodes from this node's list of children.
The QSGOpacityNode class is used to change opacity of nodes.
qreal opacity() const
Returns this opacity node's opacity.
void setOpacity(qreal opacity)
Sets the opacity of this node to opacity.
QMap< QString, QString > map
[6]
Combined button and popup list for selecting options.
static const double opacityRampMax
static const double opacityRampMin
bool qIsNaN(qfloat16 f) noexcept
constexpr const T & qMax(const T &a, const T &b)
n void setPosition(void) \n\
GLenum GLuint GLintptr offset
GLenum GLenum GLenum GLenum GLenum scale
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
#define QStringLiteral(str)
myObject disconnect()
[26]
QGeoCameraData cameraData
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent