src/gui/graphicsview/qgraphicsview.cpp
branchRCL_3
changeset 4 3b1da2848fc7
parent 3 41300fa6a67c
child 8 3f74d0d4af4c
equal deleted inserted replaced
3:41300fa6a67c 4:3b1da2848fc7
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
   215     this flag, QGraphicsView will no longer perform these adjustments,
   215     this flag, QGraphicsView will no longer perform these adjustments,
   216     minimizing the areas that require redrawing, which improves performance. A
   216     minimizing the areas that require redrawing, which improves performance. A
   217     common side effect is that items that do draw with antialiasing can leave
   217     common side effect is that items that do draw with antialiasing can leave
   218     painting traces behind on the scene as they are moved.
   218     painting traces behind on the scene as they are moved.
   219 
   219 
   220     \omitvalue IndirectPainting
   220     \value IndirectPainting Since Qt 4.6, restore the old painting algorithm
       
   221     that calls QGraphicsView::drawItems() and QGraphicsScene::drawItems().
       
   222     To be used only for compatibility with old code.
   221 */
   223 */
   222 
   224 
   223 /*!
   225 /*!
   224     \enum QGraphicsView::CacheModeFlag
   226     \enum QGraphicsView::CacheModeFlag
   225 
   227 
  3363 #undef X11
  3365 #undef X11
  3364             if (backgroundPainter.paintEngine()->type() != QPaintEngine::X11)
  3366             if (backgroundPainter.paintEngine()->type() != QPaintEngine::X11)
  3365 #define X11 qt_x11Data
  3367 #define X11 qt_x11Data
  3366 #endif
  3368 #endif
  3367                 backgroundPainter.setCompositionMode(QPainter::CompositionMode_Source);
  3369                 backgroundPainter.setCompositionMode(QPainter::CompositionMode_Source);
  3368             drawBackground(&backgroundPainter, exposedSceneRect);
  3370             QRectF backgroundExposedSceneRect = mapToScene(d->backgroundPixmapExposed.boundingRect()).boundingRect();
       
  3371             drawBackground(&backgroundPainter, backgroundExposedSceneRect);
  3369             d->backgroundPixmapExposed = QRegion();
  3372             d->backgroundPixmapExposed = QRegion();
  3370         }
  3373         }
  3371 
  3374 
  3372         // Blit the background from the background pixmap
  3375         // Blit the background from the background pixmap
  3373         if (viewTransformed) {
  3376         if (viewTransformed) {
  3613     styleoptions; one for each item. Reimplement this function to provide
  3616     styleoptions; one for each item. Reimplement this function to provide
  3614     custom item drawing for this view.
  3617     custom item drawing for this view.
  3615 
  3618 
  3616     The default implementation calls the scene's drawItems() function.
  3619     The default implementation calls the scene's drawItems() function.
  3617 
  3620 
       
  3621     \obsolete Since Qt 4.6, this function is not called anymore unless
       
  3622     the QGraphicsView::IndirectPainting flag is given as an Optimization
       
  3623     flag.
       
  3624 
  3618     \sa drawForeground(), drawBackground(), QGraphicsScene::drawItems()
  3625     \sa drawForeground(), drawBackground(), QGraphicsScene::drawItems()
  3619 */
  3626 */
  3620 void QGraphicsView::drawItems(QPainter *painter, int numItems,
  3627 void QGraphicsView::drawItems(QPainter *painter, int numItems,
  3621                               QGraphicsItem *items[],
  3628                               QGraphicsItem *items[],
  3622                               const QStyleOptionGraphicsItem options[])
  3629                               const QStyleOptionGraphicsItem options[])