Qt 4.8
Public Functions | Public Variables | List of all members
QGraphicsPixmapItemPrivate Class Reference
Inheritance diagram for QGraphicsPixmapItemPrivate:
QGraphicsItemPrivate

Public Functions

 QGraphicsPixmapItemPrivate ()
 
void updateShape ()
 
- Public Functions inherited from QGraphicsItemPrivate
void addChild (QGraphicsItem *child)
 QGraphicsScenePrivate::registerTopLevelItem(). More...
 
void appendGraphicsTransform (QGraphicsTransform *t)
 
qreal calcEffectiveOpacity () const
 
void childrenBoundingRectHelper (QTransform *x, QRectF *rect, QGraphicsItem *topMostEffectItem)
 Returns the bounding rect of this item's children (excluding itself). More...
 
bool childrenClippedToShape () const
 
bool childrenCombineOpacity () const
 
QDeclarativeListProperty< QGraphicsObjectchildrenList ()
 Returns a list of this item's children. More...
 
void clearFocusHelper (bool giveFocusToParent)
 
void clearSubFocus (QGraphicsItem *rootItem=0, QGraphicsItem *stopItem=0)
 
qreal combineOpacityFromParent (qreal parentOpacity) const
 
void combineTransformFromParent (QTransform *x, const QTransform *viewTransform=0) const
 Combines this item's position and transform onto transform. More...
 
void combineTransformToParent (QTransform *x, const QTransform *viewTransform=0) const
 Combines this item's position and transform onto transform. More...
 
int depth () const
 
bool discardUpdateRequest (bool ignoreVisibleBit=false, bool ignoreDirtyBit=false, bool ignoreOpacity=false) const
 Returns true if we can discard an update request; otherwise false. More...
 
QRectF effectiveBoundingRect (QGraphicsItem *topMostEffectItem=0) const
 Returns the effective bounding rect of the item. More...
 
QRectF effectiveBoundingRect (const QRectF &rect) const
 Returns the effective bounding rect of the given item space rect. More...
 
qreal effectiveOpacity () const
 
void ensureSceneTransform ()
 
void ensureSceneTransformRecursive (QGraphicsItem **topMostDirtyItem)
 
void ensureSequentialSiblingIndex ()
 Ensures that the list of children is sorted by insertion order, and that the siblingIndexes are packed (no gaps), and start at 0. More...
 
void ensureSortedChildren ()
 
QVariant extra (Extra type) const
 
QGraphicsItemCacheextraItemCache () const
 
virtual void focusScopeItemChange (bool isSubFocusItem)
 Subclasses can reimplement this function to be notified when an item becomes a focusScopeItem (or is no longer a focusScopeItem). More...
 
QPointF genericMapFromScene (const QPointF &pos, const QWidget *viewport) const
 Maps the point pos from scene to item coordinates. More...
 
bool hasTranslateOnlySceneTransform ()
 
virtual qreal height () const
 
void initStyleOption (QStyleOptionGraphicsItem *option, const QTransform &worldTransform, const QRegion &exposedRegion, bool allItems=false) const
 
virtual QVariant inputMethodQueryHelper (Qt::InputMethodQuery query) const
 This helper function helped us add input method query support in Qt 4. More...
 
void invalidateChildGraphicsEffectsRecursively (InvalidateReason reason)
 
void invalidateChildrenSceneTransform ()
 
void invalidateDepthRecursively ()
 
void invalidateParentGraphicsEffectsRecursively ()
 
bool isFullyTransparent () const
 
bool isInvisible () const
 
bool isOpacityNull () const
 
virtual bool isProxyWidget () const
 
bool itemIsUntransformable () const
 
void markParentDirty (bool updateBoundingRect=false)
 
QGraphicsItemCachemaybeExtraItemCache () const
 
void prependGraphicsTransform (QGraphicsTransform *t)
 
 QGraphicsItemPrivate ()
 
void remapItemPos (QEvent *event, QGraphicsItem *item)
 Maps any item pos properties of event to item's coordinate system. More...
 
void removeChild (QGraphicsItem *child)
 QGraphicsScenePrivate::unregisterTopLevelItem(). More...
 
void removeExtraItemCache ()
 
void resetFocusProxy ()
 Sets the focusProxy pointer to 0 for all items that have this item as their focusProxy. More...
 
virtual void resetHeight ()
 
virtual void resetWidth ()
 
void resolveDepth ()
 Resolves the stacking depth of this object and all its ancestors. More...
 
virtual void resolveFont (uint inheritedMask)
 
virtual void resolvePalette (uint inheritedMask)
 
QRectF sceneEffectiveBoundingRect () const
 Returns the effective bounding rect of this item in scene coordinates, by combining sceneTransform() with boundingRect(), taking into account the effect that the item might have. More...
 
void sendScenePosChange ()
 
void setEnabledHelper (bool newEnabled, bool explicitly, bool update=true)
 Sets this item's visibility to newEnabled. More...
 
void setExtra (Extra type, const QVariant &value)
 
void setFocusHelper (Qt::FocusReason focusReason, bool climb, bool focusFromHide)
 
virtual void setHeight (qreal)
 
void setIsMemberOfGroup (bool enabled)
 Propagates item group membership. More...
 
void setParentItemHelper (QGraphicsItem *parent, const QVariant *newParentVariant, const QVariant *thisPointerVariant)
 Make sure not to trigger any pure virtual function calls (e. More...
 
virtual void setPosHelper (const QPointF &pos)
 Sets the position pos. More...
 
void setSubFocus (QGraphicsItem *rootItem=0, QGraphicsItem *stopItem=0)
 
void setTransformHelper (const QTransform &transform)
 Sets the transform transform. More...
 
void setVisibleHelper (bool newVisible, bool explicitly, bool update=true)
 Sets this item's visibility to newVisible. More...
 
virtual void setWidth (qreal)
 
virtual void siblingOrderChange ()
 Subclasses can reimplement this function to be notified when its siblingIndex order is changed. More...
 
virtual void subFocusItemChange ()
 Subclasses can reimplement this function to be notified when subFocusItem changes. More...
 
virtual void transformChanged ()
 
QTransform transformToParent () const
 
void unsetExtra (Extra type)
 
void updateAncestorFlag (QGraphicsItem::GraphicsItemFlag childFlag, AncestorFlag flag=NoFlag, bool enabled=false, bool root=true)
 Propagates the ancestor flag flag with value enabled to all this item's children. More...
 
void updateAncestorFlags ()
 
void updateChildWithGraphicsEffectFlagRecursively ()
 
void updatePaintedViewBoundingRects (bool updateChildren)
 
virtual void updateSceneTransformFromParent ()
 
virtual qreal width () const
 
virtual ~QGraphicsItemPrivate ()
 

Public Variables

bool hasShape
 
QPointF offset
 
QPixmap pixmap
 
QPainterPath shape
 
QGraphicsPixmapItem::ShapeMode shapeMode
 
Qt::TransformationMode transformationMode
 
- Public Variables inherited from QGraphicsItemPrivate
quint32 acceptDrops: 1
 
quint32 acceptedMouseButtons: 5
 
quint32 acceptedTouchBeginEvent: 1
 
quint32 acceptsHover: 1
 
quint32 acceptTouchEvents: 1
 
quint32 allChildrenDirty: 1
 
quint32 ancestorFlags: 4
 
quint32 cacheMode: 2
 
QList< QGraphicsItem * > children
 
QRectF childrenBoundingRect
 
quint32 dirty: 1
 
quint32 dirtyChildren: 1
 
quint32 dirtyChildrenBoundingRect: 1
 
quint32 dirtySceneTransform: 1
 
quint32 enabled: 1
 
quint32 explicitActivate: 1
 
quint32 explicitlyDisabled: 1
 
quint32 explicitlyHidden: 1
 
QList< ExtraStructextras
 
quint32 filtersDescendantEvents: 1
 
quint32 flags: 19
 
QGraphicsItemfocusProxy
 
QList< QGraphicsItem ** > focusProxyRefs
 
QGraphicsItemfocusScopeItem
 
quint32 fullUpdatePending: 1
 
quint32 geometryChanged: 1
 
QMap< Qt::GestureType, Qt::GestureFlags > gestureContext
 
int globalStackingOrder
 
QGraphicsEffectgraphicsEffect
 
quint32 handlesChildEvents: 1
 
quint32 hasBoundingRegionGranularity: 1
 
quint32 hasCursor: 1
 
quint32 holesInSiblingIndex: 1
 
quint32 ignoreOpacity: 1
 
quint32 ignoreVisible: 1
 
Qt::InputMethodHints imHints
 
quint32 inDestructor: 1
 
int index
 
quint32 inSetPosHelper: 1
 
quint32 isDeclarativeItem: 1
 
quint32 isMemberOfGroup: 1
 
quint32 isObject: 1
 
quint32 isWidget: 1
 
int itemDepth
 
quint32 itemDiscovered: 1
 
quint32 localCollisionHack: 1
 
quint32 mayHaveChildWithGraphicsEffect: 1
 
quint32 mouseSetsFocus: 1
 
quint32 needSortChildren: 1
 
QRectF needsRepaint
 
quint32 notifyBoundingRectChanged: 1
 
quint32 notifyInvalidated: 1
 
qreal opacity
 
quint32 padding: 21
 
QMap< QWidget *, QRectpaintedViewBoundingRects
 
quint32 paintedViewBoundingRectsNeedRepaint: 1
 
QGraphicsItem::PanelModality panelModality
 
QGraphicsItemparent
 
quint32 pendingPolish: 1
 
QPointF pos
 
QGraphicsItemq_ptr
 
QGraphicsScenescene
 
quint32 scenePosDescendants: 1
 
QTransform sceneTransform
 
quint32 sceneTransformTranslateOnly: 1
 
quint32 selected: 1
 
quint32 sendParentChangeNotification: 1
 
quint32 sequentialOrdering: 1
 
int siblingIndex
 
QGraphicsItemsubFocusItem
 
TransformDatatransformData
 
quint32 updateDueToGraphicsEffect: 1
 
quint32 visible: 1
 
quint32 wantsActive: 1
 
qreal z
 

Additional Inherited Members

- Public Types inherited from QGraphicsItemPrivate
enum  AncestorFlag {
  NoFlag = 0, AncestorHandlesChildEvents = 0x1, AncestorClipsChildren = 0x2, AncestorIgnoresTransformations = 0x4,
  AncestorFiltersChildEvents = 0x8
}
 
enum  Extra {
  ExtraToolTip, ExtraCursor, ExtraCacheData, ExtraMaxDeviceCoordCacheSize,
  ExtraBoundingRegionGranularity
}
 
enum  InvalidateReason { OpacityChanged }
 
- Static Public Functions inherited from QGraphicsItemPrivate
static void children_append (QDeclarativeListProperty< QGraphicsObject > *list, QGraphicsObject *item)
 
static QGraphicsObjectchildren_at (QDeclarativeListProperty< QGraphicsObject > *list, int)
 
static void children_clear (QDeclarativeListProperty< QGraphicsObject > *list)
 
static int children_count (QDeclarativeListProperty< QGraphicsObject > *list)
 
static const QGraphicsItemPrivateget (const QGraphicsItem *item)
 
static QGraphicsItemPrivateget (QGraphicsItem *item)
 
static bool insertionOrder (QGraphicsItem *a, QGraphicsItem *b)
 
static bool isOpacityNull (qreal opacity)
 
static bool movableAncestorIsSelected (const QGraphicsItem *item)
 

Detailed Description

Definition at line 10050 of file qgraphicsitem.cpp.

Constructors and Destructors

◆ QGraphicsPixmapItemPrivate()

QGraphicsPixmapItemPrivate::QGraphicsPixmapItemPrivate ( )
inline

Functions

◆ updateShape()

void QGraphicsPixmapItemPrivate::updateShape ( )
inline

Definition at line 10067 of file qgraphicsitem.cpp.

Referenced by QGraphicsPixmapItem::shape().

10068  {
10069  shape = QPainterPath();
10070  switch (shapeMode) {
10072  QBitmap mask = pixmap.mask();
10073  if (!mask.isNull()) {
10074  shape = qt_regionToPath(QRegion(mask).translated(offset.toPoint()));
10075  break;
10076  }
10077  // FALL THROUGH
10078  }
10081  break;
10083 #ifndef QT_NO_IMAGE_HEURISTIC_MASK
10085 #else
10087 #endif
10088  break;
10089  }
10090  }
QGraphicsPixmapItem::ShapeMode shapeMode
int width() const
Returns the width of the pixmap.
Definition: qpixmap.cpp:630
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
Definition: qpainterpath.h:67
qreal x() const
Returns the x-coordinate of this point.
Definition: qpoint.h:282
The QBitmap class provides monochrome (1-bit depth) pixmaps.
Definition: qbitmap.h:55
The QRectF class defines a rectangle in the plane using floating point precision. ...
Definition: qrect.h:511
void addRect(const QRectF &rect)
Adds the given rectangle to this path as a closed subpath.
The QRegion class specifies a clip region for a painter.
Definition: qregion.h:68
QBitmap mask() const
Extracts a bitmap mask from the pixmap&#39;s alpha channel.
Definition: qpixmap.cpp:2077
QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
Definition: qpoint.h:376
qreal y() const
Returns the y-coordinate of this point.
Definition: qpoint.h:287
Q_AUTOTEST_EXPORT QPainterPath qt_regionToPath(const QRegion &region)
Definition: qregion.cpp:1160
int height() const
Returns the height of the pixmap.
Definition: qpixmap.cpp:645
bool isNull() const
Returns true if this is a null pixmap; otherwise returns false.
Definition: qpixmap.cpp:615
QBitmap createHeuristicMask(bool clipTight=true) const
Creates and returns a heuristic mask for this pixmap.
Definition: qpixmap.cpp:864

Properties

◆ hasShape

bool QGraphicsPixmapItemPrivate::hasShape

Definition at line 10065 of file qgraphicsitem.cpp.

Referenced by QGraphicsPixmapItem::shape().

◆ offset

QPointF QGraphicsPixmapItemPrivate::offset

Definition at line 10062 of file qgraphicsitem.cpp.

◆ pixmap

QPixmap QGraphicsPixmapItemPrivate::pixmap

Definition at line 10060 of file qgraphicsitem.cpp.

◆ shape

QPainterPath QGraphicsPixmapItemPrivate::shape

Definition at line 10064 of file qgraphicsitem.cpp.

◆ shapeMode

QGraphicsPixmapItem::ShapeMode QGraphicsPixmapItemPrivate::shapeMode

Definition at line 10063 of file qgraphicsitem.cpp.

◆ transformationMode

Qt::TransformationMode QGraphicsPixmapItemPrivate::transformationMode

Definition at line 10061 of file qgraphicsitem.cpp.


The documentation for this class was generated from the following file: