Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/graphicsview/qgraphicsview_p.h

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    6666QT_BEGIN_NAMESPACE
    6767
    68 class Q_AUTOTEST_EXPORT QGraphicsViewPrivate : public QAbstractScrollAreaPrivate
     68class Q_GUI_EXPORT QGraphicsViewPrivate : public QAbstractScrollAreaPrivate
    6969{
    7070    Q_DECLARE_PUBLIC(QGraphicsView)
     
    7878
    7979    QGraphicsView::DragMode dragMode;
    80     bool sceneInteractionAllowed;
     80
     81    quint32 sceneInteractionAllowed : 1;
     82    quint32 hasSceneRect : 1;
     83    quint32 connectedToScene : 1;
     84    quint32 useLastMouseEvent : 1;
     85    quint32 identityMatrix : 1;
     86    quint32 dirtyScroll : 1;
     87    quint32 accelerateScrolling : 1;
     88    quint32 keepLastCenterPoint : 1;
     89    quint32 transforming : 1;
     90    quint32 handScrolling : 1;
     91    quint32 mustAllocateStyleOptions : 1;
     92    quint32 mustResizeBackgroundPixmap : 1;
     93    quint32 fullUpdatePending : 1;
     94    quint32 hasUpdateClip : 1;
     95    quint32 padding : 18;
     96
    8197    QRectF sceneRect;
    82     bool hasSceneRect;
    8398    void updateLastCenterPoint();
    84     bool connectedToScene;
    8599
    86100    qint64 horizontalScroll() const;
     
    90104    QRectF mapRectFromScene(const QRectF &rect) const;
    91105
     106    QRect updateClip;
    92107    QPointF mousePressItemPoint;
    93108    QPointF mousePressScenePoint;
     
    99114    Qt::MouseButton mousePressButton;
    100115    QTransform matrix;
    101     bool identityMatrix;
    102116    qint64 scrollX, scrollY;
    103     bool dirtyScroll;
    104117    void updateScroll();
    105118
    106     bool accelerateScrolling;
    107119    qreal leftIndent;
    108120    qreal topIndent;
     
    110122    // Replaying mouse events
    111123    QMouseEvent lastMouseEvent;
    112     bool useLastMouseEvent;
    113124    void replayLastMouseEvent();
    114125    void storeMouseEvent(QMouseEvent *event);
     
    116127
    117128    QPointF lastCenterPoint;
    118     bool keepLastCenterPoint;
    119129    Qt::Alignment alignment;
    120     bool transforming;
    121130
    122131    QGraphicsView::ViewportAnchor transformationAnchor;
     
    132141    Qt::ItemSelectionMode rubberBandSelectionMode;
    133142#endif
    134     bool handScrolling;
    135143    int handScrollMotions;
    136144
     
    138146
    139147    QVector<QStyleOptionGraphicsItem> styleOptions;
    140     bool mustAllocateStyleOptions;
    141148    QStyleOptionGraphicsItem *allocStyleOptionsArray(int numItems);
    142149    void freeStyleOptionsArray(QStyleOptionGraphicsItem *array);
     
    145152    QBrush foregroundBrush;
    146153    QPixmap backgroundPixmap;
    147     bool mustResizeBackgroundPixmap;
    148154    QRegion backgroundPixmapExposed;
    149155
     
    162168    QRect mapToViewRect(const QGraphicsItem *item, const QRectF &rect) const;
    163169    QRegion mapToViewRegion(const QGraphicsItem *item, const QRectF &rect) const;
    164     bool fullUpdatePending;
    165170    QRegion dirtyRegion;
    166171    QRect dirtyBoundingRect;
     
    193198    }
    194199
     200    void setUpdateClip(QGraphicsItem *);
     201
     202    inline bool updateRectF(const QRectF &rect)
     203    {
     204        if (rect.isEmpty())
     205            return false;
     206        if (optimizationFlags & QGraphicsView::DontAdjustForAntialiasing)
     207            return updateRect(rect.toAlignedRect().adjusted(-1, -1, 1, 1));
     208        return updateRect(rect.toAlignedRect().adjusted(-2, -2, 2, 2));
     209    }
     210
    195211    bool updateRect(const QRect &rect);
    196     bool updateRegion(const QRegion &region);
     212    bool updateRegion(const QRectF &rect, const QTransform &xform);
    197213    bool updateSceneSlotReimplementedChecked;
    198214    QRegion exposedRegion;
Note: See TracChangeset for help on using the changeset viewer.