5#ifndef QGRAPHICSTRANSFORM_H
6#define QGRAPHICSTRANSFORM_H
8#include <QtWidgets/qtwidgetsglobal.h>
9#include <QtCore/QObject>
10#include <QtGui/QVector3D>
11#include <QtGui/QTransform>
12#include <QtGui/QMatrix4x4>
14QT_REQUIRE_CONFIG(graphicsview);
25 QGraphicsTransform(QObject *parent =
nullptr);
26 ~QGraphicsTransform();
28 virtual void applyTo(QMatrix4x4 *matrix)
const = 0;
34 QGraphicsTransform(QGraphicsTransformPrivate &p, QObject *parent);
37 friend class QGraphicsItem;
38 friend class QGraphicsItemPrivate;
39 Q_DECLARE_PRIVATE(QGraphicsTransform)
48 Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
49 Q_PROPERTY(qreal xScale READ xScale WRITE setXScale NOTIFY xScaleChanged)
50 Q_PROPERTY(qreal yScale READ yScale WRITE setYScale NOTIFY yScaleChanged)
51 Q_PROPERTY(qreal zScale READ zScale WRITE setZScale NOTIFY zScaleChanged)
53 QGraphicsScale(QObject *parent =
nullptr);
56 QVector3D origin()
const;
57 void setOrigin(
const QVector3D &point);
60 void setXScale(qreal);
63 void setYScale(qreal);
66 void setZScale(qreal);
68 void applyTo(QMatrix4x4 *matrix)
const override;
78 Q_DECLARE_PRIVATE(QGraphicsScale)
87 Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
88 Q_PROPERTY(qreal angle READ angle WRITE setAngle NOTIFY angleChanged)
89 Q_PROPERTY(QVector3D axis READ axis WRITE setAxis NOTIFY axisChanged)
91 QGraphicsRotation(QObject *parent =
nullptr);
94 QVector3D origin()
const;
95 void setOrigin(
const QVector3D &point);
100 QVector3D axis()
const;
101 void setAxis(
const QVector3D &axis);
102 void setAxis(Qt::Axis axis);
104 void applyTo(QMatrix4x4 *matrix)
const override;
107 void originChanged();
112 Q_DECLARE_PRIVATE(QGraphicsRotation)
The QAbstractGraphicsShapeItem class provides a common base for all path items.
The QGraphicsEllipseItem class provides an ellipse item that you can add to a QGraphicsScene.
QHash< QPaintDevice *, DeviceData > deviceData
QHash< const QGraphicsItem *, QMap< int, QVariant > > data
The QGraphicsItemGroup class provides a container that treats a group of items as a single item.
quint32 localCollisionHack
virtual ~QGraphicsItemPrivate()
bool isOpacityNull() const
void updateChildWithGraphicsEffectFlagRecursively()
Returns a pointer to this item's effect if it has one; otherwise \nullptr.
void sendScenePosChange()
QGraphicsItem * subFocusItem
void setFocusHelper(Qt::FocusReason focusReason, bool climb, bool focusFromHide)
void invalidateChildrenSceneTransform()
virtual void setPosHelper(const QPointF &pos)
QVariant extra(Extra type) const
quint32 dirtySceneTransform
static bool insertionOrder(QGraphicsItem *a, QGraphicsItem *b)
Qt::InputMethodHints imHints
void invalidateDepthRecursively()
QList< QGraphicsItem ** > focusProxyRefs
QTransform transformToParent() const
virtual void focusScopeItemChange(bool isSubFocusItem)
void initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform, const QRegion &exposedRegion, bool allItems=false) const
QGraphicsEffect * graphicsEffect
QGraphicsItem * focusProxy
void markParentDirty(bool updateBoundingRect=false)
QGraphicsItem * focusScopeItem
void setEnabledHelper(bool newEnabled, bool explicitly, bool update=true)
void setSubFocus(QGraphicsItem *rootItem=nullptr, QGraphicsItem *stopItem=nullptr)
quint32 explicitlyDisabled
void combineTransformToParent(QTransform *x, const QTransform *viewTransform=nullptr) const
quint32 notifyInvalidated
QMap< Qt::GestureType, Qt::GestureFlags > gestureContext
bool itemIsUntransformable() const
quint32 filtersDescendantEvents
QList< ExtraStruct > extras
quint32 mayHaveChildWithGraphicsEffect
quint32 acceptedMouseButtons
quint32 dirtyChildrenBoundingRect
void updateAncestorFlag(QGraphicsItem::GraphicsItemFlag childFlag, AncestorFlag flag=NoFlag, bool enabled=false, bool root=true)
bool discardUpdateRequest(bool ignoreVisibleBit=false, bool ignoreDirtyBit=false, bool ignoreOpacity=false) const
void combineTransformFromParent(QTransform *x, const QTransform *viewTransform=nullptr) const
static QGraphicsItemPrivate * get(QGraphicsItem *item)
virtual void resetWidth()
QGraphicsItem::PanelModality panelModality
void updateAncestorFlags()
virtual void transformChanged()
bool childrenCombineOpacity() const
void appendGraphicsTransform(QGraphicsTransform *t)
void clearSubFocus(QGraphicsItem *rootItem=nullptr, QGraphicsItem *stopItem=nullptr)
void ensureSceneTransform()
void setTransformHelper(const QTransform &transform)
void ensureSceneTransformRecursive(QGraphicsItem **topMostDirtyItem)
void ensureSequentialSiblingIndex()
void removeChild(QGraphicsItem *child)
@ AncestorContainsChildren
@ AncestorFiltersChildEvents
@ AncestorHandlesChildEvents
@ AncestorIgnoresTransformations
quint32 updateDueToGraphicsEffect
QRectF sceneEffectiveBoundingRect() const
quint32 hasBoundingRegionGranularity
quint32 acceptedTouchBeginEvent
quint32 sceneTransformTranslateOnly
void remapItemPos(QEvent *event, QGraphicsItem *item)
void clearFocusHelper(bool giveFocusToParent, bool hiddenByParentPanel)
static bool movableAncestorIsSelected(const QGraphicsItem *item)
quint32 sendParentChangeNotification
QRectF effectiveBoundingRect(const QRectF &rect) const
QRectF effectiveBoundingRect(QGraphicsItem *topMostEffectItem=nullptr) const
quint32 scenePosDescendants
void updatePaintedViewBoundingRects(bool updateChildren)
bool isFullyTransparent() const
quint32 acceptTouchEvents
bool childrenClippedToShape() const
quint32 sequentialOrdering
virtual void updateSceneTransformFromParent()
virtual void siblingOrderChange()
quint32 paintedViewBoundingRectsNeedRepaint
void childrenBoundingRectHelper(QTransform *x, QRectF *rect, QGraphicsItem *topMostEffectItem)
bool hasTranslateOnlySceneTransform()
QRectF childrenBoundingRect
quint32 holesInSiblingIndex
void removeExtraItemCache()
virtual void resolvePalette(uint inheritedMask)
virtual void subFocusItemChange()
qreal effectiveOpacity() const
quint32 handlesChildEvents
quint32 notifyBoundingRectChanged
TransformData * transformData
QGraphicsItemCache * maybeExtraItemCache() const
void prependGraphicsTransform(QGraphicsTransform *t)
static const QGraphicsItemPrivate * get(const QGraphicsItem *item)
QTransform sceneTransform
virtual void resetHeight()
QHash< QWidget *, QRect > paintedViewBoundingRects
QGraphicsItemCache * extraItemCache() const
virtual void resolveFont(uint inheritedMask)
qreal combineOpacityFromParent(qreal parentOpacity) const
void unsetExtra(Extra type)
qreal calcEffectiveOpacity() const
void addChild(QGraphicsItem *child)
void setIsMemberOfGroup(bool enabled)
virtual bool isProxyWidget() const
void ensureSortedChildren()
void setVisibleHelper(bool newVisible, bool explicitly, bool update=true, bool hiddenByPanel=false)
static bool isOpacityNull(qreal opacity)
virtual void setHeight(qreal)
quint32 fullUpdatePending
The QGraphicsItem class is the base class for all graphical items in a QGraphicsScene.
The QGraphicsLineItem class provides a line item that you can add to a QGraphicsScene.
The QGraphicsObject class provides a base class for all graphics items that require signals,...
The QGraphicsPathItem class provides a path item that you can add to a QGraphicsScene.
QGraphicsPixmapItem::ShapeMode shapeMode
Qt::TransformationMode transformationMode
The QGraphicsPixmapItem class provides a pixmap item that you can add to a QGraphicsScene.
The QGraphicsPolygonItem class provides a polygon item that you can add to a QGraphicsScene.
The QGraphicsRectItem class provides a rectangle item that you can add to a QGraphicsScene.
The QGraphicsRotation class provides a rotation transformation around a given axis.
The QGraphicsScale class provides a scale transformation.
The QGraphicsSceneDragDropEvent class provides events for drag and drop in the graphics view framewor...
The QGraphicsSceneEvent class provides a base class for all graphics view related events.
The QGraphicsSceneHelpEvent class provides events when a tooltip is requested.
The QGraphicsSceneHoverEvent class provides hover events in the graphics view framework.
The QGraphicsSceneMouseEvent class provides mouse events in the graphics view framework.
The QGraphicsSceneMoveEvent class provides events for widget moving in the graphics view framework.
The QGraphicsSceneResizeEvent class provides events for widget resizing in the graphics view framewor...
The QGraphicsSceneWheelEvent class provides wheel events in the graphics view framework.
The QGraphicsScene class provides a surface for managing a large number of 2D graphical items.
void updateBoundingRect()
The QGraphicsSimpleTextItem class provides a simple text item that you can add to a QGraphicsScene.
void _q_updateBoundingRect(const QSizeF &)
void _q_ensureVisible(QRectF)
QPointF controlOffset() const
QGraphicsTextItemPrivate()
bool _q_mouseOnEdge(QGraphicsSceneMouseEvent *)
QWidgetTextControl * control
QWidgetTextControl * textControl() const
void sendControlEvent(QEvent *e)
The QGraphicsTextItem class provides a text item that you can add to a QGraphicsScene to display form...
The QGraphicsView class provides a widget for displaying the contents of a QGraphicsScene.
qreal width() const
Returns the width of the generated outlines.
void setWidth(qreal width)
Sets the width of the generated outline painter path to width.
\inmodule QtCore\reentrant
The QPolygonF class provides a list of points using floating point precision.
Combined button and popup list for selecting options.
QT_REQUIRE_CONFIG(animation)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
static void formatGraphicsItemHelper(QDebug debug, const QGraphicsItem *item)
bool _qt_movableAncestorIsSelected(const QGraphicsItem *item)
static QRectF setupTextLayout(QTextLayout *layout)
QDebug operator<<(QDebug debug, const QGraphicsObject *item)
static QPainterPath qt_graphicsItem_shapeFromPath(const QPainterPath &path, const QPen &pen)
QDebug operator<<(QDebug debug, const QGraphicsItem *item)
static bool qt_QGraphicsItem_isObscured(const QGraphicsItem *item, const QGraphicsItem *other, const QRectF &rect)
bool qt_closestItemLast(const QGraphicsItem *item1, const QGraphicsItem *item2)
Returns true if item2 is on top of item1.
bool qt_closestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2)
bool qt_notclosestLeaf(const QGraphicsItem *item1, const QGraphicsItem *item2)
bool qt_closestItemFirst(const QGraphicsItem *item1, const QGraphicsItem *item2)
Returns true if item1 is on top of item2.
QT_REQUIRE_CONFIG(graphicsview)
static QRectF adjustedItemBoundingRect(const QGraphicsItem *item)
static QRectF adjustedItemEffectiveBoundingRect(const QGraphicsItem *item)
static void _q_adjustRect(QRectF *rect)
QDebug operator<<(QDebug debug, QIODevice::OpenMode modes)
Q_DECLARE_TYPEINFO(QObjectPrivate::ConnectionList, Q_RELOCATABLE_TYPE)
const QTransform * transformPtr
const QTransform * effectTransform
quint32 wasDirtySceneTransform
QStyleOptionGraphicsItem * option
const QTransform * viewTransform