diff options
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsview.cpp')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsview.cpp | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp index 7589a1ebbd..686b41960a 100644 --- a/src/widgets/graphicsview/qgraphicsview.cpp +++ b/src/widgets/graphicsview/qgraphicsview.cpp @@ -963,7 +963,7 @@ static inline void QRect_unite(QRect *rect, const QRect &other) /* Calling this function results in update rects being clipped to the item's bounding rect. Note that updates prior to this function call is not clipped. - The clip is removed by passing 0. + The clip is removed by passing \nullptr. */ void QGraphicsViewPrivate::setUpdateClip(QGraphicsItem *item) { @@ -1795,7 +1795,13 @@ void QGraphicsView::setSceneRect(const QRectF &rect) d->recalculateContentSize(); } +#if QT_DEPRECATED_SINCE(5, 15) + /*! + \obsolete + + Use transform() instead. + Returns the current transformation matrix for the view. If no current transformation is set, the identity matrix is returned. @@ -1808,6 +1814,10 @@ QMatrix QGraphicsView::matrix() const } /*! + \obsolete + + Use setTransform() instead. + Sets the view's current transformation matrix to \a matrix. If \a combine is true, then \a matrix is combined with the current matrix; @@ -1839,6 +1849,10 @@ void QGraphicsView::setMatrix(const QMatrix &matrix, bool combine) } /*! + \obsolete + + Use resetTransform() instead. + Resets the view transformation matrix to the identity matrix. \sa resetTransform() @@ -1848,6 +1862,8 @@ void QGraphicsView::resetMatrix() resetTransform(); } +#endif // QT_DEPRECATED_SINCE(5, 15) + /*! Rotates the current view transformation \a angle degrees clockwise. @@ -2589,13 +2605,13 @@ QVariant QGraphicsView::inputMethodQuery(Qt::InputMethodQuery query) const return QVariant(); QVariant value = d->scene->inputMethodQuery(query); - if (value.type() == QVariant::RectF) + if (value.userType() == QMetaType::QRectF) value = d->mapRectFromScene(value.toRectF()); - else if (value.type() == QVariant::PointF) + else if (value.userType() == QMetaType::QPointF) value = mapFromScene(value.toPointF()); - else if (value.type() == QVariant::Rect) + else if (value.userType() == QMetaType::QRect) value = d->mapRectFromScene(value.toRect()).toRect(); - else if (value.type() == QVariant::Point) + else if (value.userType() == QMetaType::QPoint) value = mapFromScene(value.toPoint()); return value; } |