diff options
author | Stephan Binner <stephan.binner@basyskom.com> | 2017-07-09 11:04:38 +0200 |
---|---|---|
committer | Stephan Binner <stephan.binner@basyskom.com> | 2017-07-11 02:52:25 +0000 |
commit | 3835194d340f8756d2ac7a5f9ae2a3519cb891b9 (patch) | |
tree | 63fa52aabac01d835340b94a9ac8c146ac6fc110 /src/widgets/graphicsview/qgraphicsview.cpp | |
parent | 3906043f05d2ffccede47f845561cca95548ac5a (diff) |
Convert features.rubberband to QT_[REQUIRE_]CONFIG
Change-Id: I6d634bafa6d26c1e78069fddd412e6de24f5775c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsview.cpp')
-rw-r--r-- | src/widgets/graphicsview/qgraphicsview.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp index f5f24649c2..a00156ef01 100644 --- a/src/widgets/graphicsview/qgraphicsview.cpp +++ b/src/widgets/graphicsview/qgraphicsview.cpp @@ -353,7 +353,7 @@ QGraphicsViewPrivate::QGraphicsViewPrivate() viewportUpdateMode(QGraphicsView::MinimalViewportUpdate), optimizationFlags(0), scene(0), -#ifndef QT_NO_RUBBERBAND +#if QT_CONFIG(rubberband) rubberBanding(false), rubberBandSelectionMode(Qt::IntersectsItemShape), rubberBandSelectionOperation(Qt::ReplaceSelection), @@ -633,7 +633,7 @@ void QGraphicsViewPrivate::mouseMoveEventHandler(QMouseEvent *event) { Q_Q(QGraphicsView); -#ifndef QT_NO_RUBBERBAND +#if QT_CONFIG(rubberband) updateRubberBand(event); #endif @@ -708,7 +708,7 @@ void QGraphicsViewPrivate::mouseMoveEventHandler(QMouseEvent *event) /*! \internal */ -#ifndef QT_NO_RUBBERBAND +#if QT_CONFIG(rubberband) QRegion QGraphicsViewPrivate::rubberBandRegion(const QWidget *widget, const QRect &rect) const { QStyleHintReturnMask mask; @@ -1508,7 +1508,7 @@ void QGraphicsView::setDragMode(DragMode mode) #endif } -#ifndef QT_NO_RUBBERBAND +#if QT_CONFIG(rubberband) /*! \property QGraphicsView::rubberBandSelectionMode \brief the behavior for selecting items with a rubber band selection rectangle. @@ -3274,7 +3274,7 @@ void QGraphicsView::mousePressEvent(QMouseEvent *event) } } -#ifndef QT_NO_RUBBERBAND +#if QT_CONFIG(rubberband) if (d->dragMode == QGraphicsView::RubberBandDrag && !d->rubberBanding) { if (d->sceneInteractionAllowed) { // Rubberbanding is only allowed in interactive mode. @@ -3336,7 +3336,7 @@ void QGraphicsView::mouseReleaseEvent(QMouseEvent *event) { Q_D(QGraphicsView); -#ifndef QT_NO_RUBBERBAND +#if QT_CONFIG(rubberband) if (d->dragMode == QGraphicsView::RubberBandDrag && d->sceneInteractionAllowed && !event->buttons()) { if (d->rubberBanding) { if (d->viewportUpdateMode != QGraphicsView::NoViewportUpdate){ @@ -3459,7 +3459,7 @@ void QGraphicsView::paintEvent(QPaintEvent *event) // Set up the painter QPainter painter(viewport()); -#ifndef QT_NO_RUBBERBAND +#if QT_CONFIG(rubberband) if (d->rubberBanding && !d->rubberBandRect.isEmpty()) painter.save(); #endif @@ -3583,7 +3583,7 @@ void QGraphicsView::paintEvent(QPaintEvent *event) // Foreground drawForeground(&painter, exposedSceneRect); -#ifndef QT_NO_RUBBERBAND +#if QT_CONFIG(rubberband) // Rubberband if (d->rubberBanding && !d->rubberBandRect.isEmpty()) { painter.restore(); @@ -3651,7 +3651,7 @@ void QGraphicsView::scrollContentsBy(int dx, int dy) if (d->viewportUpdateMode != QGraphicsView::NoViewportUpdate) { if (d->viewportUpdateMode != QGraphicsView::FullViewportUpdate) { if (d->accelerateScrolling) { -#ifndef QT_NO_RUBBERBAND +#if QT_CONFIG(rubberband) // Update new and old rubberband regions if (!d->rubberBandRect.isEmpty()) { QRegion rubberBandRegion(d->rubberBandRegion(viewport(), d->rubberBandRect)); |