12#include <QtPositioning/QGeoCircle>
13#include <QtPositioning/QGeoRectangle>
14#include <QtPositioning/QGeoPath>
15#include <QtPositioning/QGeoPolygon>
16#include <QtQuick/QQuickWindow>
17#include <QtQuick/QSGRectangleNode>
18#include <QtQml/qqmlinfo.h>
19#include <QtQuick/private/qquickitem_p.h>
23#define M_PI 3.141592653589793238463
31 bearing = std::fmod(bearing,
qreal(360.0));
153 m_minimumTilt = m_cameraCapabilities.
minimumTilt();
154 m_maximumTilt = m_cameraCapabilities.
maximumTilt();
169 const auto mapViews = m_mapViews;
184 if (!m_mapItemGroups.
isEmpty()) {
185 const auto mapGroups = m_mapItemGroups;
205 if (m_copyrights.
data())
206 delete m_copyrights.
data();
207 m_copyrights.
clear();
212void QDeclarativeGeoMap::onSupportedMapTypesChanged()
215 if (m_supportedMapTypes.
isEmpty()) {
219 m_activeMapType =
type;
242 bool visibleAreaHasChanged =
false;
261 visibleAreaHasChanged =
true;
275 this, &QDeclarativeGeoMap::onCameraDataChanged);
281 m_initialized =
true;
283 if (visibleAreaHasChanged)
288 emit visibleRegionChanged();
297void QDeclarativeGeoMap::pluginReady()
307 if (!m_mappingManager) {
315 this, &QDeclarativeGeoMap::mappingManagerInitialized);
317 mappingManagerInitialized();
322 this, &QDeclarativeGeoMap::pluginReady);
330 m_componentCompleted =
true;
340void QDeclarativeGeoMap::populateMap()
372 root =
window()->createRectangleNode();
407 this, &QDeclarativeGeoMap::pluginReady);
433void QDeclarativeGeoMap::mappingManagerInitialized()
435 m_map = m_mappingManager->
createMap(
this);
444 item->setMap(
this, m_map);
460 if (!m_supportedMapTypes.
isEmpty()) {
461 m_activeMapType = m_supportedMapTypes.
at(0);
476 onCameraCapabilitiesChanged(m_cameraCapabilities);
484 if (!m_initialized &&
width() > 0 &&
height() > 0) {
487 [©rightString](
const QString &
copy){ copyrightString = copy; });
490 [©rightImage](
const QImage &
copy){ copyrightImage = copy; });
503 if (!copyrightString.
isEmpty())
505 else if (!copyrightImage.
isNull())
515 this, &QDeclarativeGeoMap::onCameraCapabilitiesChanged);
521 this, &QDeclarativeGeoMap::onSupportedMapTypesChanged);
584 return qMax(
qMin(m_maximumZoomLevel, m_userMinimumZoomLevel), m_minimumZoomLevel);
621 return qMin(
qMax(m_minimumZoomLevel, m_userMaximumZoomLevel), m_maximumZoomLevel);
721 return qobject_cast<QDeclarativeGeoMapItemGroup *>(
parent)
722 || qobject_cast<QDeclarativeGeoMapItemGroup *>(
group->parentItem());
752 if (bearingHasChanged) {
783 || (coordinate == currentCenter &&
bearing == currentBearing))
818 const bool tiltHasChanged =
tilt != m_cameraData.
tilt();
820 if (tiltHasChanged) {
832 return m_cameraData.
tilt();
928 return qMax(
qMin(m_maximumFieldOfView, m_userMinimumFieldOfView), m_minimumFieldOfView);
963 return qMin(
qMax(m_minimumFieldOfView, m_userMaximumFieldOfView), m_maximumFieldOfView);
983 return qMax(
qMin(m_maximumTilt, m_userMinimumTilt), m_minimumTilt);
1021 return qMin(
qMax(m_minimumTilt, m_userMaximumTilt), m_maximumTilt);
1037 if (m_initialized) {
1044 const bool centerHasChanged =
center != m_cameraData.
center();
1046 if (centerHasChanged) {
1058 return m_cameraData.
center();
1086 if (!m_visibleRegion.
isValid()
1091 m_pendingFitViewport =
false;
1092 emit visibleRegionChanged();
1097 m_pendingFitViewport =
true;
1098 emit visibleRegionChanged();
1103 emit visibleRegionChanged();
1109 return m_visibleRegion;
1125 path.setPath(visiblePoly);
1126 return path.boundingGeoRectangle();
1143 if (m_copyrightsVisible ==
visible)
1146 if (!m_copyrights.
isNull())
1149 m_copyrightsVisible =
visible;
1155 return m_copyrightsVisible;
1169 if (
color != m_color) {
1195 return m_visibleArea;
1207 if (m_initialized) {
1210 if (newVisibleArea != oldVisibleArea) {
1214 i->visibleAreaChanged();
1220 if (newVisibleArea != oldVisibleArea)
1237 return m_initialized;
1240QMargins QDeclarativeGeoMap::mapMargins()
const
1260 return m_supportedMapTypes;
1341 if (dx == 0 && dy == 0)
1392 case QMetaType::Int:
1393 case QMetaType::Double: {
1407 if (!m_map || !shape.
isValid())
1417 if (!fitData.first.isValid())
1448 return m_errorString;
1481 QQuickItem *mapItem = qobject_cast<QDeclarativeGeoMapItemBase *>(
child);
1483 mapItem = qobject_cast<QDeclarativeGeoMapItemGroup *>(
child);
1487 if (
z > m_maxChildZ) {
1499 m_window =
value.window;
1508void QDeclarativeGeoMap::attachCopyrightNotice(
bool initialVisibility)
1510 if (initialVisibility) {
1511 ++m_copyNoticesVisible;
1517void QDeclarativeGeoMap::detachCopyrightNotice(
bool currentVisibility)
1519 if (currentVisibility) {
1520 --m_copyNoticesVisible;
1526void QDeclarativeGeoMap::onAttachedCopyrightNoticeVisibilityChanged()
1529 m_copyNoticesVisible += ( int(
copy->copyrightsVisible()) * 2 - 1);
1534void QDeclarativeGeoMap::onCameraDataChanged(
const QGeoCameraData &cameraData)
1536 bool centerHasChanged = cameraData.
center() != m_cameraData.
center();
1537 bool bearingHasChanged = cameraData.
bearing() != m_cameraData.
bearing();
1538 bool tiltHasChanged = cameraData.
tilt() != m_cameraData.
tilt();
1542 m_cameraData = cameraData;
1546 i->baseCameraDataChanged(m_cameraData);
1549 if (centerHasChanged)
1553 if (bearingHasChanged)
1559 if (centerHasChanged || zoomHasChanged || bearingHasChanged
1560 || tiltHasChanged || fovHasChanged)
1561 emit visibleRegionChanged();
1578 for (
const auto &
ptr : m_mapItems) {
1614 if (!qobject_cast<QDeclarativeGeoMapItemGroup *>(
item->
parentItem()))
1618 item->setMap(
this, m_map);
1670 auto item = m_mapItemGroups.
at(
i);
1672 if (qobject_cast<QDeclarativeGeoMapItemView *>(
item))
1710 if (!itemGroup || itemGroup->
quickMap())
1723 for (
auto c: quickKids) {
1746 if (!itemGroup || itemGroup->
quickMap() !=
this)
1755 for (
auto c: quickKids) {
1781 if (!itemView || itemView->m_map !=
this)
1785 itemView->m_map = 0;
1798 item2Window.
reset();
1802 m_sgNodeHasChanged =
false;
1807 m_sgNodeHasChanged =
true;
1828 if (!itemView || itemView->m_map)
1834 m_mapViews.
append(itemView);
1835 setupMapView(itemView);
1851 if (m_activeMapType != mapType) {
1855 m_activeMapType = mapType;
1859 m_activeMapType = mapType;
1867 return m_activeMapType;
1882 if (!m_initialized) {
1891 if (maximumCenterLatitudeAtZoom != m_maximumViewportLatitude
1892 || minimumCenterLatitudeAtZoom != m_minimumViewportLatitude) {
1893 m_maximumViewportLatitude = maximumCenterLatitudeAtZoom;
1894 m_minimumViewportLatitude = minimumCenterLatitudeAtZoom;
1900 if (oldGeometry.
size() != newGeometry.
size()) {
1904 i->polishAndUpdate();
1917 if (m_pendingFitViewport &&
width() &&
height()) {
1919 m_pendingFitViewport =
false;
1946 fitViewportToMapItemsRefine(itms,
true,
false);
1948 fitViewportToMapItemsRefine(m_mapItems,
true,
false);
1963 fitViewportToMapItemsRefine(m_mapItems,
true,
true);
1979 double minX =
qInf();
1983 double topLeftX = 0;
1984 double topLeftY = 0;
1985 double bottomRightX = 0;
1986 double bottomRightY = 0;
1987 bool haveQuickItem =
false;
2000 qobject_cast<QDeclarativeGeoMapQuickItem*>(
item);
2001 if (refine && quickItem) {
2002 haveQuickItem =
true;
2013 if (
item->isPolishScheduled())
2014 item->updatePolish();
2024 topLeftX = transformedPosition.
x();
2025 topLeftY = transformedPosition.
y();
2026 bottomRightX = topLeftX + brect.
width();
2027 bottomRightY = topLeftY + brect.
height();
2036 minX =
qMin(minX, topLeftX);
2044 if (itemCount == 0) {
2046 fitViewportToMapItemsRefine(
mapItems,
false, onlyVisible);
2049 double bboxWidth =
maxX - minX;
2051 double bboxCenterX = minX + (bboxWidth / 2.0);
2052 double bboxCenterY =
minY + (bboxHeight / 2.0);
2060 double bboxWidthRatio = bboxWidth / (bboxWidth + bboxHeight);
2064 if (bboxWidthRatio > mapWidthRatio)
2065 zoomRatio = bboxWidth /
width();
2067 zoomRatio = bboxHeight /
height();
2069 qreal newZoom = std::log10(zoomRatio) / std::log10(0.5);
2076 fitViewportToMapItemsRefine(
mapItems,
false, onlyVisible);
The QColor class provides colors based on RGB, HSV or CMYK values.
void setCopyrightsZ(qreal copyrightsZ)
void setCopyrightsVisible(bool visible)
void setMapSource(QDeclarativeGeoMap *mapSource)
void setQuickMap(QDeclarativeGeoMap *quickMap)
QDeclarativeGeoMap * quickMap() const
void removeInstantiatedItems(bool transition=true)
friend class QDeclarativeGeoMapCopyrightNotice
bool removeMapChild(QObject *child)
void setActiveMapType(const QGeoMapType &mapType)
\qmlproperty mapType QtLocation::Map::activeMapType
QSGNode * updatePaintNode(QSGNode *, UpdatePaintNodeData *) override
void zoomLevelChanged(qreal zoomLevel)
void setMinimumTilt(qreal minimumTilt, bool userSet=true)
QGeoServiceProvider::Error error
void activeMapTypeChanged()
void maximumFieldOfViewChanged(qreal maximumFieldOfView)
void setBearing(qreal bearing)
\qmlproperty real QtLocation::Map::bearing
bool addMapItem_real(QDeclarativeGeoMapItemBase *item)
bool removeMapItemGroup_real(QDeclarativeGeoMapItemGroup *itemGroup)
void supportedMapTypesChanged()
Q_INVOKABLE void clearData()
\qmlmethod void QtLocation::Map::clearData()
Q_INVOKABLE void removeMapItemGroup(QDeclarativeGeoMapItemGroup *itemGroup)
\qmlmethod void QtLocation::Map::removeMapItemGroup(MapItemGroup itemGroup)
void fitViewportToGeoShape(const QGeoShape &shape, const QMargins &borders=QMargins(10, 10, 10, 10))
\qmlmethod void QtLocation::Map::fitViewportToGeoShape(geoShape, margins)
void copyrightsVisibleChanged(bool visible)
void minimumZoomLevelChanged(qreal minimumZoomLevel)
void setVisibleArea(const QRectF &visibleArea)
Q_INVOKABLE void fitViewportToMapItems(const QVariantList &items={})
\qmlmethod void QtLocation::Map::fitViewportToMapItems(list<MapItems> items = {})
Q_INVOKABLE void fitViewportToVisibleMapItems()
\qmlmethod void QtLocation::Map::fitViewportToVisibleMapItems()
void componentComplete() override
void copyrightsChanged(const QString ©rightsHtml)
void setZoomLevel(qreal zoomLevel)
\qmlproperty real QtLocation::Map::zoomLevel
void minimumTiltChanged(qreal minimumTilt)
void pluginChanged(QDeclarativeGeoServiceProvider *plugin)
bool isGroupNested(QDeclarativeGeoMapItemGroup *group) const
void setMinimumZoomLevel(qreal minimumZoomLevel, bool userSet=true)
Q_INVOKABLE QGeoCoordinate toCoordinate(const QPointF &position, bool clipToViewPort=true) const
\qmlmethod coordinate QtLocation::Map::toCoordinate(QPointF position, bool clipToViewPort)
Q_INVOKABLE void removeMapItemView(QDeclarativeGeoMapItemView *itemView)
\qmlmethod void QtLocation::Map::removeMapItemView(MapItemView itemView)
bool removeMapItem_real(QDeclarativeGeoMapItemBase *item)
void bearingChanged(qreal bearing)
void minimumFieldOfViewChanged(qreal minimumFieldOfView)
void setError(QGeoServiceProvider::Error error, const QString &errorString)
QGeoMapType activeMapType
void itemChange(ItemChange, const ItemChangeData &) override
Called when change occurs for this item.
Q_INVOKABLE void addMapItemGroup(QDeclarativeGeoMapItemGroup *itemGroup)
\qmlmethod void QtLocation::Map::addMapItemGroup(MapItemGroup itemGroup)
bool addMapItemView_real(QDeclarativeGeoMapItemView *itemView)
void visibleAreaChanged()
void updateItemToWindowTransform()
Q_INVOKABLE void removeMapItem(QDeclarativeGeoMapItemBase *item)
\qmlmethod void QtLocation::Map::removeMapItem(MapItem item)
void setColor(const QColor &color)
\qmlproperty color QtLocation::Map::color
void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override
void setMaximumTilt(qreal maximumTilt, bool userSet=true)
QList< QObject * > mapItems
\qmlproperty list<MapItem> QtLocation::Map::mapItems
QDeclarativeGeoMap(QQuickItem *parent=nullptr)
\qmltype Map \instantiates QDeclarativeGeoMap \inqmlmodule QtLocation
void setTilt(qreal tilt)
\qmlproperty real QtLocation::Map::tilt
void mapReadyChanged(bool ready)
void setCenter(const QGeoCoordinate ¢er)
\qmlproperty coordinate QtLocation::Map::center
Q_INVOKABLE QPointF fromCoordinate(const QGeoCoordinate &coordinate, bool clipToViewPort=true) const
\qmlmethod point QtLocation::Map::fromCoordinate(coordinate coordinate, bool clipToViewPort)
Q_INVOKABLE void clearMapItems()
\qmlmethod void QtLocation::Map::clearMapItems()
QList< QGeoMapType > supportedMapTypes
\qmlproperty list<mapType> QtLocation::Map::supportedMapTypes
void fieldOfViewChanged(qreal fieldOfView)
Q_INVOKABLE void prefetchData()
\qmlmethod void QtLocation::Map::prefetchData()
void setPlugin(QDeclarativeGeoServiceProvider *plugin)
\qmlproperty Plugin QtLocation::Map::plugin
void setCopyrightsVisible(bool visible)
\qmlproperty bool QtLocation::Map::copyrightsVisible
void tiltChanged(qreal tilt)
void maximumTiltChanged(qreal maximumTilt)
void setVisibleRegion(const QGeoShape &shape)
\qmlproperty geoshape QtLocation::Map::visibleRegion
void setMaximumZoomLevel(qreal maximumZoomLevel, bool userSet=true)
void setFieldOfView(qreal fieldOfView)
\qmlproperty real QtLocation::Map::fieldOfView
void copyrightsImageChanged(const QImage ©rightsImage)
Q_INVOKABLE void pan(int dx, int dy)
\qmlmethod void QtLocation::Map::pan(int dx, int dy)
QDeclarativeGeoServiceProvider * plugin
void setMaximumFieldOfView(qreal maximumFieldOfView, bool userSet=true)
bool addMapItemGroup_real(QDeclarativeGeoMapItemGroup *itemGroup)
bool addMapChild(QObject *child)
Q_INVOKABLE void addMapItemView(QDeclarativeGeoMapItemView *itemView)
\qmlmethod void QtLocation::Map::addMapItemView(MapItemView itemView)
Q_INVOKABLE void alignCoordinateToPoint(const QGeoCoordinate &coordinate, const QPointF &point)
\qmlmethod void QtLocation::Map::alignCoordinateToPoint(coordinate coordinate, QPointF point)
Q_INVOKABLE void addMapItem(QDeclarativeGeoMapItemBase *item)
\qmlmethod void QtLocation::Map::addMapItem(MapItem item)
void setMinimumFieldOfView(qreal minimumFieldOfView, bool userSet=true)
void centerChanged(const QGeoCoordinate &coordinate)
void colorChanged(const QColor &color)
void maximumZoomLevelChanged(qreal maximumZoomLevel)
bool removeMapItemView_real(QDeclarativeGeoMapItemView *itemView)
QGeoServiceProvider * sharedGeoServiceProvider() const
Q_DECL_CONSTEXPR QPointF toPointF() const
void setSupportsBearing(bool supportsBearing)
Sets whether the associated plugin can render a map when the camera has an arbitrary bearing to suppo...
qreal maximumTilt
\qmlproperty qreal cameraCapabilities::maximumTilt
void setMaximumZoomLevel(double maximumZoomLevel)
bool overzoomEnabled() const
Returns whether overzooming is supported by the associated plugin.
bool supportsBearing() const
Returns whether the associated plugin can render a map when the camera has an arbitrary bearing.
qreal minimumZoomLevel
\qmlproperty qreal cameraCapabilities::minimumZoomLevel
void setMaximumTilt(double maximumTilt)
qreal maximumZoomLevel
\qmlproperty qreal cameraCapabilities::maximumZoomLevel
void setMaximumFieldOfView(double maximumFieldOfView)
void setMinimumFieldOfView(double minimumFieldOfView)
void setTileSize(int tileSize)
void setMinimumTilt(double minimumTilt)
void setMinimumZoomLevel(double minimumZoomLevel)
qreal maximumFieldOfView
\qmlproperty qreal cameraCapabilities::maximumFieldOfView
qreal minimumTilt
\qmlproperty qreal cameraCapabilities::minimumTilt
bool supportsTilting() const
Returns whether the associated plugin can render a map when the camera is tilted.
void setSupportsTilting(bool supportsTilting)
Sets whether the associated plugin can render a map when the camera is tilted to supportsTilting.
qreal minimumFieldOfView
\qmlproperty qreal cameraCapabilities::minimumFieldOfView
void setTilt(double tilt)
void setZoomLevel(double zoomLevel)
void setCenter(const QGeoCoordinate &coordinate)
void setBearing(double bearing)
double fieldOfView() const
QGeoCoordinate center() const
void setFieldOfView(double fieldOfView)
double latitude
This property holds the latitude in decimal degrees.
void setLatitude(double latitude)
Sets the latitude (in decimal degrees) to latitude.
bool isValid
This property holds the validity of this geo coordinate.
QByteArray pluginName() const
void setCameraData(const QGeoCameraData &cameraData)
virtual bool setBearing(qreal bearing, const QGeoCoordinate &coordinate)
@ SupportsFittingViewportToGeoRectangle
@ SupportsAnchoringCoordinate
virtual bool fitViewportToGeoRectangle(const QGeoRectangle &rectangle, const QMargins &borders)
void setActiveMapType(const QGeoMapType &mapType)
virtual Capabilities capabilities() const
virtual void prefetchData()
double maximumCenterLatitudeAtZoom(const QGeoCameraData &cameraData) const
virtual QSGNode * updateSceneGraph(QSGNode *node, QQuickWindow *window)=0
void visibleAreaChanged()
void setViewportSize(const QSize &viewportSize)
virtual QGeoShape visibleRegion() const
QGeoCameraCapabilities cameraCapabilities() const
void cameraDataChanged(const QGeoCameraData &cameraData)
virtual void setCopyrightVisible(bool visible)
virtual bool anchorCoordinateToPoint(const QGeoCoordinate &coordinate, const QPointF &anchorPoint)
virtual void setItemToWindowTransform(const QTransform &itemToWindowTransform)
const QGeoProjection & geoProjection() const
void removeMapItem(QDeclarativeGeoMapItemBase *item)
QGeoMapType activeMapType() const
void addMapItem(QDeclarativeGeoMapItemBase *item)
void cameraCapabilitiesChanged(const QGeoCameraCapabilities &oldCameraCapabilities)
void copyrightsChanged(const QString ©rightsHtml)
QRectF visibleArea() const
double minimumCenterLatitudeAtZoom(const QGeoCameraData &cameraData) const
void copyrightsImageChanged(const QImage ©rightsImage)
const QGeoCameraData & cameraData() const
int viewportHeight() const
int viewportWidth() const
void setVisibleArea(const QRectF &visibleArea)
double minimumZoom() const
void initialized()
This signal is emitted when the mapping manager has been initialized and is ready to be used.
QGeoMap * createMap(QObject *parent)
Returns a new QGeoMap instance which will be managed by this manager.
QList< QGeoMapType > supportedMapTypes() const
void supportedMapTypesChanged()
bool isInitialized() const
Return whether the manager has been initialized (will be done automatically but may take some time).
QPair< QGeoCoordinate, qreal > fitViewportToGeoRectangle(const QGeoRectangle &rectangle, const QMargins &margins) const
virtual ProjectionType projectionType() const =0
virtual QGeoCoordinate itemPositionToCoordinate(const QDoubleVector2D &pos, bool clipToViewport=true) const =0
virtual QDoubleVector2D coordinateToItemPosition(const QGeoCoordinate &coordinate, bool clipToViewport=true) const =0
QGeoCoordinate topLeft
This property holds the top left coordinate of this geo rectangle.
QGeoCoordinate bottomRight
This property holds the bottom right coordinate of this geo rectangle.
QGeoMappingManager * mappingManager() const
Returns the QGeoMappingManager made available by the service provider.
Error mappingError() const
Returns an error code describing the error which occurred during the last attempt to create a mapping...
Error
Describes an error related to the loading and setup of a service provider plugin.
QString mappingErrorString() const
Returns a string describing the error which occurred during the last attempt to create a mapping mana...
bool isValid
This property holds the validity of the geo shape.
Q_INVOKABLE QGeoRectangle boundingGeoRectangle() const
Returns a QGeoRectangle representing the geographical bounding rectangle of the geo shape,...
virtual QRectF boundingRect() const =0
This pure virtual function defines the outer bounds of the item as a rectangle; all painting must be ...
void setParentItem(QGraphicsItem *parent)
Sets this item's parent item to newParent.
QVariant data(int key) const
Returns this item's custom data for the key key as a QVariant.
QGraphicsItem * parentItem() const
Returns a pointer to this item's parent item.
bool isVisible() const
Returns true if the item is visible; otherwise, false is returned.
bool isNull() const
Returns true if it is a null image, otherwise returns false.
qsizetype size() const noexcept
bool isEmpty() const noexcept
bool removeOne(const AT &t)
const_reference at(qsizetype i) const noexcept
qsizetype count() const noexcept
void append(parameter_type t)
QRect mapRect(const QRect &rect) const
Maps rect by multiplying this matrix by the corners of rect and then forming a new rectangle from the...
QPoint map(const QPoint &point) const
Maps point by multiplying this matrix by point.
bool isIdentity() const
Returns true if this matrix is the identity; false otherwise.
const QObjectList & children() const
Returns a list of child objects.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
QObject * sender() const
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; othe...
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
bool setProperty(const char *name, const QVariant &value)
Sets the value of the object's name property to value.
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
bool isNull() const
Returns true if the referenced object has been destroyed or if there is no referenced object; otherwi...
QTransform itemToWindowTransform() const
Returns a transform that maps points from item space into window space.
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.
virtual void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry)
bool visible
\qmlproperty bool QtQuick::Item::visible
void setParentItem(QQuickItem *parent)
qreal z
\qmlproperty real QtQuick::Item::z
void componentComplete() override
\reimp Derived classes should call the base class method before adding their own actions to perform a...
virtual QRectF boundingRect() const
Returns the extents of the item in its own coordinate system: a rectangle from {0,...
void setFlags(Flags flags)
Enables the specified flags for this item.
QQuickWindow * window() const
Returns the window in which this item is rendered.
qreal width
This property holds the width of this item.
QQuickItem * parentItem() const
virtual void itemChange(ItemChange, const ItemChangeData &)
Called when change occurs for this item.
QQuickItem * parent
\qmlproperty Item QtQuick::Item::parent This property holds the visual parent of the item.
qreal height
This property holds the height of this item.
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
@ ItemClipsChildrenToShape
void update()
Schedules a call to updatePaintNode() for this item.
void beforeSynchronizing()
This signal is emitted before the scene graph is synchronized with the QML state.
\inmodule QtCore\reentrant
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
constexpr qreal y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
constexpr qreal x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr QSizeF size() const noexcept
Returns the size of the rectangle.
constexpr bool isValid() const noexcept
Returns true if the rectangle is valid, otherwise returns false.
\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.
The QSGRectangleNode class is a convenience class for drawing solid filled rectangles using scenegrap...
virtual void setRect(const QRectF &rect)=0
Sets the rectangle of this rect node to rect.
virtual void setColor(const QColor &color)=0
Sets the color of this rectangle to color.
constexpr QSize toSize() const noexcept
Returns an integer based copy of this size.
constexpr bool isEmpty() const noexcept
Returns true if either of the width and height is less than or equal to 0; otherwise returns false.
\macro QT_RESTRICTED_CAST_FROM_ASCII
QByteArray toLatin1() const &
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
double toDouble(bool *ok=nullptr) const
Returns the variant as a double if the variant has userType() \l QMetaType::Double,...
int typeId() const
Returns the storage type of the value stored in the variant.
static auto fromValue(T &&value) noexcept(std::is_nothrow_copy_constructible_v< T > &&Private::CanUseInternalSpace< T >) -> std::enable_if_t< std::conjunction_v< std::is_copy_constructible< T >, std::is_destructible< T > >, QVariant >
cache insert(employee->id(), employee)
Combined button and popup list for selecting options.
static jboolean copy(JNIEnv *, jobject)
#define QByteArrayLiteral(str)
std::pair< T1, T2 > QPair
DBusConnection const char DBusError * error
static QT_BEGIN_NAMESPACE qreal sanitizeBearing(qreal bearing)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
bool qIsFinite(qfloat16 f) noexcept
static ControlElement< T > * ptr(QWidget *widget)
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qBound(const T &min, const T &val, const T &max)
constexpr const T & qMax(const T &a, const T &b)
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION double qInf()
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION double qQNaN()
GLsizei const GLfloat * v
[13]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLsizei GLsizei height
GLfloat GLfloat GLfloat GLfloat GLfloat maxY
GLenum GLenum GLsizei count
GLfloat GLfloat GLfloat GLfloat maxX
GLsizei const GLchar *const * path
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
#define QStringLiteral(str)
myObject disconnect()
[26]
bool contains(const AT &t) const noexcept
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
QT_BEGIN_NAMESPACE bool toBool(const QString &str)