summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp212
1 files changed, 107 insertions, 105 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 0acef0b..a1ff6d2 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -1759,10 +1759,10 @@ QRectF QGraphicsScene::itemsBoundingRect() const
return boundingRect;
}
-/*!
- Returns a list of all items on the scene, in no particular order.
+/*! \fn QList<QGraphicsItem *> QGraphicsScene::items() const
+ Returns a list of all items on the scene, in no particular order.
- \sa addItem(), removeItem()
+ \sa addItem(), removeItem()
*/
QList<QGraphicsItem *> QGraphicsScene::items() const
{
@@ -1770,11 +1770,11 @@ QList<QGraphicsItem *> QGraphicsScene::items() const
return d->index->items(Qt::DescendingOrder);
}
-/*!
- Returns an ordered list of all items on the scene. \a order decides the
- sorting.
+/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(Qt::SortOrder order) const
+ Returns an ordered list of all items on the scene. \a order decides the
+ sorting.
- \sa addItem(), removeItem()
+ \sa addItem(), removeItem()
*/
QList<QGraphicsItem *> QGraphicsScene::items(Qt::SortOrder order) const
{
@@ -1782,18 +1782,18 @@ QList<QGraphicsItem *> QGraphicsScene::items(Qt::SortOrder order) const
return d->index->items(order);
}
-/*!
- \obsolete
+/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos) const
+ \obsolete
- Returns all visible items at position \a pos in the scene. The items are
- listed in descending stacking order (i.e., the first item in the list is the
- top-most item, and the last item is the bottom-most item).
+ Returns all visible items at position \a pos in the scene. The items are
+ listed in descending stacking order (i.e., the first item in the list is the
+ top-most item, and the last item is the bottom-most item).
- This function is deprecated and returns incorrect results if the scene
- contains items that ignore transformations. Use the overload that takes
- a QTransform instead.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
- \sa itemAt()
+ \sa itemAt()
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos) const
{
@@ -1801,21 +1801,21 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos) const
return d->index->items(pos, Qt::IntersectsItemShape, Qt::DescendingOrder);
}
-/*!
- \overload
- \obsolete
+/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rectangle, Qt::ItemSelectionMode mode) const
+ \overload
+ \obsolete
- Returns all visible items that, depending on \a mode, are either inside or
- intersect with the specified \a rectangle.
+ Returns all visible items that, depending on \a mode, are either inside or
+ intersect with the specified \a rectangle.
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with or is contained by \a rectangle are returned.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a rectangle are returned.
- This function is deprecated and returns incorrect results if the scene
- contains items that ignore transformations. Use the overload that takes
- a QTransform instead.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
- \sa itemAt()
+ \sa itemAt()
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rectangle, Qt::ItemSelectionMode mode) const
{
@@ -1823,47 +1823,45 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rectangle, Qt::ItemSe
return d->index->items(rectangle, mode, Qt::DescendingOrder);
}
-/*!
- \fn QList<QGraphicsItem *> QGraphicsScene::items(qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode) const
- \obsolete
- \since 4.3
+/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode) const
+ \obsolete
+ \since 4.3
- This convenience function is equivalent to calling items(QRectF(\a x, \a y, \a w, \a h), \a mode).
+ This convenience function is equivalent to calling items(QRectF(\a x, \a y, \a w, \a h), \a mode).
- This function is deprecated and returns incorrect results if the scene
- contains items that ignore transformations. Use the overload that takes
- a QTransform instead.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
*/
/*!
- \fn QList<QGraphicsItem *> QGraphicsScene::items(qreal x, qreal y, qreal w, qreal h,
- Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
- \overload
- \since 4.6
+ \fn QList<QGraphicsItem *> QGraphicsScene::items(qreal x, qreal y, qreal w, qreal h, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
+ \overload
+ \since 4.6
- Returns all visible items that, depending on \a mode, are either inside or
- intersect with the rectangle defined by \a x, \a y, \a w and \a h, in a list
- sorted using \a order.
+ \brief Returns all visible items that, depending on \a mode, are
+ either inside or intersect with the rectangle defined by \a x, \a y,
+ \a w and \a h, in a list sorted using \a order.
- \a deviceTransform is the transformation that applies to the view, and needs to
- be provided if the scene contains items that ignore transformations.
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
*/
-/*!
- \overload
- \obsolete
+/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemSelectionMode mode) const
+ \overload
+ \obsolete
- Returns all visible items that, depending on \a mode, are either inside or
- intersect with the polygon \a polygon.
+ Returns all visible items that, depending on \a mode, are either inside or
+ intersect with the polygon \a polygon.
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with or is contained by \a polygon are returned.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a polygon are returned.
- This function is deprecated and returns incorrect results if the scene
- contains items that ignore transformations. Use the overload that takes
- a QTransform instead.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
- \sa itemAt()
+ \sa itemAt()
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemSelectionMode mode) const
{
@@ -1871,21 +1869,21 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemS
return d->index->items(polygon, mode, Qt::DescendingOrder);
}
-/*!
- \overload
- \obsolete
+/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemSelectionMode mode) const
+ \overload
+ \obsolete
- Returns all visible items that, depending on \a path, are either inside or
- intersect with the path \a path.
+ Returns all visible items that, depending on \a path, are either inside or
+ intersect with the path \a path.
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with or is contained by \a path are returned.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a path are returned.
- This function is deprecated and returns incorrect results if the scene
- contains items that ignore transformations. Use the overload that takes
- a QTransform instead.
+ This function is deprecated and returns incorrect results if the scene
+ contains items that ignore transformations. Use the overload that takes
+ a QTransform instead.
- \sa itemAt()
+ \sa itemAt()
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemSelectionMode mode) const
{
@@ -1893,19 +1891,20 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemS
return d->index->items(path, mode, Qt::DescendingOrder);
}
-/*!
- \since 4.6
+/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
- Returns all visible items that, depending on \a mode, are at the specified \a pos
- in a list sorted using \a order.
+ \since 4.6
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with \a pos are returned.
+ \brief Returns all visible items that, depending on \a mode, are at
+ the specified \a pos in a list sorted using \a order.
- \a deviceTransform is the transformation that applies to the view, and needs to
- be provided if the scene contains items that ignore transformations.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with \a pos are returned.
- \sa itemAt()
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
+
+ \sa itemAt()
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos, Qt::ItemSelectionMode mode,
Qt::SortOrder order, const QTransform &deviceTransform) const
@@ -1914,20 +1913,21 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QPointF &pos, Qt::ItemSelecti
return d->index->items(pos, mode, order, deviceTransform);
}
-/*!
- \overload
- \since 4.6
+/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rect, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
+ \overload
+ \since 4.6
- Returns all visible items that, depending on \a mode, are either inside or
- intersect with the specified \a rect and return a list sorted using \a order.
+ \brief Returns all visible items that, depending on \a mode, are
+ either inside or intersect with the specified \a rect and return a
+ list sorted using \a order.
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with or is contained by \a rect are returned.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a rect are returned.
- \a deviceTransform is the transformation that applies to the view, and needs to
- be provided if the scene contains items that ignore transformations.
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
- \sa itemAt()
+ \sa itemAt()
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rect, Qt::ItemSelectionMode mode,
Qt::SortOrder order, const QTransform &deviceTransform) const
@@ -1936,20 +1936,21 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QRectF &rect, Qt::ItemSelecti
return d->index->items(rect, mode, order, deviceTransform);
}
-/*!
- \overload
- \since 4.6
+/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
+ \overload
+ \since 4.6
- Returns all visible items that, depending on \a mode, are either inside or
- intersect with the specified \a polygon and return a list sorted using \a order.
+ \brief Returns all visible items that, depending on \a mode, are
+ either inside or intersect with the specified \a polygon and return
+ a list sorted using \a order.
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with or is contained by \a polygon are returned.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a polygon are returned.
- \a deviceTransform is the transformation that applies to the view, and needs to
- be provided if the scene contains items that ignore transformations.
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
- \sa itemAt()
+ \sa itemAt()
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemSelectionMode mode,
Qt::SortOrder order, const QTransform &deviceTransform) const
@@ -1958,20 +1959,21 @@ QList<QGraphicsItem *> QGraphicsScene::items(const QPolygonF &polygon, Qt::ItemS
return d->index->items(polygon, mode, order, deviceTransform);
}
-/*!
- \overload
- \since 4.6
+/*! \fn QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemSelectionMode mode, Qt::SortOrder order, const QTransform &deviceTransform) const
+ \overload
+ \since 4.6
- Returns all visible items that, depending on \a mode, are either inside or
- intersect with the specified \a path and return a list sorted using \a order.
+ \brief Returns all visible items that, depending on \a mode, are
+ either inside or intersect with the specified \a path and return a
+ list sorted using \a order.
- The default value for \a mode is Qt::IntersectsItemShape; all items whose
- exact shape intersects with or is contained by \a path are returned.
+ The default value for \a mode is Qt::IntersectsItemShape; all items whose
+ exact shape intersects with or is contained by \a path are returned.
- \a deviceTransform is the transformation that applies to the view, and needs to
- be provided if the scene contains items that ignore transformations.
+ \a deviceTransform is the transformation that applies to the view, and needs to
+ be provided if the scene contains items that ignore transformations.
- \sa itemAt()
+ \sa itemAt()
*/
QList<QGraphicsItem *> QGraphicsScene::items(const QPainterPath &path, Qt::ItemSelectionMode mode,
Qt::SortOrder order, const QTransform &deviceTransform) const