42 #ifndef QGRAPHICSSCENE_P_H 43 #define QGRAPHICSSCENE_P_H 58 #if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW 65 #include <private/qobject_p.h> 66 #include <QtCore/qbitarray.h> 67 #include <QtCore/qlist.h> 68 #include <QtCore/qmap.h> 69 #include <QtCore/qset.h> 70 #include <QtGui/qfont.h> 71 #include <QtGui/qpalette.h> 72 #include <QtGui/qstyle.h> 73 #include <QtGui/qstyleoption.h> 122 void _q_emitUpdated();
134 void _q_updateLater();
135 void _q_polishItems();
137 void _q_processDirtyItems();
143 void _q_updateScenePosDescendants();
159 void setActivePanelHelper(
QGraphicsItem *item,
bool duringActivationEvent);
169 void ungrabMouse(
QGraphicsItem *item,
bool itemIsDying =
false);
170 void clearMouseGrabber();
174 void ungrabKeyboard(
QGraphicsItem *item,
bool itemIsDying =
false);
175 void clearKeyboardGrabber();
183 void enableMouseTrackingOnViews();
204 bool itemAcceptsHoverEvents_helper(
const QGraphicsItem *item)
const;
205 void leaveScene(
QWidget *viewport);
219 bool painterStateProtection);
231 bool force =
false,
bool ignoreOpacity =
false,
bool removingItemFromScene =
false,
232 bool updateBoundingRect =
false);
233 void processDirtyItemsRecursive(
QGraphicsItem *item,
bool dirtyAncestorContainsChildren =
false,
250 #ifndef QT_NO_GRAPHICSEFFECT 251 QGraphicsEffect::ChangeFlags flags;
260 #endif //QT_NO_GRAPHICSEFFECT 265 #ifndef QT_NO_GRAPHICSEFFECT 268 #endif //QT_NO_GRAPHICSEFFECT 273 if (needSortTopLevelItems) {
275 topLevelSequentialOrdering =
false;
276 needSortTopLevelItems =
false;
280 void ensureSequentialTopLevelSiblingIndexes();
284 void setFont_helper(
const QFont &font);
286 void updateFont(
const QFont &font);
288 void setPalette_helper(
const QPalette &palette);
289 void resolvePalette();
290 void updatePalette(
const QPalette &palette);
297 int findClosestTouchPointId(
const QPointF &scenePos);
300 void enableTouchEventsOnViews();
303 #ifndef QT_NO_GESTURES 315 void cancelGesturesForChildren(
QGesture *original);
318 #endif // QT_NO_GESTURES 320 void updateInputMethodSensitivityInViews();
357 #endif // QT_NO_GRAPHICSVIEW The QMultiMap class is a convenience QMap subclass that provides multi-valued maps.
quint32 processDirtyItemsEmitted
The QPainter class performs low-level painting on widgets and other paint devices.
QRectF growingItemsBoundingRect
quint32 dirtyGrowingItemsBoundingRect
QMap< int, QGraphicsItem * > itemForTouchPointId
static QRectF adjustedItemBoundingRect(const QGraphicsItem *item)
QMap< Qt::MouseButton, QPoint > mouseGrabberButtonDownScreenPos
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items...
QList< QGraphicsItem * > keyboardGrabberItems
quint32 holesInTopLevelSiblingIndex
static QRectF adjustedItemEffectiveBoundingRect(const QGraphicsItem *item)
#define QT_END_NAMESPACE
This macro expands to.
QPointer< QWidget > widget
virtual void sourceChanged(ChangeFlags flags)
This virtual function is called by QGraphicsEffect to notify the effect that the source has changed...
static void _q_adjustRect(QRectF *rect)
QScopedPointer< QGraphicsItemPrivate > d_ptr
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
virtual QRectF boundingRect() const =0
This pure virtual function defines the outer bounds of the item as a rectangle; all painting must be ...
QGraphicsItem * focusItem
The QPointF class defines a point in the plane using floating point precision.
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
quint32 allItemsIgnoreHoverEvents
quint32 allItemsIgnoreTouchEvents
iterator begin()
Returns an STL-style iterator pointing to the first item in the list.
bool qt_notclosestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2)
QList< QGraphicsItem * > modalPanels
quint32 notifyInvalidated
QList< QGraphicsItem * > cachedItemsUnderMouse
QVector< QGraphicsItem * > unpolishedItems
QGraphicsSceneIndex * index
QStyleOptionGraphicsItem styleOptionTmp
The QHash class is a template class that provides a hash-table-based dictionary.
QSet< QGraphicsItem * > scenePosItems
The QVector class is a template class that provides a dynamic array.
QMap< Qt::MouseButton, QPointF > mouseGrabberButtonDownScenePos
QSet< QGraphicsItem * > selectedItems
QList< QGraphicsView * > views
QGraphicsItem * passiveFocusItem
static const QRectF boundingRect(const QPointF *points, int pointCount)
QGraphicsItem * dragDropItem
#define QT_BEGIN_NAMESPACE
This macro expands to.
QGraphicsWidget * enterWidget
The QGestureEvent class provides the description of triggered gestures.
The QRectF class defines a rectangle in the plane using floating point precision. ...
QList< QGraphicsItem * > mouseGrabberItems
int childExplicitActivation
iterator end()
Returns an STL-style iterator pointing to the imaginary item after the last item in the list...
quint32 fullUpdatePending
quint32 paintedViewBoundingRectsNeedRepaint
qreal height() const
Returns the height of the rectangle.
const T & at(int i) const
Returns the item at index position i in the list.
QGraphicsEffect * graphicsEffect
QPointF lastSceneMousePos
qreal width() const
Returns the width of the rectangle.
The QRegion class specifies a clip region for a painter.
The QGraphicsSceneIndex class provides a base class to implement a custom indexing algorithm for disc...
Qt::DropAction lastDropAction
QList< QGraphicsObject * > cachedTargetItems
QHash< Qt::GestureType, int > grabbedGestures
void qSort(RandomAccessIterator start, RandomAccessIterator end)
QMap< Qt::MouseButton, QPointF > mouseGrabberButtonDownPos
int processDirtyItemsIndex
QGraphicsItem * lastActivePanel
The QBrush class defines the fill pattern of shapes drawn by QPainter.
QGraphicsWidget * tabFocusFirst
#define Q_DECLARE_PUBLIC(Class)
QMap< QGraphicsItem *, QPointF > movingItemsInitialPositions
quint32 notifyBoundingRectChanged
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...
Type
This enum type defines the valid event types in Qt.
QList< QGraphicsItem * > topLevelItems
quint32 needSortTopLevelItems
The QFont class specifies a font used for drawing text.
The QGesture class represents a gesture, containing properties that describe the corresponding user i...
QHash< QGesture *, QGraphicsObject * > gestureTargets
quint32 calledEmitUpdated
quint32 topLevelSequentialOrdering
void adjust(qreal x1, qreal y1, qreal x2, qreal y2)
Adds dx1, dy1, dx2 and dy2 respectively to the existing coordinates of the rectangle.
QList< QGraphicsItem * > hoverItems
quint32 allItemsUseDefaultCursor
The QPoint class defines a point in the plane using integer precision.
int size() const
Returns the number of items in the list.
The QStyle class is an abstract base class that encapsulates the look and feel of a GUI...
quint32 scenePosDescendantsUpdatePending
QHash< QGraphicsObject *, QSet< QGesture * > > cachedItemGestures
void ensureSortedTopLevelItems()
#define Q_AUTOTEST_EXPORT
QFuture< void > filter(Sequence &sequence, FilterFunction filterFunction)
ItemIndexMethod
This enum describes the indexing algorithms QGraphicsScene provides for managing positional informati...
QGraphicsItem * lastMouseGrabberItem
static void mouseEvent(MouseAction action, QWidget *widget, Qt::MouseButton button, Qt::KeyboardModifiers stateKey, QPoint pos, int delay=-1)
static const QGraphicsItemPrivate * get(const QGraphicsItem *item)
QMap< int, QTouchEvent::TouchPoint > sceneCurrentTouchPoints
quint32 painterStateProtection
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
QList< QRectF > updatedRects
The QTouchEvent class contains parameters that describe a touch event.
QTouchEventSequence touchEvent(QWidget *widget=0, QTouchEvent::DeviceType deviceType=QTouchEvent::TouchScreen)
Creates and returns a QTouchEventSequence for the device deviceType to simulate events for widget...
QGraphicsItem * lastFocusItem
QList< QGraphicsItem * > children
PanelModality
This enum specifies the behavior of a modal panel.
The QGraphicsObject class provides a base class for all graphics items that require signals...
QPainterPath selectionArea
The QEvent class is the base class of all event classes.
The QStyleOptionGraphicsItem class is used to describe the parameters needed to draw a QGraphicsItem...
void resetDirtyItem(QGraphicsItem *item, bool recursive=false)
QGraphicsItem * activePanel
QMultiMap< QGraphicsItem *, QGraphicsItem * > sceneEventFilters
QHash< QGraphicsObject *, QSet< QGesture * > > cachedAlreadyDeliveredGestures
QGraphicsScene::ItemIndexMethod indexMethod
QList< QGraphicsWidget * > popupWidgets
The QGraphicsSceneHoverEvent class provides hover events in the graphics view framework.
quint32 lastMouseGrabberItemHasImplicitMouseGrab
The QPalette class contains color groups for each widget state.