![]() |
Qt 6.x
The Qt SDK
|
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}. More...
#include <qquickitem.h>
Inherits QObject, and QQmlParserStatus.
Inherited by QDeclarativeGeoMap, QDeclarativeGeoMapItemBase, QDeclarativeGeoMapItemGroup, QGfxSourceProxy, QQuick3DViewport, QQuickAnimatedSprite, QQuickBasicBusyIndicator, QQuickBasicProgressBar, QQuickCanvasItem, QQuickColorInputs, QQuickContentItem, QQuickControl, QQuickDropArea, QQuickFlickable, QQuickFlickableContentItem, QQuickFlipable, QQuickFocusScope, QQuickFramebufferObject, QQuickIconLabel, QQuickImplicitSizeItem, QQuickLayout, QQuickLayoutItemProxy, QQuickMaterialBusyIndicator, QQuickMaterialProgressBar, QQuickMaterialRipple, QQuickMouseArea, QQuickMultiEffect, QQuickMultiPointTouchArea, QQuickOverlay, QQuickPaintedItem, QQuickParticleAffector, QQuickParticleEmitter, QQuickParticlePainter, QQuickParticleSystem, QQuickPathView, QQuickPdfSelection, QQuickPinchArea, QQuickRectangle, QQuickRepeater, QQuickRootItem, QQuickShaderEffect, QQuickShaderEffectSource, QQuickShape, QQuickSpriteSequence, QQuickStyleItem, QQuickTumblerView, QQuickUniversalBusyIndicator, QQuickUniversalProgressBar, QQuickVideoOutput, QWaylandMouseTracker, QWaylandQtShellChrome, and QWaylandQuickItem.
Classes | |
class | ItemChangeData |
\inmodule QtQuick More... | |
struct | UpdatePaintNodeData |
Public Types | |
enum | Flag { ItemClipsChildrenToShape = 0x01 , ItemIsFocusScope = 0x04 , ItemHasContents = 0x08 , ItemAcceptsDrops = 0x10 , ItemIsViewport = 0x20 , ItemObservesViewport = 0x40 } |
enum | ItemChange { ItemChildAddedChange , ItemChildRemovedChange , ItemSceneChange , ItemVisibleHasChanged , ItemParentHasChanged , ItemOpacityHasChanged , ItemActiveFocusHasChanged , ItemRotationHasChanged , ItemAntialiasingHasChanged , ItemDevicePixelRatioHasChanged , ItemEnabledHasChanged } |
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes. More... | |
enum | TransformOrigin { TopLeft , Top , TopRight , Left , Center , Right , BottomLeft , Bottom , BottomRight } |
\variable QQuickItem::ItemChangeData::realValue The numeric value that has changed: \l {QQuickItem::opacity()}{opacity}, \l {QQuickItem::rotation()}{rotation}, or \l {QScreen::devicePixelRatio}{device pixel ratio}. More... | |
Public Slots | |
void | update () |
Schedules a call to updatePaintNode() for this item. | |
![]() | |
void | deleteLater () |
\threadsafe | |
Public Member Functions | |
QQuickItem (QQuickItem *parent=nullptr) | |
Constructs a QQuickItem with the given parent. | |
~QQuickItem () override | |
Destroys the QQuickItem. | |
QQuickWindow * | window () const |
Returns the window in which this item is rendered. | |
QQuickItem * | parentItem () const |
void | setParentItem (QQuickItem *parent) |
void | stackBefore (const QQuickItem *) |
Moves the specified sibling item to the index before this item within the list of children. | |
void | stackAfter (const QQuickItem *) |
Moves the specified sibling item to the index after this item within the list of children. | |
QRectF | childrenRect () |
\qmlpropertygroup QtQuick::Item::childrenRect \qmlproperty real QtQuick::Item::childrenRect.x \qmlproperty real QtQuick::Item::childrenRect.y \qmlproperty real QtQuick::Item::childrenRect.width \qmlproperty real QtQuick::Item::childrenRect.height \readonly | |
QList< QQuickItem * > | childItems () const |
Returns the children of this item. | |
bool | clip () const |
\qmlproperty bool QtQuick::Item::clip This property holds whether clipping is enabled. | |
void | setClip (bool) |
QString | state () const |
\qmlproperty string QtQuick::Item::state | |
void | setState (const QString &) |
qreal | baselineOffset () const |
\qmlproperty int QtQuick::Item::baselineOffset | |
void | setBaselineOffset (qreal) |
QQmlListProperty< QQuickTransform > | transform () |
qreal | x () const |
qreal | y () const |
QPointF | position () const |
void | setX (qreal) |
void | setY (qreal) |
void | setPosition (const QPointF &) |
QBindable< qreal > | bindableX () |
QBindable< qreal > | bindableY () |
qreal | width () const |
void | setWidth (qreal) |
void | resetWidth () |
void | setImplicitWidth (qreal) |
qreal | implicitWidth () const |
Returns the width of the item that is implied by other properties that determine the content. | |
QBindable< qreal > | bindableWidth () |
qreal | height () const |
void | setHeight (qreal) |
void | resetHeight () |
void | setImplicitHeight (qreal) |
qreal | implicitHeight () const |
QBindable< qreal > | bindableHeight () |
QSizeF | size () const |
void | setSize (const QSizeF &size) |
TransformOrigin | transformOrigin () const |
void | setTransformOrigin (TransformOrigin) |
QPointF | transformOriginPoint () const |
void | setTransformOriginPoint (const QPointF &) |
qreal | z () const |
void | setZ (qreal) |
qreal | rotation () const |
void | setRotation (qreal) |
qreal | scale () const |
void | setScale (qreal) |
qreal | opacity () const |
void | setOpacity (qreal) |
bool | isVisible () const |
void | setVisible (bool) |
bool | isEnabled () const |
void | setEnabled (bool) |
bool | smooth () const |
void | setSmooth (bool) |
bool | activeFocusOnTab () const |
\qmlproperty bool QtQuick::Item::activeFocusOnTab | |
void | setActiveFocusOnTab (bool) |
bool | antialiasing () const |
void | setAntialiasing (bool) |
void | resetAntialiasing () |
Flags | flags () const |
Returns the item flags for this item. | |
void | setFlag (Flag flag, bool enabled=true) |
Enables the specified flag for this item if enabled is true; if enabled is false, the flag is disabled. | |
void | setFlags (Flags flags) |
Enables the specified flags for this item. | |
virtual QRectF | boundingRect () const |
Returns the extents of the item in its own coordinate system: a rectangle from {0, 0} to \l width() and \l height(). | |
virtual QRectF | clipRect () const |
Returns the rectangular area within this item that is currently visible in \l viewportItem(), if there is a viewport and the \l ItemObservesViewport flag is set; otherwise, the extents of this item in its own coordinate system: a rectangle from {0, 0} to \l width() and \l height(). | |
QQuickItem * | viewportItem () const |
If the \l ItemObservesViewport flag is set, returns the nearest parent with the \l ItemIsViewport flag. | |
bool | hasActiveFocus () const |
bool | hasFocus () const |
void | setFocus (bool) |
void | setFocus (bool focus, Qt::FocusReason reason) |
bool | isFocusScope () const |
Returns true if this item is a focus scope, and false otherwise. | |
QQuickItem * | scopedFocusItem () const |
If this item is a focus scope, this returns the item in its focus chain that currently has focus. | |
bool | isAncestorOf (const QQuickItem *child) const |
Returns true if this item is an ancestor of child (i.e., if this item is child's parent, or one of child's parent's ancestors). | |
Qt::MouseButtons | acceptedMouseButtons () const |
Returns the mouse buttons accepted by this item. | |
void | setAcceptedMouseButtons (Qt::MouseButtons buttons) |
Sets the mouse buttons accepted by this item to buttons. | |
bool | acceptHoverEvents () const |
Returns whether hover events are accepted by this item. | |
void | setAcceptHoverEvents (bool enabled) |
If enabled is true, this sets the item to accept hover events; otherwise, hover events are not accepted by this item. | |
bool | acceptTouchEvents () const |
Returns whether touch events are accepted by this item. | |
void | setAcceptTouchEvents (bool accept) |
If enabled is true, this sets the item to accept touch events; otherwise, touch events are not accepted by this item. | |
bool | isUnderMouse () const |
void | grabMouse () |
void | ungrabMouse () |
bool | keepMouseGrab () const |
Returns whether mouse input should exclusively remain with this item. | |
void | setKeepMouseGrab (bool) |
Sets whether the mouse input should remain exclusively with this item. | |
bool | filtersChildMouseEvents () const |
Returns whether pointer events intended for this item's children should be filtered through this item. | |
void | setFiltersChildMouseEvents (bool filter) |
Sets whether pointer events intended for this item's children should be filtered through this item. | |
void | grabTouchPoints (const QList< int > &ids) |
void | ungrabTouchPoints () |
bool | keepTouchGrab () const |
Returns whether the touch points grabbed by this item should exclusively remain with this item. | |
void | setKeepTouchGrab (bool) |
Sets whether the touch points grabbed by this item should remain exclusively with this item. | |
Q_REVISION (2, 4) Q_INVOKABLE bool grabToImage(const QJSValue &callback | |
QSharedPointer< QQuickItemGrabResult > | grabToImage (const QSize &targetSize=QSize()) |
Grabs the item into an in-memory image. | |
virtual Q_INVOKABLE bool | contains (const QPointF &point) const |
\qmlmethod bool QtQuick::Item::contains(point point) | |
QObject * | containmentMask () const |
void | setContainmentMask (QObject *mask) |
QTransform | itemTransform (QQuickItem *, bool *) const |
\qmlmethod point QtQuick::Item::mapFromItem(Item item, real x, real y) \qmlmethod point QtQuick::Item::mapFromItem(Item item, point p) \qmlmethod rect QtQuick::Item::mapFromItem(Item item, real x, real y, real width, real height) \qmlmethod rect QtQuick::Item::mapFromItem(Item item, rect r) | |
QPointF | mapToScene (const QPointF &point) const |
Maps the given point in this item's coordinate system to the equivalent point within the scene's coordinate system, and returns the mapped coordinate. | |
QRectF | mapRectToItem (const QQuickItem *item, const QRectF &rect) const |
Maps the given rect in this item's coordinate system to the equivalent rectangular area within item's coordinate system, and returns the mapped rectangle value. | |
QRectF | mapRectToScene (const QRectF &rect) const |
Maps the given rect in this item's coordinate system to the equivalent rectangular area within the scene's coordinate system, and returns the mapped rectangle value. | |
QPointF | mapFromScene (const QPointF &point) const |
Maps the given point in the scene's coordinate system to the equivalent point within this item's coordinate system, and returns the mapped coordinate. | |
QRectF | mapRectFromItem (const QQuickItem *item, const QRectF &rect) const |
Maps the given rect in item's coordinate system to the equivalent rectangular area within this item's coordinate system, and returns the mapped rectangle value. | |
QRectF | mapRectFromScene (const QRectF &rect) const |
Maps the given rect in the scene's coordinate system to the equivalent rectangular area within this item's coordinate system, and returns the mapped rectangle value. | |
void | polish () |
Schedules a polish event for this item. | |
Q_INVOKABLE QPointF | mapFromItem (const QQuickItem *item, const QPointF &point) const |
Maps the given point in item's coordinate system to the equivalent point within this item's coordinate system, and returns the mapped coordinate. | |
Q_INVOKABLE QPointF | mapFromItem (const QQuickItem *item, qreal x, qreal y) |
Q_INVOKABLE QRectF | mapFromItem (const QQuickItem *item, const QRectF &rect) const |
Q_INVOKABLE QRectF | mapFromItem (const QQuickItem *item, qreal x, qreal y, qreal width, qreal height) const |
Q_INVOKABLE QPointF | mapToItem (const QQuickItem *item, const QPointF &point) const |
Maps the given point in this item's coordinate system to the equivalent point within item's coordinate system, and returns the mapped coordinate. | |
Q_INVOKABLE QPointF | mapToItem (const QQuickItem *item, qreal x, qreal y) |
Q_INVOKABLE QRectF | mapToItem (const QQuickItem *item, const QRectF &rect) const |
Q_INVOKABLE QRectF | mapToItem (const QQuickItem *item, qreal x, qreal y, qreal width, qreal height) const |
Q_REVISION (2, 7) Q_INVOKABLE QPointF mapFromGlobal(qreal x | |
Q_REVISION (2, 7) Q_INVOKABLE QPointF mapFromGlobal(const QPointF &point) const | |
Q_REVISION (2, 7) Q_INVOKABLE QPointF mapToGlobal(qreal x | |
Q_REVISION (2, 7) Q_INVOKABLE QPointF mapToGlobal(const QPointF &point) const | |
Q_INVOKABLE void | forceActiveFocus () |
\qmlmethod point QtQuick::Item::mapToItem(Item item, real x, real y) \qmlmethod point QtQuick::Item::mapToItem(Item item, point p) \qmlmethod rect QtQuick::Item::mapToItem(Item item, real x, real y, real width, real height) \qmlmethod rect QtQuick::Item::mapToItem(Item item, rect r) | |
Q_INVOKABLE void | forceActiveFocus (Qt::FocusReason reason) |
\qmlmethod QtQuick::Item::forceActiveFocus(Qt::FocusReason reason) This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Forces active focus on the item with the given reason. | |
Q_REVISION (2, 1) Q_INVOKABLE QQuickItem *nextItemInFocusChain(bool forward | |
Q_INVOKABLE QQuickItem * | childAt (qreal x, qreal y) const |
\qmlmethod QtQuick::Item::childAt(real x, real y) | |
Q_REVISION (6, 3) Q_INVOKABLE void ensurePolished() | |
Q_REVISION (6, 3) Q_INVOKABLE void dumpItemTree() const | |
virtual bool | isTextureProvider () const |
Returns true if this item is a texture provider. | |
virtual QSGTextureProvider * | textureProvider () const |
Returns the texture provider for an item. | |
![]() | |
Q_INVOKABLE | QObject (QObject *parent=nullptr) |
Constructs an object with parent object parent. | |
virtual | ~QObject () |
Destroys the object, deleting all its child objects. | |
virtual bool | event (QEvent *event) |
This virtual function receives events to an object and should return true if the event e was recognized and processed. | |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
Filters events if this object has been installed as an event filter for the watched object. | |
QString | objectName () const |
Q_WEAK_OVERLOAD void | setObjectName (const QString &name) |
Sets the object's name to name. | |
void | setObjectName (QAnyStringView name) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
QBindable< QString > | bindableObjectName () |
bool | isWidgetType () const |
Returns true if the object is a widget; otherwise returns false . | |
bool | isWindowType () const |
Returns true if the object is a window; otherwise returns false . | |
bool | isQuickItemType () const |
Returns true if the object is a QQuickItem; otherwise returns false . | |
bool | signalsBlocked () const noexcept |
Returns true if signals are blocked; otherwise returns false . | |
bool | blockSignals (bool b) noexcept |
If block is true, signals emitted by this object are blocked (i.e., emitting a signal will not invoke anything connected to it). | |
QThread * | thread () const |
Returns the thread in which the object lives. | |
void | moveToThread (QThread *thread) |
Changes the thread affinity for this object and its children. | |
int | startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer) |
This is an overloaded function that will start a timer of type timerType and a timeout of interval milliseconds. | |
int | startTimer (std::chrono::milliseconds time, Qt::TimerType timerType=Qt::CoarseTimer) |
void | killTimer (int id) |
Kills the timer with timer identifier, id. | |
template<typename T > | |
T | findChild (const QString &aName=QString(), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns the child of this object that can be cast into type T and that is called name, or \nullptr if there is no such object. | |
template<typename T > | |
QList< T > | findChildren (const QString &aName, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
Returns all children of this object with the given name that can be cast to type T, or an empty list if there are no such objects. | |
template<typename T > | |
QList< T > | findChildren (Qt::FindChildOptions options=Qt::FindChildrenRecursively) const |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
const QObjectList & | children () const |
Returns a list of child objects. | |
void | setParent (QObject *parent) |
Makes the object a child of parent. | |
void | installEventFilter (QObject *filterObj) |
Installs an event filter filterObj on this object. | |
void | removeEventFilter (QObject *obj) |
Removes an event filter object obj from this object. | |
QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *member, Qt::ConnectionType type=Qt::AutoConnection) const |
bool | disconnect (const char *signal=nullptr, const QObject *receiver=nullptr, const char *member=nullptr) const |
bool | disconnect (const QObject *receiver, const char *member=nullptr) const |
void | dumpObjectTree () const |
Dumps a tree of children to the debug output. | |
void | dumpObjectInfo () const |
Dumps information about signal connections, etc. | |
bool | setProperty (const char *name, const QVariant &value) |
Sets the value of the object's name property to value. | |
bool | setProperty (const char *name, QVariant &&value) |
QVariant | property (const char *name) const |
Returns the value of the object's name property. | |
QList< QByteArray > | dynamicPropertyNames () const |
QBindingStorage * | bindingStorage () |
const QBindingStorage * | bindingStorage () const |
QObject * | parent () const |
Returns a pointer to the parent object. | |
bool | inherits (const char *classname) const |
Returns true if this object is an instance of a class that inherits className or a QObject subclass that inherits className; otherwise returns false . | |
![]() | |
QQmlParserStatus () | |
virtual | ~QQmlParserStatus () |
virtual void | classBegin ()=0 |
Invoked after class creation, but before any properties have been set. | |
virtual void | componentComplete ()=0 |
Invoked after the root component that caused this instantiation has completed construction. | |
Public Attributes | |
const QSize & | targetSize = QSize()) |
qreal y | const |
Protected Member Functions | |
bool | event (QEvent *) override |
\reimp | |
bool | isComponentComplete () const |
Returns true if construction of the QML component is complete; otherwise returns false. | |
virtual void | itemChange (ItemChange, const ItemChangeData &) |
Called when change occurs for this item. | |
virtual void | geometryChange (const QRectF &newGeometry, const QRectF &oldGeometry) |
bool | widthValid () const |
Returns whether the width property has been set explicitly. | |
bool | heightValid () const |
Returns whether the height property has been set explicitly. | |
void | setImplicitSize (qreal, qreal) |
void | classBegin () override |
\reimp Derived classes should call the base class method before adding their own action to perform at classBegin. | |
void | componentComplete () override |
\reimp Derived classes should call the base class method before adding their own actions to perform at componentComplete. | |
virtual void | keyPressEvent (QKeyEvent *event) |
This event handler can be reimplemented in a subclass to receive key press events for an item. | |
virtual void | keyReleaseEvent (QKeyEvent *event) |
This event handler can be reimplemented in a subclass to receive key release events for an item. | |
virtual void | focusInEvent (QFocusEvent *) |
This event handler can be reimplemented in a subclass to receive focus-in events for an item. | |
virtual void | focusOutEvent (QFocusEvent *) |
This event handler can be reimplemented in a subclass to receive focus-out events for an item. | |
virtual void | mousePressEvent (QMouseEvent *event) |
This event handler can be reimplemented in a subclass to receive mouse press events for an item. | |
virtual void | mouseMoveEvent (QMouseEvent *event) |
This event handler can be reimplemented in a subclass to receive mouse move events for an item. | |
virtual void | mouseReleaseEvent (QMouseEvent *event) |
This event handler can be reimplemented in a subclass to receive mouse release events for an item. | |
virtual void | mouseDoubleClickEvent (QMouseEvent *event) |
This event handler can be reimplemented in a subclass to receive mouse double-click events for an item. | |
virtual void | mouseUngrabEvent () |
This event handler can be reimplemented in a subclass to be notified when a mouse ungrab event has occurred on this item. | |
virtual void | touchUngrabEvent () |
This event handler can be reimplemented in a subclass to be notified when a touch ungrab event has occurred on this item. | |
virtual void | touchEvent (QTouchEvent *event) |
This event handler can be reimplemented in a subclass to receive touch events for an item. | |
virtual void | hoverEnterEvent (QHoverEvent *event) |
This event handler can be reimplemented in a subclass to receive hover-enter events for an item. | |
virtual void | hoverMoveEvent (QHoverEvent *event) |
This event handler can be reimplemented in a subclass to receive hover-move events for an item. | |
virtual void | hoverLeaveEvent (QHoverEvent *event) |
This event handler can be reimplemented in a subclass to receive hover-leave events for an item. | |
virtual bool | childMouseEventFilter (QQuickItem *, QEvent *) |
Reimplement this method to filter the pointer events that are received by this item's children. | |
virtual QSGNode * | updatePaintNode (QSGNode *, UpdatePaintNodeData *) |
Called on the render thread when it is time to sync the state of the item with the scene graph. | |
virtual void | releaseResources () |
This function is called when an item should release graphics resources which are not already managed by the nodes returned from QQuickItem::updatePaintNode(). | |
virtual void | updatePolish () |
This function should perform any layout as required for this item. | |
QQuickItem (QQuickItemPrivate &dd, QQuickItem *parent=nullptr) | |
![]() | |
QObject * | sender () const |
Returns a pointer to the object that sent the signal, if called in a slot activated by a signal; otherwise it returns \nullptr. | |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
Returns the number of receivers connected to the signal. | |
bool | isSignalConnected (const QMetaMethod &signal) const |
virtual void | timerEvent (QTimerEvent *event) |
This event handler can be reimplemented in a subclass to receive timer events for the object. | |
virtual void | childEvent (QChildEvent *event) |
This event handler can be reimplemented in a subclass to receive child events. | |
virtual void | customEvent (QEvent *event) |
This event handler can be reimplemented in a subclass to receive custom events. | |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
QObject (QObjectPrivate &dd, QObject *parent=nullptr) | |
Properties | |
QQuickItem * | parent |
\qmlproperty Item QtQuick::Item::parent This property holds the visual parent of the item. | |
qreal | x |
\qmlproperty real QtQuick::Item::x \qmlproperty real QtQuick::Item::y \qmlproperty real QtQuick::Item::width \qmlproperty real QtQuick::Item::height | |
qreal | y |
Defines the item's y position relative to its parent. | |
qreal | z |
\qmlproperty real QtQuick::Item::z | |
qreal | width |
This property holds the width of this item. | |
qreal | height |
This property holds the height of this item. | |
qreal | opacity |
\qmlproperty real QtQuick::Item::opacity | |
bool | enabled |
\qmlproperty bool QtQuick::Item::enabled | |
bool | visible |
\qmlproperty bool QtQuick::Item::visible | |
qreal | rotation |
\qmlproperty real QtQuick::Item::rotation This property holds the rotation of the item in degrees clockwise around its transformOrigin. | |
qreal | scale |
\qmlproperty real QtQuick::Item::scale This property holds the scale factor for this item. | |
TransformOrigin | transformOrigin |
\qmlproperty enumeration QtQuick::Item::transformOrigin This property holds the origin point around which scale and rotation transform. | |
QPointF | transformOriginPoint |
QQmlListProperty< QQuickTransform > | transform |
\qmlproperty list<Transform> QtQuick::Item::transform This property holds the list of transformations to apply. | |
bool | smooth |
\qmlproperty bool QtQuick::Item::smooth | |
bool | antialiasing |
\qmlproperty bool QtQuick::Item::antialiasing | |
qreal | implicitWidth |
qreal | implicitHeight |
QObject * | containmentMask |
\qmlproperty QObject* QtQuick::Item::containmentMask | |
![]() | |
QString | objectName |
the name of this object | |
Friends | |
class | QQuickDeliveryAgentPrivate |
class | QSGRenderer |
class | QAccessibleQuickItem |
class | QQuickAccessibleAttached |
class | QQuickAnchorChanges |
Additional Inherited Members | |
![]() | |
static QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection) |
\threadsafe | |
static QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::ContextTypeForFunctor< Func2 >::ContextType *context, Func2 &&slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, Func2 &&slot) |
static bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *member) |
\threadsafe | |
static bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &member) |
static bool | disconnect (const QMetaObject::Connection &) |
Disconnect a connection. | |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiver, Func2 slot) |
template<typename Func1 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const QObject *receiver, void **zero) |
![]() | |
QScopedPointer< QObjectData > | d_ptr |
![]() | |
template< class T > T | qobject_cast (const QObject *object) |
Returns the given object cast to type T if the object is of type T (or of a subclass); otherwise returns \nullptr. | |
template< typename T > T | qFindChildqFindChildren (const QObject *obj, const QString &name)() |
template< typename T > QList< T > | qFindChildrenqFindChildren (const QObject *obj, const QString &name)() |
QObjectList | |
\macro Q_CLASSINFO(Name, Value) | |
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
\inmodule QtQuick
All visual items in Qt Quick inherit from QQuickItem. Although a QQuickItem instance has no visual appearance, it defines all the attributes that are common across visual items, such as x and y position, width and height, \l {Positioning with Anchors}{anchoring} and key handling support.
You can subclass QQuickItem to provide your own custom visual item that inherits these features.
Definition at line 63 of file qquickitem.h.
enum QQuickItem::Flag |
Enumerator | |
---|---|
ItemClipsChildrenToShape | |
ItemIsFocusScope | |
ItemHasContents | |
ItemAcceptsDrops | |
ItemIsViewport | |
ItemObservesViewport |
Definition at line 128 of file qquickitem.h.
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
\value ItemChildAddedChange A child was added. ItemChangeData::item contains the added child.
\value ItemChildRemovedChange A child was removed. ItemChangeData::item contains the removed child.
\value ItemSceneChange The item was added to or removed from a scene. The QQuickWindow rendering the scene is specified in using ItemChangeData::window. The window parameter is null when the item is removed from a scene.
\value ItemVisibleHasChanged The item's visibility has changed. ItemChangeData::boolValue contains the new visibility.
\value ItemParentHasChanged The item's parent has changed. ItemChangeData::item contains the new parent.
\value ItemOpacityHasChanged The item's opacity has changed. ItemChangeData::realValue contains the new opacity.
\value ItemActiveFocusHasChanged The item's focus has changed. ItemChangeData::boolValue contains whether the item has focus or not.
\value ItemRotationHasChanged The item's rotation has changed. ItemChangeData::realValue contains the new rotation.
\value ItemDevicePixelRatioHasChanged The device pixel ratio of the screen the item is on has changed. ItemChangedData::realValue contains the new device pixel ratio.
\value ItemAntialiasingHasChanged The antialiasing has changed. The current (boolean) value can be found in QQuickItem::antialiasing.
\value ItemEnabledHasChanged The item's enabled state has changed. ItemChangeData::boolValue contains the new enabled state. (since Qt 5.10)
Definition at line 143 of file qquickitem.h.
\variable QQuickItem::ItemChangeData::realValue The numeric value that has changed: \l {QQuickItem::opacity()}{opacity}, \l {QQuickItem::rotation()}{rotation}, or \l {QScreen::devicePixelRatio}{device pixel ratio}.
\variable QQuickItem::ItemChangeData::boolValue The boolean value that has changed: \l {QQuickItem::isVisible()}{visible}, \l {QQuickItem::isEnabled()}{enabled}, \l {QQuickItem::hasActiveFocus()}{activeFocus}, or \l {QQuickItem::antialiasing()}{antialiasing}.
\variable QQuickItem::ItemChangeData::item The item that has been added or removed as a \l{QQuickItem::childItems()}{child}, or the new \l{QQuickItem::parentItem()}{parent}.
\variable QQuickItem::ItemChangeData::window The \l{QQuickWindow}{window} in which the item has been shown, or nullptr
if the item has been removed from a window.
Controls the point about which simple transforms like scale apply.
\value TopLeft The top-left corner of the item. \value Top The center point of the top of the item. \value TopRight The top-right corner of the item. \value Left The left most point of the vertical middle. \value Center The center of the item. \value Right The right most point of the vertical middle. \value BottomLeft The bottom-left corner of the item. \value Bottom The center point of the bottom of the item. \value BottomRight The bottom-right corner of the item.
Enumerator | |
---|---|
TopLeft | |
Top | |
TopRight | |
Left | |
Center | |
Right | |
BottomLeft | |
Bottom | |
BottomRight |
Definition at line 170 of file qquickitem.h.
|
explicit |
Constructs a QQuickItem with the given parent.
The parent
will be used as both the \l {setParentItem()}{visual parent} and the \l QObject parent.
Definition at line 2291 of file qquickitem.cpp.
|
override |
Destroys the QQuickItem.
Definition at line 2310 of file qquickitem.cpp.
References QQuickItemPrivate::AllChanges, QQuickItemChangeListener::anchorPrivate(), child, QQuickAnchorsPrivate::clearItem(), d, QQuickItemPrivate::Destroyed, QQuickTransformPrivate::get(), QQuickAnchorsPrivate::item, QQuickItemChangeListener::itemDestroyed(), QQuickTransformPrivate::items, QQuickItemPrivate::ChangeListener::listener, parentItem(), QList< T >::removeOne(), setParentItem(), and QQuickAnchorsPrivate::update().
|
protected |
Definition at line 2300 of file qquickitem.cpp.
Qt::MouseButtons QQuickItem::acceptedMouseButtons | ( | ) | const |
Returns the mouse buttons accepted by this item.
The default value is Qt::NoButton; that is, no mouse buttons are accepted.
If an item does not accept the mouse button for a particular mouse event, the mouse event will not be delivered to the item and will be delivered to the next item in the item hierarchy instead.
Definition at line 7854 of file qquickitem.cpp.
References d.
Referenced by QQuickMouseArea::acceptedButtons(), clickableItemAtPosition(), QQuickFlickable::filterPointerEvent(), QQuickMouseArea::mouseMoveEvent(), QQuickMouseArea::mousePressEvent(), QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl(), and QQuickMouseArea::setAcceptedButtons().
bool QQuickItem::acceptHoverEvents | ( | ) | const |
Returns whether hover events are accepted by this item.
The default value is false.
If this is false, then the item will not receive any hover events through the hoverEnterEvent(), hoverMoveEvent() and hoverLeaveEvent() functions.
Definition at line 7940 of file qquickitem.cpp.
References d.
bool QQuickItem::acceptTouchEvents | ( | ) | const |
Returns whether touch events are accepted by this item.
The default value is false
.
If this is false
, then the item will not receive any touch events through the touchEvent() function.
Definition at line 7973 of file qquickitem.cpp.
References d.
Referenced by QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl().
|
signal |
Referenced by QWaylandQuickItem::QWaylandQuickItem(), QWaylandQuickItem::~QWaylandQuickItem(), QQuickStyleItem::connectToControl(), QQuickMenuPrivate::insertItem(), QQuickMenuPrivate::removeItem(), and QQuickFolderBreadcrumbBar::setTextField().
bool QQuickItem::activeFocusOnTab | ( | ) | const |
\qmlproperty bool QtQuick::Item::activeFocusOnTab
This property holds whether the item wants to be in the tab focus chain. By default, this is set to false
.
The tab focus chain traverses elements by first visiting the parent, and then its children in the order they occur in the children property. Pressing the tab key on an item in the tab focus chain will move keyboard focus to the next item in the chain. Pressing BackTab (normally Shift+Tab) will move focus to the previous item.
To set up a manual tab focus chain, see \l KeyNavigation. Tab key events used by Keys or KeyNavigation have precedence over focus chain behavior; ignore the events in other key handlers to allow it to propagate.
This property holds whether the item wants to be in the tab focus chain. By default, this is set to false
.
Definition at line 6859 of file qquickitem.cpp.
References d.
Referenced by QQuickTableView::eventFilter(), QQuickControl::focusPolicy(), QQuickItemPrivate::nextPrevItemInTabFocusChain(), and setActiveFocusOnTab().
bool QQuickItem::antialiasing | ( | ) | const |
Definition at line 6901 of file qquickitem.cpp.
References d.
|
signal |
Referenced by resetAntialiasing(), and setAntialiasing().
qreal QQuickItem::baselineOffset | ( | ) | const |
\qmlproperty int QtQuick::Item::baselineOffset
Specifies the position of the item's baseline in local coordinates.
The baseline of a \l Text item is the imaginary line on which the text sits. Controls containing text usually set their baseline to the baseline of their text.
For non-text items, a default baseline offset of 0 is used.
Specifies the position of the item's baseline in local coordinates.
The baseline of a \l Text item is the imaginary line on which the text sits. Controls containing text usually set their baseline to the baseline of their text.
For non-text items, a default baseline offset of 0 is used.
Definition at line 4468 of file qquickitem.cpp.
References d.
Referenced by QQuickControlPrivate::updateBaselineOffset().
Referenced by QQuickControlPrivate::init(), QQuickLayout::maybeSubscribeToBaseLineOffsetChanges(), setBaselineOffset(), and QQuickControlPrivate::setContentItem_helper().
Definition at line 7420 of file qquickitem.cpp.
Definition at line 7213 of file qquickitem.cpp.
Definition at line 7144 of file qquickitem.cpp.
Definition at line 7149 of file qquickitem.cpp.
|
virtual |
Returns the extents of the item in its own coordinate system: a rectangle from {0, 0} to \l width() and \l height().
Reimplemented in QQuickImage, QQuickText, QQuickTextEdit, and QQuickTextInput.
Definition at line 5706 of file qquickitem.cpp.
References d.
Referenced by QQuickMaterialRipple::anchorPoint(), QQuickPinchArea::event(), QQuickMultiEffectPrivate::itemRect(), QQuickLabsPlatformMenu::open(), QQuickBasicDial::paint(), QQuickUniversalFocusRectangle::paint(), QQuickMaterialRippleWaveNode::sync(), QDeclarativeGeoMap::updatePaintNode(), QQuickStyleItem::updatePaintNode(), QQuickMaterialRipple::updatePaintNode(), and QQuickLayoutItemProxy::updatePos().
QQuickItem * QQuickItem::childAt | ( | qreal | x, |
qreal | y | ||
) | const |
\qmlmethod QtQuick::Item::childAt(real x, real y)
Returns the first visible child item found at point (x, y) within the coordinate system of this item.
Returns null
if there is no such item.
Returns the first visible child item found at point (x, y) within the coordinate system of this item.
Returns \nullptr if there is no such item.
Definition at line 4961 of file qquickitem.cpp.
References QList< T >::at(), child, childItems(), QObject::children(), i, mapToItem(), and QList< T >::size().
Referenced by QQuickMonthGridPrivate::cellAt(), QQuickSplitViewPrivate::handlePress(), QQuickSplitView::hoverMoveEvent(), and QQuickPageIndicatorPrivate::itemAt().
QList< QQuickItem * > QQuickItem::childItems | ( | ) | const |
Returns the children of this item.
Definition at line 3747 of file qquickitem.cpp.
References d.
Referenced by QQuickContents::~QQuickContents(), QQuickItemGroup::~QQuickItemGroup(), QQuickLayout::~QQuickLayout(), QDeclarativeGeoMap::addMapItemGroup_real(), QDeclarativeGeoMapItemBase::afterChildrenChanged(), QDeclarativeGeoMapQuickItem::afterChildrenChanged(), allSubObjects(), QQuickDesignerSupport::areChildrenAnchoredTo(), QQuickItemGroup::calculateImplicitSize(), childAt(), QQuickContents::complete(), QQuickBasePositioner::componentComplete(), QDeclarativeGeoMapItemGroup::componentComplete(), QQuickPanePrivate::contentChildItems(), QQuickScrollViewPrivate::contentChildItems(), QQuickMonthGridPrivate::dateOf(), QQuickTumblerPrivate::determineViewType(), QQuickLayout::dumpLayoutTreeRecursive(), QQuickAbstractButtonPrivate::findExclusiveButtons(), findSurfaceItemFromMoveItem(), QQuickItemGroup::geometryChange(), QQuickPageIndicatorPrivate::handleRelease(), QQuickStackLayout::indexOf(), QQuickGridLayout::insertLayoutItems(), QQuickLinearLayout::insertLayoutItems(), QQuickPageIndicatorPrivate::itemAt(), QQuickStackLayout::itemAt(), QQuickOverlay::itemChange(), QQuickStackLayout::itemCount(), QQuickMenuPrivate::itemSiblingOrderChanged(), QQuickItemPrivate::nextPrevItemInTabFocusChain(), QQuickBasePositioner::prePositioning(), QDeclarativeGeoMap::removeMapItemGroup_real(), QQuickContainerPrivate::reorderItems(), QQuickDayOfWeekRowPrivate::resizeItems(), QQuickMonthGridPrivate::resizeItems(), QQuickWeekNumberColumnPrivate::resizeItems(), QGfxSourceProxy::updatePolish(), and QQuickTumblerPrivate::viewContentItemChildItems().
|
protectedvirtual |
Reimplement this method to filter the pointer events that are received by this item's children.
This method will only be called if filtersChildMouseEvents() is true
.
Return true
if the specified event should not be passed on to the specified child item, and false
otherwise.
event->type()
and/or event->device()->type()
to handle different event types in different ways.Reimplemented in QQuickFlickable, QQuickPathView, QQuickStackView, QQuickPopupItem, QQuickSwipeDelegate, QQuickMouseArea, QQuickPinchArea, QQuickOverlay, QQuickScrollView, QQuickSplitView, QWaylandMouseTracker, and QQuickMultiPointTouchArea.
Definition at line 4336 of file qquickitem.cpp.
References item, and Q_UNUSED.
Referenced by QQuickFlickable::childMouseEventFilter(), QQuickPathView::childMouseEventFilter(), QQuickMouseArea::childMouseEventFilter(), QQuickPinchArea::childMouseEventFilter(), QQuickSplitView::childMouseEventFilter(), QQuickMultiPointTouchArea::childMouseEventFilter(), QQuickDeliveryAgentPrivate::sendFilteredMouseEvent(), and QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl().
|
signal |
Referenced by QDeclarativeGeoMapItemBase::QDeclarativeGeoMapItemBase(), QQuick3DItem2D::QQuick3DItem2D(), QDeclarativeGeoMapItemBase::~QDeclarativeGeoMapItemBase(), QQuickPopup::componentComplete(), QQuickPane::contentItemChange(), QQuickScrollViewPrivate::setFlickable(), and QGfxSourceProxy::setInput().
QRectF QQuickItem::childrenRect | ( | ) |
\qmlpropertygroup QtQuick::Item::childrenRect \qmlproperty real QtQuick::Item::childrenRect.x \qmlproperty real QtQuick::Item::childrenRect.y \qmlproperty real QtQuick::Item::childrenRect.width \qmlproperty real QtQuick::Item::childrenRect.height \readonly
This read-only property holds the collective position and size of the item's children.
This property is useful if you need to access the collective geometry of an item's children in order to correctly size the item.
The geometry that is returned is local to the item. For example:
This property holds the collective position and size of the item's children.
This property is useful if you need to access the collective geometry of an item's children in order to correctly size the item.
The geometry that is returned is local to the item. For example:
Definition at line 3733 of file qquickitem.cpp.
References d.
|
overrideprotectedvirtual |
\reimp Derived classes should call the base class method before adding their own action to perform at classBegin.
Implements QQmlParserStatus.
Reimplemented in QQuickShape, QQuickLabel, QQuickRangeSlider, QQuickScrollBar, QQuickSpinBox, QQuickTextArea, and QQuickTextField.
Definition at line 5261 of file qquickitem.cpp.
References d.
Referenced by QQuickShape::classBegin(), QQuickControl::classBegin(), and QDeclarativeGeoMapItemGroup::classBegin().
bool QQuickItem::clip | ( | ) | const |
\qmlproperty bool QtQuick::Item::clip This property holds whether clipping is enabled.
The default clip value is false
.
If clipping is enabled, an item will clip its own painting, as well as the painting of its children, to its bounding rectangle.
This property holds whether clipping is enabled. The default clip value is false
.
If clipping is enabled, an item will clip its own painting, as well as the painting of its children, to its bounding rectangle. If you set clipping during an item's paint operation, remember to re-set it to prevent clipping the rest of your scene.
true
also sets the \l ItemIsViewport flag, which sometimes acts as an optimization: child items that have the \l ItemObservesViewport flag may forego creating scene graph nodes that fall outside the viewport. But the ItemIsViewport
flag can also be set independently. Definition at line 3781 of file qquickitem.cpp.
References flags(), and ItemClipsChildrenToShape.
Referenced by setClip().
|
signal |
|
virtual |
Returns the rectangular area within this item that is currently visible in \l viewportItem(), if there is a viewport and the \l ItemObservesViewport flag is set; otherwise, the extents of this item in its own coordinate system: a rectangle from {0, 0} to \l width() and \l height().
This is the region intended to remain visible if \l clip is true
. It can also be used in updatePaintNode() to limit the graphics added to the scene graph.
For example, a large drawing or a large text document might be shown in a Flickable that occupies only part of the application's Window: in that case, Flickable is the viewport item, and a custom content-rendering item may choose to omit scene graph nodes that fall outside the area that is currently visible. If the \l ItemObservesViewport flag is set, this area will change each time the user scrolls the content in the Flickable.
In case of nested viewport items, clipRect() is the intersection of the {boundingRect}s
of all ancestors that have the \l ItemIsViewport flag set, mapped to the coordinate system of this item.
Reimplemented in QQuickText, QQuickTextEdit, QQuickTextInput, and QQuickClippedText.
Definition at line 5733 of file qquickitem.cpp.
References d, flags(), ItemObservesViewport, mapRectFromItem(), qCDebug, ret, testFlag(), viewport(), and viewportItem().
Referenced by QQuickTextNode::addTextDocument(), QQuickTextNode::addTextLayout(), QQuickText::clipRect(), QQuickTextEdit::clipRect(), QQuickTextInput::clipRect(), QQuickTextEditPrivate::transformChanged(), and QQuickTextArea::updatePaintNode().
|
overrideprotectedvirtual |
\reimp Derived classes should call the base class method before adding their own actions to perform at componentComplete.
Implements QQmlParserStatus.
Reimplemented in QQuickMultiEffect, QQuickParticleAffector, QQuickParticleEmitter, QQuickParticlePainter, QQuickParticleSystem, QQuickItemView, QQuickLoader, QQuickPathView, QQuickRepeater, QQuickShaderEffect, QQuickText, QQuickTextEdit, QQuickTextInput, QQuickMaterialPlaceholderText, QQuickMaterialTextContainer, QQuickPlaceholderText, QQuickTumblerView, QQuickLayout, QQuickStackLayout, QQuickStyleItem, QQuickShape, QQuickLabel, QQuickMenuItem, QQuickMonthGrid, QQuickPage, QQuickPane, QQuickProgressBar, QQuickRangeSlider, QQuickScrollBar, QQuickScrollView, QQuickSlider, QQuickSpinBox, QQuickSplitView, QQuickStackView, QQuickSwipeDelegate, QQuickTabBar, QQuickTextArea, QQuickTextField, QQuickTreeViewDelegate, QQuickTumbler, and QQuickWeekNumberColumn.
Definition at line 5280 of file qquickitem.cpp.
References d, QQuickWindowPrivate::dirtyItem(), QQuickAnchorsPrivate::get(), QQuickWindowPrivate::get(), and QQuickAnchorsPrivate::updateOnComplete().
Referenced by QQuickMultiEffect::componentComplete(), QQuickParticleAffector::componentComplete(), QQuickParticleEmitter::componentComplete(), QQuickParticlePainter::componentComplete(), QQuickParticleSystem::componentComplete(), QQuickCanvasItem::componentComplete(), QQuickAnimatedImage::componentComplete(), QQuickAnimatedSprite::componentComplete(), QQuickFlickable::componentComplete(), QQuickImageBase::componentComplete(), QQuickLoader::componentComplete(), QQuickPathView::componentComplete(), QQuickBasePositioner::componentComplete(), QQuickRepeater::componentComplete(), QQuickShaderEffect::componentComplete(), QQuickText::componentComplete(), QQuickIconLabel::componentComplete(), QQuickTumblerView::componentComplete(), QQuickLayout::componentComplete(), QQuickStyleItem::componentComplete(), QQuickShape::componentComplete(), QQuickControl::componentComplete(), QDeclarativeGeoMap::componentComplete(), QDeclarativeGeoMapItemGroup::componentComplete(), and QQuick3DViewport::componentComplete().
QObject * QQuickItem::containmentMask | ( | ) | const |
Definition at line 8520 of file qquickitem.cpp.
References d.
\qmlmethod bool QtQuick::Item::contains(point point)
Returns true
if this item contains point, which is in local coordinates; returns false
otherwise. This is the same check that is used for hit-testing a QEventPoint during event delivery, and is affected by \l containmentMask if it is set.
Returns true
if this item contains point, which is in local coordinates; returns false
otherwise.
This function can be overridden in order to handle point collisions in items with custom shapes. The default implementation checks whether the point is inside \l containmentMask() if it is set, or inside the bounding box otherwise.
Reimplemented in QQuickFlickableContentItem, QQuickShape, QQuickTextArea, QDeclarativeCircleMapItem, QDeclarativePolygonMapItem, QDeclarativePolylineMapItem, and QDeclarativeRectangleMapItem.
Definition at line 8436 of file qquickitem.cpp.
References d, Qt::DirectConnection, QMetaMethod::invoke(), Q_ARG, Q_RETURN_ARG, qobject_cast< QQuickItem * >(), QPointF::x(), and QPointF::y().
Referenced by QQuickPopupPrivate::blockInput(), QQuickDrawerPrivate::blockInput(), QQuickPathView::childMouseEventFilter(), clickableItemAtPosition(), QQuickFlickableContentItem::contains(), QQuickShape::contains(), QQuickTextArea::contains(), QQuickPopupPrivate::contains(), QQuickTrailEmitter::emitWindow(), QQuickFlickable::filterPointerEvent(), QQuickTableViewPrivate::getColumnLayoutWidth(), QQuickTableViewPrivate::getRowLayoutHeight(), QQuickSpinBoxPrivate::handleMove(), QQuickDragHandler::handlePointerEventImpl(), QQuickRangeSliderPrivate::handlePress(), QQuickScrollBarPrivate::handlePress(), QQuickSpinBoxPrivate::handlePress(), QQuickPopupPrivate::handlePress(), QQuickSelectionRectanglePrivate::handleUnderPos(), isUnderMouse(), QQuickPageIndicatorPrivate::itemAt(), QQuickMouseArea::mouseMoveEvent(), QQuickMouseArea::sendMouseEvent(), QQuickMultiPointTouchArea::sendMouseEvent(), QQuickMultiPointTouchArea::shouldFilter(), QQuickPopupPrivate::tryClose(), QQuickRangeSliderPrivate::updateHover(), and QQuickSpinBoxPrivate::updateHover().
|
signal |
Referenced by QQuickSelectionRectangle::QQuickSelectionRectangle(), QQuick3DItem2D::addChildItem(), QQuickStyleItem::connectToControl(), and QQuickParticleAffector::setEnabled().
|
overrideprotectedvirtual |
\reimp
Reimplemented from QObject.
Reimplemented in QQuickPinchArea, QQuickTextEdit, QQuickShaderEffect, QQuickTextInput, QQuickStyleItem, and QQuickMenuBarItem.
Definition at line 8817 of file qquickitem.cpp.
References QEvent::accept(), QEvent::ApplicationPaletteChange, d, QEvent::DragEnter, QEvent::DragLeave, QEvent::DragMove, QEvent::Drop, QObject::event(), QEvent::FocusIn, focusInEvent(), QEvent::FocusOut, focusOutEvent(), QEvent::HoverEnter, hoverEnterEvent(), QEvent::HoverLeave, hoverLeaveEvent(), QEvent::HoverMove, hoverMoveEvent(), i, QEvent::ignore(), QEvent::InputMethod, QEvent::InputMethodQuery, isVisible(), item, QEvent::KeyPress, QEvent::KeyRelease, QEvent::LanguageChange, QEvent::LocaleChange, QEvent::MouseButtonDblClick, QEvent::MouseButtonPress, QEvent::MouseButtonRelease, mouseDoubleClickEvent(), QEvent::MouseMove, mouseMoveEvent(), mousePressEvent(), mouseReleaseEvent(), QEvent::NativeGesture, QInputMethodQueryEvent::queries(), QCoreApplication::sendEvent(), QEvent::ShortcutOverride, QEvent::StyleAnimationUpdate, QEvent::TouchBegin, QEvent::TouchCancel, QEvent::TouchEnd, touchEvent(), QEvent::TouchUpdate, QEvent::type(), update(), QEvent::Wheel, QEvent::WindowActivate, and QEvent::WindowDeactivate.
Referenced by QQuickPinchArea::event(), QQuick3DViewport::event(), QQuickShaderEffect::event(), QQuickCanvasItem::event(), QQuickFolderBreadcrumbBar::event(), and QQuickStyleItem::event().
bool QQuickItem::filtersChildMouseEvents | ( | ) | const |
Returns whether pointer events intended for this item's children should be filtered through this item.
If both this item and a child item have acceptTouchEvents() true
, then when a touch interaction occurs, this item will filter the touch event. But if either this item or the child cannot handle touch events, childMouseEventFilter() will be called with a synthesized mouse event.
Definition at line 7892 of file qquickitem.cpp.
References d.
Referenced by QQuickPointerHandler::approveGrabTransition(), QQuickSwipeDelegate::mouseMoveEvent(), QQuickSwipeDelegate::mouseReleaseEvent(), and QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl().
QQuickItem::Flags QQuickItem::flags | ( | ) | const |
Returns the item flags for this item.
Definition at line 6953 of file qquickitem.cpp.
References d.
Referenced by QQuickTextNode::addTextLayout(), clip(), clipRect(), QQuickKeysAttached::componentComplete(), forceActiveFocus(), isFocusScope(), setFlags(), update(), QQuickTextEdit::updatePaintNode(), and viewportItem().
|
signal |
Referenced by QQuickStyleItemTextField::connectToControl(), setFocus(), and setParentItem().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive focus-in events for an item.
The event information is provided by the event
parameter.
\input item.qdocinc accepting-events
If you do reimplement this function, you should call the base class implementation.
Reimplemented in QQuickTextEdit, QQuickTextInput, QQuickComboBox, QQuickControl, QQuickPopupItem, QQuickRangeSlider, QQuickSpinBox, QQuickTextArea, and QQuickTextField.
Definition at line 4072 of file qquickitem.cpp.
Referenced by event(), QQuickTextEdit::focusInEvent(), QQuickTextInput::focusInEvent(), and QQuickControl::focusInEvent().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive focus-out events for an item.
The event information is provided by the event
parameter.
\input item.qdocinc accepting-events
Reimplemented in QQuickTextEdit, QQuickTextInput, QQuickAbstractButton, QQuickComboBox, QQuickControl, QQuickPopupItem, QQuickTextArea, and QQuickTextField.
Definition at line 4091 of file qquickitem.cpp.
Referenced by event(), QQuickTextEdit::focusOutEvent(), QQuickTextInput::focusOutEvent(), and QQuickControl::focusOutEvent().
void QQuickItem::forceActiveFocus | ( | ) |
\qmlmethod point QtQuick::Item::mapToItem(Item item, real x, real y) \qmlmethod point QtQuick::Item::mapToItem(Item item, point p) \qmlmethod rect QtQuick::Item::mapToItem(Item item, real x, real y, real width, real height) \qmlmethod rect QtQuick::Item::mapToItem(Item item, rect r)
Maps the point (x, y) or rect (x, y, width, height), which is in this item's coordinate system, to item's coordinate system, and returns a \l point or \l rect matching the mapped coordinate.
\input item.qdocinc mapping
If item is a null
value, this maps the point or rect to the coordinate system of the root QML view.
The versions accepting point and rect are since Qt 5.15.
Maps the point (x, y), which is in this item's coordinate system, to the global coordinate system, and returns a \l point matching the mapped coordinate.
\input item.qdocinc mapping
\qmlmethod QtQuick::Item::forceActiveFocus()
Forces active focus on the item.
This method sets focus on the item and ensures that all ancestor FocusScope objects in the object hierarchy are also given \l focus.
The reason for the focus change will be \l [CPP] Qt::OtherFocusReason. Use the overloaded method to specify the focus reason to enable better handling of the focus change.
Forces active focus on the item.
This method sets focus on the item and ensures that all ancestor FocusScope objects in the object hierarchy are also given \l focus.
The reason for the focus change will be \l [CPP] Qt::OtherFocusReason. Use the overloaded method to specify the focus reason to enable better handling of the focus change.
Definition at line 4871 of file qquickitem.cpp.
References forceActiveFocus(), and Qt::OtherFocusReason.
Referenced by QQuick3DViewport::QQuick3DViewport(), QQuickSpinBox::contentItemChange(), forceActiveFocus(), QQuickFileDialogImpl::itemChange(), QQuickFolderDialogImpl::itemChange(), QQuickTextEdit::mousePressEvent(), setActiveFocus(), QQuickMenuPrivate::setCurrentIndex(), QWaylandQuickItem::takeFocus(), QQuickMenuBarPrivate::toggleCurrentMenu(), and QQuickFolderBreadcrumbBarPrivate::toggleTextFieldVisibility().
void QQuickItem::forceActiveFocus | ( | Qt::FocusReason | reason | ) |
\qmlmethod QtQuick::Item::forceActiveFocus(Qt::FocusReason reason) This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Forces active focus on the item with the given reason.
This method sets focus on the item and ensures that all ancestor FocusScope objects in the object hierarchy are also given \l focus.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Forces active focus on the item with the given reason.
This method sets focus on the item and ensures that all ancestor FocusScope objects in the object hierarchy are also given \l focus.
Definition at line 4901 of file qquickitem.cpp.
References d, flags(), ItemIsFocusScope, Qt::OtherFocusReason, parent, parentItem(), and setFocus().
|
protectedvirtual |
This function is called to handle this item's changes in geometry from oldGeometry to newGeometry. If the two geometries are the same, it doesn't do anything.
Derived classes must call the base class method within their implementation.
Reimplemented in QQuickLayoutItemProxy, QQuickMultiEffect, QQuickTurbulenceAffector, QQuickCanvasItem, QQuickFlickable, QQuickFramebufferObject, QQuickGridView, QQuickImage, QQuickItemView, QQuickListView, QQuickLoader, QQuickMouseArea, QQuickPinchArea, QQuickShaderEffect, QQuickTableView, QQuickText, QQuickTextEdit, QQuickTextInput, QQuickIconImage, QQuickIconLabel, QQuickItemGroup, QQuickTumblerView, QQuickLayout, QQuickStyleItem, QQuickControl, QQuickDayOfWeekRow, QQuickDialogButtonBox, QQuickLabel, QQuickMenuBarItem, QQuickMonthGrid, QQuickOverlay, QQuickPopupItem, QQuickRoundButton, QQuickSplitView, QQuickStackView, QQuickSwipeDelegate, QQuickSwipeView, QQuickTabBar, QQuickTextArea, QQuickTextField, QQuickTreeViewDelegate, QQuickTumbler, QQuickWeekNumberColumn, QDeclarativeCircleMapItem, QDeclarativeGeoMap, QDeclarativeGeoMapQuickItem, QDeclarativePolygonMapItem, QDeclarativePolylineMapItem, QDeclarativeRectangleMapItem, QQuickVideoOutput, and QQuick3DViewport.
Definition at line 3809 of file qquickitem.cpp.
References d, QQuickItemPrivate::Geometry, QQuickAnchorsPrivate::get(), QQuickItemPrivate::ChangeListener::gTypes, QRectF::height(), QQuickGeometryChange::heightChange(), QQuickItemChangeListener::itemGeometryChanged(), QQuickItemPrivate::ChangeListener::listener, QQuickGeometryChange::matches(), QQuickGeometryChange::setHeightChange(), QQuickGeometryChange::setWidthChange(), QQuickGeometryChange::setXChange(), QQuickGeometryChange::setYChange(), QQuickAnchorsPrivate::updateMe(), QRectF::width(), QQuickGeometryChange::widthChange(), QRectF::x(), QQuickGeometryChange::xChange(), QRectF::y(), and QQuickGeometryChange::yChange().
Referenced by QQuickLayoutItemProxy::geometryChange(), QQuickMultiEffect::geometryChange(), QQuickCanvasItem::geometryChange(), QQuickFlickable::geometryChange(), QQuickFramebufferObject::geometryChange(), QQuickImage::geometryChange(), QQuickLoader::geometryChange(), QQuickMouseArea::geometryChange(), QQuickPinchArea::geometryChange(), QQuickShaderEffect::geometryChange(), QQuickText::geometryChange(), QQuickTextEdit::geometryChange(), QQuickTextInput::geometryChange(), QQuickIconLabel::geometryChange(), QQuickItemGroup::geometryChange(), QQuickTumblerView::geometryChange(), QQuickLayout::geometryChange(), QQuickStyleItem::geometryChange(), QQuickControl::geometryChange(), QQuickDialogButtonBox::geometryChange(), QQuickMenuBarItem::geometryChange(), QQuickOverlay::geometryChange(), QQuickPopupItem::geometryChange(), QQuickSwipeView::geometryChange(), QQuickTabBar::geometryChange(), QQuickTreeViewDelegate::geometryChange(), QDeclarativeCircleMapItem::geometryChange(), QDeclarativeGeoMap::geometryChange(), QDeclarativeGeoMapQuickItem::geometryChange(), QDeclarativePolygonMapItem::geometryChange(), QDeclarativePolylineMapItem::geometryChange(), QDeclarativeRectangleMapItem::geometryChange(), QQuickVideoOutput::geometryChange(), QQuick3DViewport::geometryChange(), setHeight(), setImplicitHeight(), setImplicitSize(), setImplicitWidth(), setPosition(), setSize(), setWidth(), setX(), and setY().
void QQuickItem::grabMouse | ( | ) |
Grabs the mouse input.
This item will receive all mouse events until ungrabMouse() is called. Usually this function should not be called, since accepting for example a mouse press event makes sure that the following events are delivered to the item. If an item wants to take over mouse events from the current receiver, it needs to call this function.
Definition at line 8269 of file qquickitem.cpp.
References d, Q_ASSERT, and qWarning.
Referenced by QQuickMultiPointTouchArea::grabGesture(), QQuickDrawerPrivate::grabMouse(), QQuickSwipeDelegatePrivate::handleMouseMoveEvent(), QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl(), QQuickMouseArea::sendMouseEvent(), and QQuickMultiPointTouchArea::sendMouseEvent().
Grabs the item into an in-memory image.
\qmlmethod bool QtQuick::Item::grabToImage(callback, targetSize)
The grab happens asynchronously and the signal QQuickItemGrabResult::ready() is emitted when the grab has been completed.
Use targetSize to specify the size of the target image. By default, the result will have the same size as item.
If the grab could not be initiated, the function returns null
.
Grabs the item into an in-memory image.
The grab happens asynchronously and the JavaScript function callback is invoked when the grab is completed. The callback takes one argument, which is the result of the grab operation; an \l ItemGrabResult object.
Use targetSize to specify the size of the target image. By default, the result will have the same size as the item.
If the grab could not be initiated, the function returns false
.
The following snippet shows how to grab an item and store the results in a file:
The following snippet shows how to grab an item and use the results in another image element:
Only visible from QML.
Definition at line 322 of file qquickitemgrabresult.cpp.
References QQuickWindow::afterRendering(), QQuickWindow::beforeSynchronizing(), QObject::connect(), QQuickItemGrabResultPrivate::create(), Qt::DirectConnection, targetSize, and window().
These touch points will be owned by the item until they are released. Alternatively, the grab can be stolen by a filtering item like Flickable. Use setKeepTouchGrab() to prevent the grab from being stolen.
Definition at line 8356 of file qquickitem.cpp.
References d, Q_UNLIKELY, and qWarning.
bool QQuickItem::hasActiveFocus | ( | ) | const |
Definition at line 7634 of file qquickitem.cpp.
References d.
Referenced by QQuickStyleItem::initStyleOptionBase(), QQuickTextEdit::mousePressEvent(), QQuickPopupPrivate::prepareExitTransition(), QQuickTextEdit::setReadOnly(), QQuickTextInput::setReadOnly(), and QQuickFolderBreadcrumbBarPrivate::textFieldActiveFocusChanged().
bool QQuickItem::hasFocus | ( | ) | const |
Definition at line 7728 of file qquickitem.cpp.
References d.
Referenced by QWaylandQuickItem::keyReleaseEvent(), setFocus(), QQuickDeliveryAgentPrivate::setFocusInScope(), and setParentItem().
qreal QQuickItem::height | ( | ) | const |
Definition at line 7362 of file qquickitem.cpp.
References d.
|
signal |
Referenced by QQuickAnimatedSprite::QQuickAnimatedSprite(), QSizeChangeListener::QSizeChangeListener(), QQuickText::geometryChange(), QQuickFlipable::setBack(), QWaylandQtShellChrome::setBottomResizeHandle(), QmlJSDebugger::Highlight::setItem(), QDeclarativeGeoMapItemGroup::setQuickMap(), QWaylandQtShellChrome::setTitleBar(), QWaylandQtShellChrome::setTopResizeHandle(), and QDeclarativeGeoMapQuickItem::updatePolish().
|
protected |
Returns whether the height property has been set explicitly.
Definition at line 7514 of file qquickitem.cpp.
References d.
Referenced by QQuickFlow::doPositioning(), QQuickText::geometryChange(), QQuickTextEdit::geometryChange(), setImplicitHeight(), setImplicitSize(), QQuickText::setMinimumPixelSize(), QQuickText::setMinimumPointSize(), and QQuickImage::updatePaintedGeometry().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive hover-enter events for an item.
The event information is provided by the event parameter.
Hover events are only provided if acceptHoverEvents() is true.
\input item.qdocinc accepting-events
Reimplemented in QQuickMouseArea, QQuickText, QQuickTextEdit, QQuickRangeSlider, QQuickSpinBox, QWaylandMouseTracker, and QWaylandQuickItem.
Definition at line 4207 of file qquickitem.cpp.
Referenced by event(), QQuickMouseArea::hoverEnterEvent(), QQuickRangeSlider::hoverEnterEvent(), and QQuickSpinBox::hoverEnterEvent().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive hover-leave events for an item.
The event information is provided by the event parameter.
Hover events are only provided if acceptHoverEvents() is true.
\input item.qdocinc accepting-events
Reimplemented in QQuickMouseArea, QQuickText, QQuickTextEdit, QQuickMenuBar, QQuickRangeSlider, QQuickSpinBox, QQuickSplitView, QWaylandMouseTracker, and QWaylandQuickItem.
Definition at line 4235 of file qquickitem.cpp.
Referenced by event(), QQuickMouseArea::hoverLeaveEvent(), QQuickMenuBar::hoverLeaveEvent(), QQuickRangeSlider::hoverLeaveEvent(), and QQuickSpinBox::hoverLeaveEvent().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive hover-move events for an item.
The event information is provided by the event parameter.
Hover events are only provided if acceptHoverEvents() is true.
\input item.qdocinc accepting-events
Reimplemented in QQuickMouseArea, QQuickText, QQuickTextEdit, QQuickRangeSlider, QQuickSpinBox, QQuickSplitView, QWaylandMouseTracker, and QWaylandQuickItem.
Definition at line 4221 of file qquickitem.cpp.
Referenced by event(), QQuickMouseArea::hoverMoveEvent(), QQuickRangeSlider::hoverMoveEvent(), QQuickSpinBox::hoverMoveEvent(), QQuickSplitView::hoverMoveEvent(), and QWaylandMouseTracker::hoverMoveEvent().
qreal QQuickItem::implicitHeight | ( | ) | const |
Definition at line 7414 of file qquickitem.cpp.
References d.
|
signal |
qreal QQuickItem::implicitWidth | ( | ) | const |
Returns the width of the item that is implied by other properties that determine the content.
Definition at line 7207 of file qquickitem.cpp.
References d.
|
signal |
bool QQuickItem::isAncestorOf | ( | const QQuickItem * | child | ) | const |
Returns true
if this item is an ancestor of child (i.e., if this item is child's parent, or one of child's parent's ancestors).
Definition at line 7831 of file qquickitem.cpp.
References child, and parentItem().
Referenced by QQuickPointerHandler::approveGrabTransition(), QQuickPopupPrivate::blockInput(), QQuickDrawerPrivate::blockInput(), QQuickOverlay::eventFilter(), and QQuickDragHandler::onGrabChanged().
|
protected |
Returns true if construction of the QML component is complete; otherwise returns false.
It is often desirable to delay some processing until the component is completed.
Definition at line 3151 of file qquickitem.cpp.
References d.
Referenced by QQuickTumbler::contentItemChange(), QQuickItemView::geometryChange(), QQuickIconImage::geometryChange(), QQuickDayOfWeekRow::geometryChange(), QQuickMonthGrid::geometryChange(), QQuickSwipeDelegate::geometryChange(), QQuickWeekNumberColumn::geometryChange(), QQuickShaderEffect::isComponentComplete(), QQuickDialogButtonBox::itemAdded(), QQuickSwipeView::itemAdded(), QQuickTabBar::itemAdded(), QQuickFolderBreadcrumbBar::itemChange(), QQuickContainer::itemChange(), QQuickImageBase::itemChange(), QQuickDialogButtonBox::itemRemoved(), QQuickTabBar::itemRemoved(), QQuickStyleItem::markGeometryDirty(), QQuickStyleItem::markImageDirty(), QQuickDayOfWeekRow::paddingChange(), QQuickMonthGrid::paddingChange(), QQuickWeekNumberColumn::paddingChange(), QQuickComboBox::popup(), QQuickBasePositioner::prePositioning(), QQuickText::resetHAlign(), QQuickTextEdit::resetHAlign(), QQuickTextInput::resetHAlign(), QQuickPathView::resetPathItemCount(), QQuickItemView::resetPreferredHighlightBegin(), QQuickItemView::resetPreferredHighlightEnd(), QQuickDialogButtonBox::setAlignment(), QQuickLoader::setAsynchronous(), QQuickControl::setBackground(), QQuickLabel::setBackground(), QQuickTextArea::setBackground(), QQuickTextField::setBackground(), QQuickDialogButtonBox::setButtonLayout(), QQuickImageBase::setCache(), QQuickItemView::setCacheBuffer(), QQuickText::setColor(), QQuickColorImage::setColor(), QQuickIconImage::setColor(), QQuickImageBase::setCurrentFrame(), QQuickItemView::setCurrentIndex(), QQuickPathView::setCurrentIndex(), QQuickStackLayout::setCurrentIndex(), QQuickTextEdit::setCursorVisible(), QQuickTextInput::setCursorVisible(), QQuickItemView::setDelegate(), QQuickPathView::setDelegate(), QQuickItemView::setDisplayMarginBeginning(), QQuickItemView::setDisplayMarginEnd(), QQuickImage::setFillMode(), QQuickItemView::setFooter(), QQuickPage::setFooter(), QQuickListView::setFooterPositioning(), QQuickSpinBox::setFrom(), QQuickDial::setFrom(), QQuickProgressBar::setFrom(), QQuickRangeSlider::setFrom(), QQuickSlider::setFrom(), QQuickText::setHAlign(), QQuickTextEdit::setHAlign(), QQuickTextInput::setHAlign(), QQuickItemView::setHeader(), QQuickPage::setHeader(), QQuickListView::setHeaderPositioning(), QQuickItemView::setHighlightRangeMode(), QQuickText::setLinkColor(), QQuickScrollBar::setMinimumSize(), QQuickScrollIndicator::setMinimumSize(), QQuickImage::setMipmap(), QQuickImageBase::setMirror(), QQuickImageBase::setMirrorVertically(), QQuickMnemonicLabel::setMnemonicVisible(), QQuickItemView::setModel(), QQuickPathView::setModel(), QQuickRepeater::setModel(), QQuickTumblerView::setModel(), QQuickComboBox::setModel(), QQuickTumbler::setModel(), QQuickIconImage::setName(), QQuickListView::setOrientation(), QQuickScrollBar::setOrientation(), QQuickScrollIndicator::setOrientation(), QQuickSwipeView::setOrientation(), QQuickPathView::setPath(), QQuickPathView::setPathItemCount(), QQuickScrollBar::setPosition(), QQuickScrollIndicator::setPosition(), QQuickItemView::setPreferredHighlightBegin(), QQuickItemView::setPreferredHighlightEnd(), QQuickText::setRenderType(), QQuickTextEdit::setRenderType(), QQuickTextInput::setRenderType(), QQuickText::setRenderTypeQuality(), QQuickScrollBar::setSize(), QQuickScrollIndicator::setSize(), QQuickAnimatedImage::setSource(), QQuickImageBase::setSource(), QQuickBorderImage::setSource(), QQuickIconImage::setSource(), QQuickImageBase::setSourceClipRect(), QQuickImageBase::setSourceSize(), QQuickDialogButtonBox::setStandardButtons(), QQuickText::setStyle(), QQuickText::setStyleColor(), QQuickText::setText(), QQuickTextEdit::setText(), QQuickText::setTextFormat(), QQuickTextEdit::setTextFormat(), QQuickComboBox::setTextRole(), QQuickSpinBox::setTo(), QQuickDial::setTo(), QQuickProgressBar::setTo(), QQuickRangeSlider::setTo(), QQuickSlider::setTo(), QQuickText::setVAlign(), QQuickTextInput::setVAlign(), QQuickDial::setValue(), QQuickProgressBar::setValue(), QQuickSlider::setValue(), QQuickComboBox::setValueRole(), QQuickAnimatedSprite::start(), QQuickAnimatedSprite::stop(), and QQuickTextEdit::text().
bool QQuickItem::isEnabled | ( | ) | const |
Definition at line 6467 of file qquickitem.cpp.
References d.
Referenced by QQuickFlickable::childMouseEventFilter(), QQuickPathView::childMouseEventFilter(), QQuickMultiPointTouchArea::childMouseEventFilter(), clickableItemAtPosition(), QQuickSpinBoxPrivate::downEnabled(), QQuickFlickable::filterPointerEvent(), QQuickSpinBoxPrivate::handleMove(), QQuickSpinBoxPrivate::handlePress(), QQuickStyleItem::initStyleOptionBase(), QQuickMultiPointTouchArea::mouseMoveEvent(), QQuickMultiPointTouchArea::mousePressEvent(), QQuickMultiPointTouchArea::mouseReleaseEvent(), QQuickItemPrivate::nextPrevItemInTabFocusChain(), QQuickMenuBarPrivate::onMenuAboutToHide(), QQuickFusionDial::paint(), QQuickDeliveryAgentPrivate::setFocusInScope(), QQuick3DViewport::setGlobalPickingEnabled(), QQuickMaterialRipple::setPressed(), QQuickMultiPointTouchArea::shouldFilter(), QQuickMultiPointTouchArea::touchEvent(), QQuickRangeSliderPrivate::updateHover(), QQuickSpinBoxPrivate::updateHover(), and QQuickSpinBoxPrivate::upEnabled().
bool QQuickItem::isFocusScope | ( | ) | const |
Returns true if this item is a focus scope, and false otherwise.
Definition at line 7803 of file qquickitem.cpp.
References flags(), and ItemIsFocusScope.
Referenced by scopedFocusItem(), setEnabled(), setFocus(), QQuickDeliveryAgentPrivate::setFocusInScope(), and setParentItem().
|
virtual |
Returns true if this item is a texture provider.
The default implementation returns false.
This function can be called from any thread.
Reimplemented in QQuickCanvasItem, QQuickFramebufferObject, QQuickImage, QQuickPaintedItem, QQuickShaderEffectSource, QQuick3DViewport, and QWaylandQuickItem.
Definition at line 8975 of file qquickitem.cpp.
References d.
Referenced by QWaylandQuickItem::isTextureProvider(), QQuickCanvasItem::textureProvider(), QQuickFramebufferObject::textureProvider(), QQuickImage::textureProvider(), QQuickPaintedItem::textureProvider(), QQuick3DViewport::textureProvider(), QWaylandQuickItem::textureProvider(), and QGfxSourceProxy::updatePolish().
bool QQuickItem::isUnderMouse | ( | ) | const |
Definition at line 7916 of file qquickitem.cpp.
References contains(), d, QGuiApplicationPrivate::lastCursorPosition, and mapFromScene().
Referenced by QQuickStyleItem::initStyleOptionBase(), and QQuickMouseArea::itemChange().
bool QQuickItem::isVisible | ( | ) | const |
Definition at line 6400 of file qquickitem.cpp.
References d.
Referenced by QQuickSplitViewPrivate::accumulatedSize(), QQuickFlickable::childMouseEventFilter(), QQuickPathView::childMouseEventFilter(), QQuickMouseArea::childMouseEventFilter(), QQuickPinchArea::childMouseEventFilter(), QQuickMultiPointTouchArea::childMouseEventFilter(), clickableItemAtPosition(), event(), QQuickPinchArea::event(), QQuickMenuBar::eventFilter(), QQuickOverlay::eventFilter(), QQuickLayoutItemProxy::geometryChange(), QQuickCanvasItem::geometryChange(), QQuickBasicBusyIndicator::isRunning(), QQuickFusionBusyIndicator::isRunning(), QQuickMaterialBusyIndicator::isRunning(), QQuickStackViewAttached::isVisible(), QQuickMouseArea::itemChange(), QQuick3DViewport::itemChange(), QQuickPopupPositioner::itemGeometryChanged(), QQuickSplitViewPrivate::layoutResizeFillItem(), QQuickSplitViewPrivate::layoutResizeSplitItems(), QQuickLayoutItemProxy::maybeTakeControl(), QQuickItemPrivate::nextPrevItemInTabFocusChain(), QQuickFusionDial::paint(), QQuickUniversalFocusRectangle::paint(), QQuickApplicationWindowPrivate::relayout(), QQuickPagePrivate::relayout(), QQuickPopupPositioner::reposition(), QQuickCanvasItem::requestAnimationFrame(), setParentItem(), QQuickPopupPositioner::setParentItem(), QQuickLayoutItemProxy::setTarget(), QQuickFolderBreadcrumbBarPrivate::textFieldActiveFocusChanged(), QQuickFolderBreadcrumbBarPrivate::textFieldVisibleChanged(), QQuickFolderBreadcrumbBarPrivate::toggleTextFieldVisibility(), QQuickPinchArea::touchEvent(), QQuickFileDialogImplPrivate::updateEnabled(), QQuickFolderDialogImplPrivate::updateEnabled(), QQuickSplitViewPrivate::updateHandleVisibilities(), QQuickBasicProgressBar::updatePaintNode(), QQuickMaterialProgressBar::updatePaintNode(), QQuickUniversalBusyIndicator::updatePaintNode(), QQuickUniversalProgressBar::updatePaintNode(), QQuickCanvasItem::updatePolish(), QQuickStyleItem::updatePolish(), QQuickShape::updatePolish(), and QQuickLayoutItemProxy::updatePos().
|
protectedvirtual |
Called when change occurs for this item.
value contains extra information relating to the change, when applicable.
If you re-implement this method in a subclass, be sure to call
typically at the end of your implementation, to ensure the \l windowChanged() signal will be emitted.
Reimplemented in QQuickLayoutItemProxy, QQuickVideoOutput, QQuickBasicBusyIndicator, QQuickBasicProgressBar, QQuickFusionBusyIndicator, QQuickMaterialBusyIndicator, QQuickMaterialProgressBar, QQuickMaterialRipple, QQuickUniversalBusyIndicator, QQuickUniversalProgressBar, QQuickItemGroup, QQuickTumblerView, QQuickFolderBreadcrumbBar, QQuickStyleItem, QQuickShape, QQuickContainer, QQuickOverlay, QQuickPopupItem, QQuickMultiEffect, QQuickImageBase, QQuickLoader, QQuickMouseArea, QQuickPinchArea, QQuickRepeater, QQuickShaderEffect, QQuickShaderEffectSource, QQuickText, QQuickIconImage, QQuickLayout, QQuickStackLayout, QQuickAbstractButton, QQuickComboBox, QQuickControl, QQuickLabel, QQuickSpinBox, QQuickTextArea, QQuickTextField, QQuickParticlePainter, QQuickAnimatedSprite, QQuickPaintedItem, QQuickBasePositioner, QDeclarativeGeoMap, QQuickMenuBar, QQuick3DViewport, and QQuickCanvasItem.
Definition at line 5684 of file qquickitem.cpp.
References emit, and ItemSceneChange.
Referenced by QQuickLayoutItemProxy::itemChange(), QQuickBasicBusyIndicator::itemChange(), QQuickBasicProgressBar::itemChange(), QQuickMaterialBusyIndicator::itemChange(), QQuickMaterialProgressBar::itemChange(), QQuickMaterialRipple::itemChange(), QQuickUniversalBusyIndicator::itemChange(), QQuickUniversalProgressBar::itemChange(), QQuickItemGroup::itemChange(), QQuickTumblerView::itemChange(), QQuickStyleItem::itemChange(), QQuickShape::itemChange(), QQuickOverlay::itemChange(), QQuickPopupItem::itemChange(), QQuickMultiEffect::itemChange(), QQuickImageBase::itemChange(), QQuickLoader::itemChange(), QQuickMouseArea::itemChange(), QQuickPinchArea::itemChange(), QQuickRepeater::itemChange(), QQuickShaderEffect::itemChange(), QQuickShaderEffectSource::itemChange(), QQuickText::itemChange(), QQuickLayout::itemChange(), QQuickControl::itemChange(), QQuickTextArea::itemChange(), QQuickTextField::itemChange(), QQuickParticlePainter::itemChange(), QQuickAnimatedSprite::itemChange(), QQuickPaintedItem::itemChange(), QQuickBasePositioner::itemChange(), QDeclarativeGeoMap::itemChange(), and QQuickCanvasItem::itemChange().
QTransform QQuickItem::itemTransform | ( | QQuickItem * | other, |
bool * | ok | ||
) | const |
\qmlmethod point QtQuick::Item::mapFromItem(Item item, real x, real y) \qmlmethod point QtQuick::Item::mapFromItem(Item item, point p) \qmlmethod rect QtQuick::Item::mapFromItem(Item item, real x, real y, real width, real height) \qmlmethod rect QtQuick::Item::mapFromItem(Item item, rect r)
Maps the point (x, y) or rect (x, y, width, height), which is in item's coordinate system, to this item's coordinate system, and returns a \l point or \l rect matching the mapped coordinate.
\input item.qdocinc mapping
If item is a null
value, this maps the point or rect from the coordinate system of the root QML view.
The versions accepting point and rect are since Qt 5.15.
Definition at line 4687 of file qquickitem.cpp.
References d, QQuickItemPrivate::get(), ok, other(), and QQuickItemPrivate::windowToItemTransform().
Referenced by QQuickParticleSystem::emitParticle(), and QQuickParentAnimation::transition().
bool QQuickItem::keepMouseGrab | ( | ) | const |
Returns whether mouse input should exclusively remain with this item.
Definition at line 8319 of file qquickitem.cpp.
References d.
Referenced by QQuickPointerHandler::approveGrabTransition(), QQuickDrawerPrivate::blockInput(), QQuickPathView::childMouseEventFilter(), QQuickFlickable::filterPointerEvent(), QQuickSwipeDelegatePrivate::handleMouseMoveEvent(), QQuickDrawerPrivate::handleMove(), QQuickDrawerPrivate::handleRelease(), QQuickMouseArea::mouseMoveEvent(), QQuickSwitch::mouseMoveEvent(), QQuickSwitchDelegate::mouseMoveEvent(), QQuickSwitch::nextCheckState(), QQuickSwitchDelegate::nextCheckState(), QQuickMouseArea::sendMouseEvent(), QQuickMultiPointTouchArea::sendMouseEvent(), QQuickMultiPointTouchArea::shouldFilter(), and QQuickMultiPointTouchArea::touchEvent().
bool QQuickItem::keepTouchGrab | ( | ) | const |
Returns whether the touch points grabbed by this item should exclusively remain with this item.
Definition at line 8388 of file qquickitem.cpp.
References d.
Referenced by QQuickPointerHandler::approveGrabTransition(), QQuickDrawerPrivate::blockInput(), QQuickFlickable::filterPointerEvent(), QQuickDrawerPrivate::handleMove(), QQuickDrawerPrivate::handleRelease(), QQuickSwitch::nextCheckState(), QQuickSwitchDelegate::nextCheckState(), and QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl().
This event handler can be reimplemented in a subclass to receive key press events for an item.
The event information is provided by the event parameter.
\input item.qdocinc accepting-events
Reimplemented in QQuickGridView, QQuickListView, QQuickTextEdit, QQuickTableView, QQuickTextInput, QQuickTreeView, QQuickFolderBreadcrumbBar, QQuickAbstractButton, QQuickComboBox, QQuickDial, QQuickMenuBar, QQuickMenuBarItem, QQuickPopupItem, QQuickRangeSlider, QQuickScrollView, QQuickSlider, QQuickSpinBox, QQuickTumbler, and QWaylandQuickItem.
Definition at line 4031 of file qquickitem.cpp.
Referenced by QQuickGridView::keyPressEvent(), QQuickListView::keyPressEvent(), QQuickTextEdit::keyPressEvent(), QQuickTableView::keyPressEvent(), QQuickTextInput::keyPressEvent(), QQuickFolderBreadcrumbBar::keyPressEvent(), QQuickAbstractButton::keyPressEvent(), QQuickComboBox::keyPressEvent(), QQuickDial::keyPressEvent(), QQuickMenuBarItem::keyPressEvent(), QQuickRangeSlider::keyPressEvent(), QQuickScrollView::keyPressEvent(), QQuickSlider::keyPressEvent(), QQuickSpinBox::keyPressEvent(), and QQuickTumbler::keyPressEvent().
This event handler can be reimplemented in a subclass to receive key release events for an item.
The event information is provided by the event parameter.
\input item.qdocinc accepting-events
Reimplemented in QQuickTextEdit, QQuickFileDialogDelegate, QQuickAbstractButton, QQuickComboBox, QQuickDial, QQuickMenuBar, QQuickMenuBarItem, QQuickPopupItem, QQuickRangeSlider, QQuickSlider, QQuickSpinBox, and QWaylandQuickItem.
Definition at line 4043 of file qquickitem.cpp.
Referenced by QQuickMenuBar::keyPressEvent(), QQuickTextEdit::keyReleaseEvent(), QQuickFileDialogDelegate::keyReleaseEvent(), QQuickAbstractButton::keyReleaseEvent(), QQuickComboBox::keyReleaseEvent(), QQuickDial::keyReleaseEvent(), QQuickMenuBar::keyReleaseEvent(), QQuickMenuBarItem::keyReleaseEvent(), QQuickRangeSlider::keyReleaseEvent(), QQuickSlider::keyReleaseEvent(), and QQuickSpinBox::keyReleaseEvent().
QPointF QQuickItem::mapFromItem | ( | const QQuickItem * | item, |
const QPointF & | point | ||
) | const |
Maps the given point in item's coordinate system to the equivalent point within this item's coordinate system, and returns the mapped coordinate.
\input item.qdocinc mapping
If item is \nullptr, this maps point from the coordinate system of the scene.
Definition at line 8674 of file qquickitem.cpp.
References item, mapFromScene(), and QGraphicsItem::mapToScene().
Referenced by QQuickMaterialRipple::anchorPoint(), QQuickParticlePainter::calcSystemOffset(), QQuickSplitView::childMouseEventFilter(), QWaylandMouseTracker::childMouseEventFilter(), QQuickFlickableContentItem::contains(), QQuickTrailEmitter::emitWindow(), QQuickSpinBoxPrivate::handleMove(), QQuickDragHandler::handlePointerEventImpl(), QQuickSpinBoxPrivate::handlePress(), QQuickSpinBoxPrivate::handleRelease(), QQuickSelectionRectanglePrivate::handleUnderPos(), QQuickSwitchPrivate::positionAt(), QQuickSwitchDelegatePrivate::positionAt(), QQuickTargetDirection::sample(), and QQuickParticleAffector::updateOffsets().
QRectF QQuickItem::mapFromItem | ( | const QQuickItem * | item, |
const QRectF & | rect | ||
) | const |
Definition at line 9856 of file qquickitem.cpp.
QPointF QQuickItem::mapFromItem | ( | const QQuickItem * | item, |
qreal | x, | ||
qreal | y | ||
) |
Definition at line 9852 of file qquickitem.cpp.
References item.
QRectF QQuickItem::mapFromItem | ( | const QQuickItem * | item, |
qreal | x, | ||
qreal | y, | ||
qreal | width, | ||
qreal | height | ||
) | const |
Definition at line 9860 of file qquickitem.cpp.
References item.
Maps the given point in the scene's coordinate system to the equivalent point within this item's coordinate system, and returns the mapped coordinate.
\input item.qdocinc mapping
Definition at line 8689 of file qquickitem.cpp.
References d.
Referenced by QQuickPopupPrivate::blockInput(), QQuickDrawerPrivate::blockInput(), QQuickPathView::childMouseEventFilter(), QQuickPopupPrivate::contains(), QQuickPinchArea::event(), QQuickFlickable::filterPointerEvent(), QQuickMouseArea::geometryChange(), QQuickDragHandler::handlePointerEventImpl(), QQuickPopupPrivate::handlePress(), isUnderMouse(), QQuickMouseArea::itemChange(), QmlJSDebugger::QQuickWindowInspector::itemsAt(), QQuickDeliveryAgentPrivate::localizePointerEvent(), mapFromItem(), QQuickMouseArea::mouseMoveEvent(), QQuickSinglePointHandler::moveTarget(), QQuickPopupPositioner::reposition(), QQuickMouseArea::sendMouseEvent(), QQuickMultiPointTouchArea::sendMouseEvent(), QQuickMultiPointTouchArea::shouldFilter(), QmlJSDebugger::QQuickWindowInspector::topVisibleItemAt(), QQuickPopupPrivate::tryClose(), and QQuickMultiPointTouchArea::updateTouchData().
QRectF QQuickItem::mapRectFromItem | ( | const QQuickItem * | item, |
const QRectF & | rect | ||
) | const |
Maps the given rect in item's coordinate system to the equivalent rectangular area within this item's coordinate system, and returns the mapped rectangle value.
\input item.qdocinc mapping
If item is \nullptr, this maps rect from the coordinate system of the scene.
Definition at line 8741 of file qquickitem.cpp.
References d, QQuickItemPrivate::get(), item, QQuickItemPrivate::itemToWindowTransform(), and rect.
Referenced by clipRect().
Maps the given rect in the scene's coordinate system to the equivalent rectangular area within this item's coordinate system, and returns the mapped rectangle value.
\input item.qdocinc mapping
Definition at line 8758 of file qquickitem.cpp.
QRectF QQuickItem::mapRectToItem | ( | const QQuickItem * | item, |
const QRectF & | rect | ||
) | const |
Maps the given rect in this item's coordinate system to the equivalent rectangular area within item's coordinate system, and returns the mapped rectangle value.
\input item.qdocinc mapping
If item is \nullptr, this maps rect to the coordinate system of the scene.
Definition at line 8638 of file qquickitem.cpp.
References d, QQuickItemPrivate::get(), item, QTransform::mapRect(), rect, and QQuickItemPrivate::windowToItemTransform().
Maps the given rect in this item's coordinate system to the equivalent rectangular area within the scene's coordinate system, and returns the mapped rectangle value.
\input item.qdocinc mapping
Definition at line 8656 of file qquickitem.cpp.
Referenced by QQuickLabsPlatformMenu::open().
QPointF QQuickItem::mapToItem | ( | const QQuickItem * | item, |
const QPointF & | point | ||
) | const |
Maps the given point in this item's coordinate system to the equivalent point within item's coordinate system, and returns the mapped coordinate.
\input item.qdocinc mapping
If item is \nullptr, this maps point to the coordinate system of the scene.
Definition at line 8580 of file qquickitem.cpp.
References item, QGraphicsItem::mapFromScene(), and mapToScene().
Referenced by childAt(), clickableItemAtPosition(), QDeclarativeCircleMapItemPrivateCPU::contains(), QDeclarativePolygonMapItemPrivateCPU::contains(), QDeclarativePolylineMapItemPrivateCPU::contains(), QDeclarativeRectangleMapItemPrivateCPU::contains(), QQuickSelectionRectanglePrivate::createHandle(), QQuickPinchArea::event(), QQuickPageIndicatorPrivate::itemAt(), QWaylandQuickItem::mouseMoveEvent(), and QQuickPopupPositioner::reposition().
QRectF QQuickItem::mapToItem | ( | const QQuickItem * | item, |
const QRectF & | rect | ||
) | const |
Definition at line 9868 of file qquickitem.cpp.
QPointF QQuickItem::mapToItem | ( | const QQuickItem * | item, |
qreal | x, | ||
qreal | y | ||
) |
Definition at line 9864 of file qquickitem.cpp.
References item.
QRectF QQuickItem::mapToItem | ( | const QQuickItem * | item, |
qreal | x, | ||
qreal | y, | ||
qreal | width, | ||
qreal | height | ||
) | const |
Definition at line 9872 of file qquickitem.cpp.
References item.
Maps the given point in this item's coordinate system to the equivalent point within the scene's coordinate system, and returns the mapped coordinate.
\input item.qdocinc mapping
Definition at line 8597 of file qquickitem.cpp.
References d.
Referenced by QQuickDragAttachedPrivate::deliverEnterEvent(), QQuickDragAttachedPrivate::deliverMoveEvent(), QQuickMouseArea::geometryChange(), QQuickText::hoveredLink(), QWaylandQuickItem::hoverEnterEvent(), QWaylandQuickItem::hoverMoveEvent(), QQuickDeliveryAgentPrivate::localizePointerEvent(), mapToItem(), QtQuickTest::mouseEvent(), QWaylandQuickItem::mouseMoveEvent(), QQuickTouchEventSequence::move(), QQuickTouchEventSequence::press(), QQuickTouchEventSequence::release(), and QWaylandQuickItem::touchEvent().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive mouse double-click events for an item.
The event information is provided by the event parameter.
\input item.qdocinc accepting-events
Reimplemented in QQuickMouseArea, QQuickTextEdit, QQuickTextInput, QQuickAbstractButton, QQuickPopupItem, QQuickTextArea, and QQuickTextField.
Definition at line 4149 of file qquickitem.cpp.
Referenced by event(), QQuickMouseArea::mouseDoubleClickEvent(), QQuickTextEdit::mouseDoubleClickEvent(), and QQuickTextInput::mouseDoubleClickEvent().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive mouse move events for an item.
The event information is provided by the event parameter.
In order to receive mouse movement events, the preceding mouse press event must be accepted (by overriding \l mousePressEvent(), for example) and \l acceptedMouseButtons() must return the relevant mouse button.
\input item.qdocinc accepting-events
Reimplemented in QQuickFlickable, QQuickMouseArea, QQuickMultiPointTouchArea, QQuickPathView, QQuickTextEdit, QQuickTextInput, QQuickControl, QQuickOverlay, QQuickPopupItem, QQuickSwipeDelegate, QQuickSwitch, QQuickSwitchDelegate, QQuickTextArea, QQuickTextField, QWaylandMouseTracker, and QWaylandQuickItem.
Definition at line 4121 of file qquickitem.cpp.
Referenced by event(), QQuickFlickable::mouseMoveEvent(), QQuickMouseArea::mouseMoveEvent(), QQuickMultiPointTouchArea::mouseMoveEvent(), QQuickPathView::mouseMoveEvent(), QQuickTextEdit::mouseMoveEvent(), QQuickTextInput::mouseMoveEvent(), QQuickSwipeDelegate::mouseMoveEvent(), QQuickSwitch::mouseMoveEvent(), QQuickSwitchDelegate::mouseMoveEvent(), and QWaylandMouseTracker::mouseMoveEvent().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive mouse press events for an item.
The event information is provided by the event parameter.
In order to receive mouse press events, \l acceptedMouseButtons() must return the relevant mouse button.
\input item.qdocinc accepting-events
Reimplemented in QQuickFlickable, QQuickMouseArea, QQuickMultiPointTouchArea, QQuickPathView, QQuickText, QQuickTextEdit, QQuickTextInput, QQuickAbstractButton, QQuickControl, QQuickDial, QQuickOverlay, QQuickPopupItem, QQuickRangeSlider, QQuickScrollBar, QQuickSlider, QQuickSwipeDelegate, QQuickTextArea, QQuickTextField, QQuickTreeViewDelegate, QDeclarativeGeoMapCopyrightNotice, and QWaylandQuickItem.
Definition at line 4105 of file qquickitem.cpp.
Referenced by event(), QQuickFlickable::mousePressEvent(), QQuickMouseArea::mousePressEvent(), QQuickMultiPointTouchArea::mousePressEvent(), QQuickPathView::mousePressEvent(), QQuickText::mousePressEvent(), QQuickTextEdit::mousePressEvent(), QQuickSwipeDelegate::mousePressEvent(), QQuickTreeViewDelegate::mousePressEvent(), and QDeclarativeGeoMapCopyrightNotice::mousePressEvent().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive mouse release events for an item.
The event information is provided by the event parameter.
In order to receive mouse release events, the preceding mouse press event must be accepted (by overriding \l mousePressEvent(), for example) and \l acceptedMouseButtons() must return the relevant mouse button.
\input item.qdocinc accepting-events
Reimplemented in QQuickPathView, QQuickFlickable, QQuickMouseArea, QQuickMultiPointTouchArea, QQuickText, QQuickTextEdit, QQuickTextInput, QQuickControl, QQuickOverlay, QQuickPopupItem, QQuickSwipeDelegate, QQuickTextArea, QQuickTextField, QDeclarativeGeoMapCopyrightNotice, and QWaylandQuickItem.
Definition at line 4137 of file qquickitem.cpp.
Referenced by QQuickSwipeDelegate::childMouseEventFilter(), event(), QQuickPathView::mouseReleaseEvent(), QQuickFlickable::mouseReleaseEvent(), QQuickMouseArea::mouseReleaseEvent(), QQuickMultiPointTouchArea::mouseReleaseEvent(), QQuickText::mouseReleaseEvent(), QQuickTextEdit::mouseReleaseEvent(), QQuickTextInput::mouseReleaseEvent(), and QQuickSwipeDelegate::mouseReleaseEvent().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to be notified when a mouse ungrab event has occurred on this item.
Reimplemented in QQuickFlickable, QQuickMouseArea, QQuickMultiPointTouchArea, QQuickPathView, QQuickTextInput, QQuickControl, QQuickPopupItem, and QQuickSwipeDelegate.
Definition at line 4158 of file qquickitem.cpp.
Referenced by QQuickDeliveryAgentPrivate::onGrabChanged(), and QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl().
qreal QQuickItem::opacity | ( | ) | const |
Definition at line 6314 of file qquickitem.cpp.
References d.
|
signal |
Referenced by QDeclarativeGeoMapItemBase::QDeclarativeGeoMapItemBase(), QDeclarativeGeoMapItemGroup::QDeclarativeGeoMapItemGroup(), Vsp2Layer::Vsp2Layer(), and setOpacity().
|
signal |
QQuickItem * QQuickItem::parentItem | ( | ) | const |
Definition at line 2626 of file qquickitem.cpp.
References d.
Referenced by QQuickDialogButtonBoxAttached::QQuickDialogButtonBoxAttached(), QQuickTumblerAttached::QQuickTumblerAttached(), QDeclarativeGeoMap::~QDeclarativeGeoMap(), ~QQuickItem(), QQuickOverlay::~QQuickOverlay(), QQuickPopupPositioner::~QQuickPopupPositioner(), QQuickStackElement::~QQuickStackElement(), QQuickTableViewPrivate::~QQuickTableViewPrivate(), QQuickParticlePainter::calcSystemOffset(), QQuickDeliveryAgentPrivate::clearFocusInScope(), QQuickParticleAffector::componentComplete(), QQuickParticleEmitter::componentComplete(), QQuickParticlePainter::componentComplete(), QQuickMaterialPlaceholderText::componentComplete(), QQuickMaterialTextContainer::componentComplete(), QQuickGridLayoutBase::componentComplete(), QQuickStackLayout::componentComplete(), QQuickSelectionRectanglePrivate::createHandle(), QQuickDeliveryAgentPrivate::deliverToPassiveGrabbers(), QQuickPopupPrivate::destroyOverlay(), QQuickTextAreaPrivate::detachFlickable(), QQuickParentChangePrivate::doChange(), QQuickPinchArea::event(), QQuickOverlay::eventFilter(), forceActiveFocus(), QQuickStackElement::fromObject(), QQuickStackElement::fromStackViewArg(), QQuickDragHandler::handlePointerEventImpl(), QQuickTumblerAttachedPrivate::init(), QQuickScrollBarAttachedPrivate::initHorizontal(), QQuickScrollBarAttachedPrivate::initVertical(), QQuickLayout::invalidate(), QQuickGridLayoutBase::invalidate(), QQuickStackLayout::invalidate(), isAncestorOf(), QQuickTumblerView::itemChange(), QQuickTextArea::itemChange(), QQuickScrollBarAttachedPrivate::layoutHorizontal(), QQuickScrollIndicatorAttachedPrivate::layoutHorizontal(), QQuickScrollBarAttachedPrivate::layoutVertical(), QQuickScrollIndicatorAttachedPrivate::layoutVertical(), QQuickMouseArea::mouseMoveEvent(), QQuickItemPrivate::nextPrevItemInTabFocusChain(), QDeclarativeGeoMap::removeMapItemGroup_real(), QQuickDesignerSupport::renderImageForItem(), QQuickPopupPositioner::reposition(), QQuickTextAreaPrivate::resizeBackground(), QQuickItemPrivate::resolveLayoutMirror(), QQuickDeliveryAgentPrivate::sendFilteredMouseEvent(), QQuickDeliveryAgentPrivate::sendFilteredPointerEvent(), QQuickDeliveryAgentPrivate::sendFilteredPointerEventImpl(), QQuickMenuItem::setArrow(), setEnabled(), setFlag(), setFocus(), QQuickDeliveryAgentPrivate::setFocusInScope(), QQuickScrollBarAttached::setHorizontal(), QQuickScrollIndicatorAttached::setHorizontal(), QQuickAbstractButton::setIndicator(), QQuickComboBox::setIndicator(), QQuickIndicatorButton::setIndicator(), setParentItem(), QQuickPopupPositioner::setParentItem(), QQuickScrollBarAttached::setVertical(), QQuickScrollIndicatorAttached::setVertical(), QQuickTableViewPrivate::updateEditItem(), QQuickSelectionRectanglePrivate::updateSelectionMode(), QQuickItemPrivate::updateSubFocusItem(), and viewportItem().
void QQuickItem::polish | ( | ) |
Schedules a polish event for this item.
When the scene graph processes the request, it will call updatePolish() on this item.
Definition at line 4524 of file qquickitem.cpp.
References d, and QQuickWindowPrivate::get().
Referenced by QQuickTextEdit::componentComplete(), QQuickStyleItem::componentComplete(), QQuickCanvasItem::event(), QQuickLayout::invalidate(), QQuickDialogButtonBox::itemAdded(), QQuickTabBar::itemAdded(), QQuickDialogButtonBox::itemRemoved(), QQuickTabBar::itemRemoved(), QQuickCanvasItem::markDirty(), QQuickStyleItem::markGeometryDirty(), QQuickStyleItem::markImageDirty(), QQuickItemView::modelUpdated(), QDeclarativeGeoMapItemBase::polishAndUpdate(), QQuickPopupPositioner::reposition(), QQuickDialogButtonBox::setAlignment(), QQuickCanvasItem::setCanvasSize(), QQuickCanvasItem::setCanvasWindow(), QQuickTextInput::setColor(), QQuickText::setFontSizeMode(), QGfxSourceProxy::setInput(), QGfxSourceProxy::setInterpolation(), QQuickText::setMinimumPixelSize(), QQuickText::setMinimumPointSize(), QQuickTextInput::setSelectedTextColor(), QQuickTextInput::setSelectionColor(), QGfxSourceProxy::setSourceRect(), QQuickDialogButtonBox::setStandardButtons(), QQuickCanvasItem::setTileSize(), QQuickItemView::trackedPositionChanged(), and QQuickMultiEffectPrivate::updateProxyActiveCheck().
QPointF QQuickItem::position | ( | ) | const |
Definition at line 7052 of file qquickitem.cpp.
References d.
Referenced by QQuickPinchArea::event(), QQuickItemViewFxItem::geometry(), QQuickDragHandler::handlePointerEventImpl(), QQuickSplitViewPrivate::handlePress(), QQuickTextInput::insert(), QWaylandQuickItem::mouseMoveEvent(), QQuickTextInput::moveCursorSelection(), QQuickItemViewTransitionableItem::moveTo(), QQuickPinchHandler::onActiveChanged(), QQuick3DViewport::pick(), QQuickTextInput::positionAt(), QQuickItemViewTransitionableItem::prepareTransition(), QQuickFolderBreadcrumbBarPrivate::resizeContent(), QWaylandQuickItem::sendMouseMoveEvent(), and QDeclarativeGeoMap::toCoordinate().
QQuickItem::Q_REVISION | ( | 2 | , |
1 | |||
) |
|
signal |
|
signal |
|
signal |
QQuickItem::Q_REVISION | ( | 2 | , |
4 | |||
) | const & |
QQuickItem::Q_REVISION | ( | 2 | , |
7 | |||
) | const & |
QQuickItem::Q_REVISION | ( | 2 | , |
7 | |||
) |
QQuickItem::Q_REVISION | ( | 2 | , |
7 | |||
) | const & |
QQuickItem::Q_REVISION | ( | 2 | , |
7 | |||
) |
|
signal |
|
signal |
QQuickItem::Q_REVISION | ( | 6 | , |
3 | |||
) | const |
QQuickItem::Q_REVISION | ( | 6 | , |
3 | |||
) |
|
protectedvirtual |
This function is called when an item should release graphics resources which are not already managed by the nodes returned from QQuickItem::updatePaintNode().
This happens when the item is about to be removed from the window it was previously rendering to. The item is guaranteed to have a \l {QQuickItem::window()}{window} when the function is called.
The function is called on the GUI thread and the state of the rendering thread, when it is used, is unknown. Objects should not be deleted directly, but instead scheduled for cleanup using QQuickWindow::scheduleRenderJob().
Reimplemented in QQuickCanvasItem, QQuickFramebufferObject, QQuickImage, QQuickPaintedItem, QQuickShaderEffectSource, QQuickVideoOutput, and QQuick3DViewport.
Definition at line 3930 of file qquickitem.cpp.
void QQuickItem::resetAntialiasing | ( | ) |
Definition at line 6927 of file qquickitem.cpp.
References antialiasing, antialiasingChanged(), d, and emit.
void QQuickItem::resetHeight | ( | ) |
Definition at line 7391 of file qquickitem.cpp.
References d, implicitHeight, and setImplicitHeight().
Referenced by QQuickStackElement::~QQuickStackElement().
void QQuickItem::resetWidth | ( | ) |
Definition at line 7185 of file qquickitem.cpp.
References d, implicitWidth, and setImplicitWidth().
Referenced by QQuickStackElement::~QQuickStackElement().
qreal QQuickItem::rotation | ( | ) | const |
Definition at line 6085 of file qquickitem.cpp.
References d.
|
signal |
Referenced by QmlJSDebugger::Highlight::setItem(), and setRotation().
qreal QQuickItem::scale | ( | ) | const |
Definition at line 6185 of file qquickitem.cpp.
References d.
|
signal |
QQuickItem * QQuickItem::scopedFocusItem | ( | ) | const |
If this item is a focus scope, this returns the item in its focus chain that currently has focus.
Returns \nullptr if this item is not a focus scope.
Definition at line 7814 of file qquickitem.cpp.
References d, and isFocusScope().
Referenced by QQuickDeliveryAgentPrivate::setFocusInScope().
void QQuickItem::setAcceptedMouseButtons | ( | Qt::MouseButtons | buttons | ) |
Sets the mouse buttons accepted by this item to buttons.
Definition at line 7869 of file qquickitem.cpp.
References Qt::AllButtons, d, Qt::LeftButton, and QQuickItemPrivate::LeftMouseButtonAccepted.
Referenced by QQuickAbstractButton::QQuickAbstractButton(), QQuickAbstractButton::QQuickAbstractButton(), QQuickAbstractColorPicker::QQuickAbstractColorPicker(), QQuickComboBox::QQuickComboBox(), QQuickDial::QQuickDial(), QQuickMonthGrid::QQuickMonthGrid(), QQuickMultiPointTouchArea::QQuickMultiPointTouchArea(), QQuickOverlay::QQuickOverlay(), QQuickPopupItem::QQuickPopupItem(), QQuickRangeSlider::QQuickRangeSlider(), QQuickScrollBar::QQuickScrollBar(), QQuickSlider::QQuickSlider(), QQuickSpinBox::QQuickSpinBox(), QQuickTextArea::QQuickTextArea(), QQuickTextField::QQuickTextField(), QWaylandMouseTracker::QWaylandMouseTracker(), QDeclarativeGeoMapCopyrightNotice::copyrightsImageChanged(), QQuickSplitViewPrivate::createHandleItem(), QDeclarativeGeoMapCopyrightNotice::rasterizeHtmlAndUpdate(), QQuickMouseArea::setAcceptedButtons(), QQuickAbstractButton::setIndicator(), QQuickPageIndicator::setInteractive(), and QQuickText::setTextFormat().
void QQuickItem::setAcceptHoverEvents | ( | bool | enabled | ) |
If enabled is true, this sets the item to accept hover events; otherwise, hover events are not accepted by this item.
Definition at line 7952 of file qquickitem.cpp.
References QQuickItemPrivate::Content, d, and enabled.
Referenced by QQuickMultiPointTouchArea::QQuickMultiPointTouchArea(), QQuickPinchArea::QQuickPinchArea(), QWaylandMouseTracker::QWaylandMouseTracker(), QQuickControl::componentComplete(), QQuickTextArea::componentComplete(), QQuickTextField::componentComplete(), QQuickMouseArea::setEnabled(), QQuickMouseArea::setHoverEnabled(), QQuickText::setText(), and QQuickText::setTextFormat().
void QQuickItem::setAcceptTouchEvents | ( | bool | enabled | ) |
If enabled is true, this sets the item to accept touch events; otherwise, touch events are not accepted by this item.
Definition at line 7987 of file qquickitem.cpp.
Referenced by QQuickAbstractButton::QQuickAbstractButton(), QQuickAbstractButton::QQuickAbstractButton(), QQuickDial::QQuickDial(), QQuickMultiPointTouchArea::QQuickMultiPointTouchArea(), QQuickOverlay::QQuickOverlay(), QQuickPinchArea::QQuickPinchArea(), QQuickPopupItem::QQuickPopupItem(), QQuickRangeSlider::QQuickRangeSlider(), QQuickRectangle::QQuickRectangle(), QQuickScrollBar::QQuickScrollBar(), QQuickSlider::QQuickSlider(), QQuickSwipeDelegate::QQuickSwipeDelegate(), and QQuickPageIndicator::setInteractive().
void QQuickItem::setActiveFocusOnTab | ( | bool | activeFocusOnTab | ) |
Definition at line 6864 of file qquickitem.cpp.
References activeFocusOnTab(), d, emit, qWarning, and window().
Referenced by QQuickAbstractButton::QQuickAbstractButton(), QQuickAbstractButton::QQuickAbstractButton(), QQuickAbstractColorPicker::QQuickAbstractColorPicker(), QQuickDial::QQuickDial(), QQuickMonthGrid::QQuickMonthGrid(), QQuickSlider::QQuickSlider(), QQuickSwipeView::QQuickSwipeView(), QQuickTextArea::QQuickTextArea(), QQuickTextField::QQuickTextField(), QQuickTumbler::QQuickTumbler(), QQuickSpinBox::contentItemChange(), and QQuickControl::setFocusPolicy().
void QQuickItem::setAntialiasing | ( | bool | aa | ) |
Definition at line 6907 of file qquickitem.cpp.
References antialiasing, QQuickItemPrivate::Antialiasing, antialiasingChanged(), d, emit, and ItemAntialiasingHasChanged.
Definition at line 4474 of file qquickitem.cpp.
References QQuickItemChangeListener::anchorPrivate(), QQuickAnchors::BaselineAnchor, baselineOffsetChanged(), d, emit, QQuickItemPrivate::Geometry, QQuickAnchorsPrivate::get(), QQuickItemPrivate::ChangeListener::listener, and QQuickAnchorsPrivate::updateVerticalAnchors().
Referenced by QQuickControl::setBaselineOffset().
void QQuickItem::setClip | ( | bool | c | ) |
Definition at line 3786 of file qquickitem.cpp.
References clip(), clipChanged(), emit, QObject::inherits(), ItemClipsChildrenToShape, ItemIsViewport, and setFlag().
Referenced by QQuickScrollViewPrivate::ensureFlickable(), QQuickBasicProgressBar::setIndeterminate(), and QQuickUniversalProgressBar::setIndeterminate().
Definition at line 8528 of file qquickitem.cpp.
References d, emit, QQuickItemPrivate::get(), QByteArrayLiteral, qmlWarning(), qobject_cast< QQuickItem * >(), QStringLiteral, and QQuickItemPrivate::registerAsContainmentMask().
void QQuickItem::setEnabled | ( | bool | e | ) |
Definition at line 6473 of file qquickitem.cpp.
References d, e, isFocusScope(), and parentItem().
Referenced by QQuickAbstractButton::setAction(), QWaylandQuickItem::setInputEventsEnabled(), QQuickSpinBoxPrivate::updateDownEnabled(), QQuickFlipablePrivate::updateSide(), and QQuickSpinBoxPrivate::updateUpEnabled().
void QQuickItem::setFiltersChildMouseEvents | ( | bool | filter | ) |
Sets whether pointer events intended for this item's children should be filtered through this item.
If filter is true, childMouseEventFilter() will be called when a pointer event is triggered for a child item.
Definition at line 7907 of file qquickitem.cpp.
References d.
Referenced by QQuickMultiPointTouchArea::QQuickMultiPointTouchArea(), QQuickOverlay::QQuickOverlay(), QQuickScrollView::QQuickScrollView(), QQuickSpinBox::QQuickSpinBox(), QQuickSplitView::QQuickSplitView(), QQuickSplitView::QQuickSplitView(), and QWaylandMouseTracker::QWaylandMouseTracker().
Enables the specified flag for this item if enabled is true; if enabled is false, the flag is disabled.
These provide various hints for the item; for example, the ItemClipsChildrenToShape flag indicates that all children of this item should be clipped to fit within the item area.
Definition at line 6967 of file qquickitem.cpp.
References d, QQuickItemPrivate::get(), ItemObservesViewport, parentItem(), qCDebug, and setFlags().
Referenced by QDeclarativeCircleMapItem::QDeclarativeCircleMapItem(), QDeclarativeGeoMapQuickItem::QDeclarativeGeoMapQuickItem(), QDeclarativePolygonMapItem::QDeclarativePolygonMapItem(), QDeclarativePolylineMapItem::QDeclarativePolylineMapItem(), QDeclarativeRectangleMapItem::QDeclarativeRectangleMapItem(), QDeclarativeRouteMapItem::QDeclarativeRouteMapItem(), QQuick3DViewport::QQuick3DViewport(), QQuickAnimatedSprite::QQuickAnimatedSprite(), QQuickBasicBusyIndicator::QQuickBasicBusyIndicator(), QQuickBasicProgressBar::QQuickBasicProgressBar(), QQuickCanvasItem::QQuickCanvasItem(), QQuickComboBox::QQuickComboBox(), QQuickFocusScope::QQuickFocusScope(), QQuickFramebufferObject::QQuickFramebufferObject(), QQuickImageBase::QQuickImageBase(), QQuickImageBase::QQuickImageBase(), QQuickImageParticle::QQuickImageParticle(), QQuickItemParticle::QQuickItemParticle(), QQuickLoader::QQuickLoader(), QQuickMaterialBusyIndicator::QQuickMaterialBusyIndicator(), QQuickMaterialProgressBar::QQuickMaterialProgressBar(), QQuickMaterialRipple::QQuickMaterialRipple(), QQuickMenuBar::QQuickMenuBar(), QQuickMonthGrid::QQuickMonthGrid(), QQuickMultiPointTouchArea::QQuickMultiPointTouchArea(), QQuickPaintedItem::QQuickPaintedItem(), QQuickPaintedItem::QQuickPaintedItem(), QQuickPopupItem::QQuickPopupItem(), QQuickRangeSlider::QQuickRangeSlider(), QQuickRectangle::QQuickRectangle(), QQuickRootItem::QQuickRootItem(), QQuickShaderEffect::QQuickShaderEffect(), QQuickShaderEffectSource::QQuickShaderEffectSource(), QQuickShape::QQuickShape(), QQuickSpinBox::QQuickSpinBox(), QQuickSpriteSequence::QQuickSpriteSequence(), QQuickStackView::QQuickStackView(), QQuickStyleItem::QQuickStyleItem(), QQuickSwipeView::QQuickSwipeView(), QQuickTabBar::QQuickTabBar(), QQuickUniversalBusyIndicator::QQuickUniversalBusyIndicator(), QQuickUniversalProgressBar::QQuickUniversalProgressBar(), QQuickVideoOutput::QQuickVideoOutput(), setClip(), QQuickTextEdit::setReadOnly(), QQuickTextInput::setReadOnly(), QQuickViewPrivate::setRootObject(), QQuickText::setText(), and QQuickTextEdit::setText().
Enables the specified flags for this item.
Definition at line 6992 of file qquickitem.cpp.
References QQuickItemPrivate::Clip, d, flags(), ItemClipsChildrenToShape, ItemIsFocusScope, and qWarning.
Referenced by QDeclarativeGeoMap::QDeclarativeGeoMap(), QQuickDropArea::QQuickDropArea(), and setFlag().
void QQuickItem::setFocus | ( | bool | focus, |
Qt::FocusReason | reason | ||
) |
Definition at line 7739 of file qquickitem.cpp.
References d, QVarLengthArray< T, Prealloc >::data(), emit, focus, QQuickItemPrivate::Focus, QQuickItemPrivate::focus, focusChanged(), QQuickItemPrivate::get(), hasFocus(), isFocusScope(), QQuickItemChangeListener::itemFocusChanged(), QQuickDeliveryAgentPrivate::notifyFocusChangesRecur(), parentItem(), Q_ASSERT, QVLABaseBase::size(), QQuickItemPrivate::subFocusItem, and QQuickItemPrivate::updateSubFocusItem().
void QQuickItem::setFocus | ( | bool | focus | ) |
Definition at line 7734 of file qquickitem.cpp.
References focus, Qt::OtherFocusReason, and setFocus().
Referenced by QQuickPathViewPrivate::createCurrentItem(), QQuickMenuBar::eventFilter(), forceActiveFocus(), QQuickMenuBar::keyPressEvent(), QQuickPopupPrivate::prepareEnterTransition(), QQuickPopupPrivate::prepareExitTransition(), setFocus(), and QQuickItemViewPrivate::updateCurrent().
Definition at line 7368 of file qquickitem.cpp.
References d, geometryChange(), qt_is_nan(), and QQuickItemPrivate::Size.
Referenced by QQuickLoaderPrivate::_q_updateSize(), QQuickStackView::geometryChange(), QQuickStackElement::initialize(), QQuickScrollBarAttachedPrivate::layoutVertical(), QQuickScrollIndicatorAttachedPrivate::layoutVertical(), QDeclarativeGeoMapItemGroup::onMapSizeChanged(), QQuickApplicationWindowPrivate::relayout(), QQuickPagePrivate::relayout(), QQuickPopupPositioner::reposition(), QQuickLabelPrivate::resizeBackground(), QQuickTextAreaPrivate::resizeBackground(), QQuickTextFieldPrivate::resizeBackground(), QQuickSwipeDelegatePrivate::resizeBackground(), QQuickSwipeDelegatePrivate::resizeContent(), QQuickSplitViewPrivate::resizeHandle(), QQuickRootItem::setHeight(), QQuickLoaderPrivate::setInitialState(), QQuickAnchorsPrivate::setItemHeight(), FxListItemSG::setSize(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativeGeoMapQuickItem::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), QQuickViewPrivate::updateSize(), QQuickWidgetPrivate::updateSize(), and QQuickMultiEffectPrivate::updateSourcePadding().
Definition at line 7425 of file qquickitem.cpp.
References d, geometryChange(), heightValid(), Q_ASSERT, and QQuickItemPrivate::Size.
Referenced by QQuickItemGroup::itemImplicitHeightChanged(), resetHeight(), QQuickAnimatedSprite::setFrameHeight(), QQuickVideoOutput::setOrientation(), and QQuickLayoutItemProxy::setTarget().
Definition at line 7459 of file qquickitem.cpp.
References d, geometryChange(), height, heightValid(), QQuickItemPrivate::Size, width, and widthValid().
Referenced by QQuickLayoutPrivate::applySizeHints(), QDeclarativeGeoMapCopyrightNotice::copyrightsImageChanged(), QQuickImageBase::loadEmptyUrl(), QQuickImageBase::pixmapChange(), QQuickBasePositioner::prePositioning(), QDeclarativeGeoMapCopyrightNotice::rasterizeHtmlAndUpdate(), QQuickBorderImage::requestFinished(), QQuickItemGroup::updateImplicitSize(), and QQuickImage::updatePaintedGeometry().
\qmlproperty real QtQuick::Item::implicitWidth \qmlproperty real QtQuick::Item::implicitHeight Defines the preferred width or height of the Item. If \l width or \l height is not specified, an item's effective size will be determined by its \l implicitWidth or \l implicitHeight. However, if an item is the child of a \l {Qt Quick Layouts}{layout}, the layout will determine the item's preferred size using its implicit size. In such a scenario, the explicit \l width or \l height will be ignored. The default implicit size for most items is 0x0, however some items have an inherent implicit size which cannot be overridden, for example, \l [QML] Image and \l [QML] Text. Setting the implicit size is useful for defining components that have a preferred size based on their content, for example: \qml
Label.qml import QtQuick 2.0
Item { property alias icon: image.source property alias label: text.text implicitWidth: text.implicitWidth + image.implicitWidth implicitHeight: Math.max(text.implicitHeight, image.implicitHeight) Image { id: image } Text { id: text wrapMode: Text.Wrap anchors.left: image.right; anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter } } \endqml
\property QQuickItem::implicitWidth \property QQuickItem::implicitHeight Defines the preferred width or height of the Item. If \l width or \l height is not specified, an item's effective size will be determined by its \l implicitWidth or \l implicitHeight. However, if an item is the child of a \l {Qt Quick Layouts}{layout}, the layout will determine the item's preferred size using its implicit size. In such a scenario, the explicit \l width or \l height will be ignored. The default implicit size for most items is 0x0, however some items have an inherent implicit size which cannot be overridden, for example, \l [QML] Image and \l [QML] Text. Setting the implicit size is useful for defining components that have a preferred size based on their content, for example: \qml
Label.qml import QtQuick 2.0
Item { property alias icon: image.source property alias label: text.text implicitWidth: text.implicitWidth + image.implicitWidth implicitHeight: Math.max(text.implicitHeight, image.implicitHeight) Image { id: image } Text { id: text wrapMode: Text.Wrap anchors.left: image.right; anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter } } \endqml
Definition at line 7300 of file qquickitem.cpp.
References d, geometryChange(), Q_ASSERT, QQuickItemPrivate::Size, and widthValid().
Referenced by QQuickItemGroup::itemImplicitWidthChanged(), resetWidth(), QQuickAnimatedSprite::setFrameWidth(), QQuickVideoOutput::setOrientation(), and QQuickLayoutItemProxy::setTarget().
void QQuickItem::setKeepMouseGrab | ( | bool | keep | ) |
Sets whether the mouse input should remain exclusively with this item.
This is useful for items that wish to grab and keep mouse interaction following a predefined gesture. For example, an item that is interested in horizontal mouse movement may set keepMouseGrab to true once a threshold has been exceeded. Once keepMouseGrab has been set to true, filtering items will not react to mouse events.
If keep is false, a filtering item may steal the grab. For example, \l Flickable may attempt to steal a mouse grab if it detects that the user has begun to move the viewport.
Definition at line 8341 of file qquickitem.cpp.
References d.
Referenced by QQuickScrollBar::QQuickScrollBar(), QDeclarativeGeoMapCopyrightNotice::copyrightsImageChanged(), QQuickSplitViewPrivate::createHandleItem(), QQuickMultiPointTouchArea::grabGesture(), QQuickDrawerPrivate::grabMouse(), QQuickDrawerPrivate::handleRelease(), QQuickMouseArea::mouseMoveEvent(), QQuickTextInput::mouseMoveEvent(), QQuickSwitch::mouseMoveEvent(), QQuickSwitchDelegate::mouseMoveEvent(), QQuickMouseArea::mousePressEvent(), QQuickMultiPointTouchArea::mousePressEvent(), QQuickTextEdit::mousePressEvent(), QQuickTextInput::mousePressEvent(), QQuickDial::mousePressEvent(), QQuickRangeSlider::mousePressEvent(), QQuickSlider::mousePressEvent(), QQuickMouseArea::mouseReleaseEvent(), QQuickMultiPointTouchArea::mouseReleaseEvent(), QQuickTextInput::mouseReleaseEvent(), QQuickPathView::mouseUngrabEvent(), QQuickTextInput::mouseUngrabEvent(), QQuickDragHandler::onActiveChanged(), QDeclarativeGeoMapCopyrightNotice::rasterizeHtmlAndUpdate(), QQuickMultiPointTouchArea::sendMouseEvent(), QQuickMouseArea::setPreventStealing(), QQuickMouseArea::setPropagateComposedEvents(), and QQuickTextEdit::setSelectByMouse().
void QQuickItem::setKeepTouchGrab | ( | bool | keep | ) |
Sets whether the touch points grabbed by this item should remain exclusively with this item.
This is useful for items that wish to grab and keep specific touch points following a predefined gesture. For example, an item that is interested in horizontal touch point movement may set setKeepTouchGrab to true once a threshold has been exceeded. Once setKeepTouchGrab has been set to true, filtering items will not react to the relevant touch points.
If keep is false, a filtering item may steal the grab. For example, \l Flickable may attempt to steal a touch point grab if it detects that the user has begun to move the viewport.
Definition at line 8411 of file qquickitem.cpp.
References d.
Referenced by QQuickMultiPointTouchArea::grabGesture(), QQuickDrawerPrivate::handleRelease(), and QQuickDragHandler::onActiveChanged().
Definition at line 6320 of file qquickitem.cpp.
References d, emit, ItemOpacityHasChanged, o, opacityChanged(), and QQuickItemPrivate::OpacityValue.
Referenced by QQuickPopupPrivate::finalizeExitTransition(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativeGeoMapQuickItem::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), QQuickFlipablePrivate::updateSide(), and QQuickOpacityAnimatorJob::writeBack().
void QQuickItem::setParentItem | ( | QQuickItem * | parent | ) |
Definition at line 2632 of file qquickitem.cpp.
References QQuickItemPrivate::addChild(), d, QQuickDeliveryAgentPrivate::DontChangeFocusProperty, emit, QQuickItemPrivate::focus, focusChanged(), QQuickItemPrivate::get(), QQuickWindowPrivate::get(), hasFocus(), QQuickItemPrivate::inDestructor, QSet< T >::insert(), isFocusScope(), isVisible(), ItemParentHasChanged, Qt::OtherFocusReason, parentChanged(), QQuickItemPrivate::ParentChanged, parentItem(), QQuickWindowPrivate::parentlessItems, Q_UNLIKELY, qWarning, QSet< T >::remove(), QQuickItemPrivate::removeChild(), QQuickItemPrivate::subFocusItem, QQuickItemPrivate::updateSubFocusItem(), visibleChildrenChanged(), and QQuickItemPrivate::window.
Referenced by QDeclarativeGeoMapQuickItem::QDeclarativeGeoMapQuickItem(), QmlJSDebugger::QQuickWindowInspector::QQuickWindowInspector(), ~QQuickItem(), QQuickItemViewFxItem::~QQuickItemViewFxItem(), QQuickStackElement::~QQuickStackElement(), QDeclarativeGeoMap::addMapItemGroup_real(), QQuickTextAreaPrivate::attachFlickable(), QQuickLoaderPrivate::clear(), QQuickScrollView::contentItemChange(), QQuickSelectionRectanglePrivate::createHandle(), QQuickSplitViewPrivate::createHandleItem(), QQuickPathViewPrivate::createHighlight(), QQuickPopupPrivate::destroyOverlay(), QQuickTextAreaPrivate::detachFlickable(), QQuickPopupPrivate::finalizeExitTransition(), QQuickListViewPrivate::getSectionItem(), QQuickFlickablePrivate::init(), QQuickMultiEffectPrivate::initialize(), QQuickStackElement::initialize(), QQuickPopupPrivate::prepareEnterTransition(), QDeclarativeGeoMap::removeMapItemGroup_real(), QQuickMenuItem::setArrow(), QQuickControl::setBackground(), QQuickLabel::setBackground(), QQuickTextArea::setBackground(), QQuickTextField::setBackground(), QQuickPage::setFooter(), QQuickAbstractColorPicker::setHandle(), QQuickRangeSliderNode::setHandle(), QQuickSlider::setHandle(), QQuickPage::setHeader(), QQuickScrollBarAttached::setHorizontal(), QQuickScrollIndicatorAttached::setHorizontal(), QQuickAbstractButton::setIndicator(), QQuickComboBox::setIndicator(), QQuickIndicatorButton::setIndicator(), QQuickLoaderPrivate::setInitialState(), QQuickGroupBox::setLabel(), QQuickWidgetPrivate::setRootObject(), QQuick3DTexture::setSourceItem(), QQuickScrollBarAttached::setVertical(), QQuickScrollIndicatorAttached::setVertical(), QQuickParticleSystem::stateRedirect(), and QDeclarativeGeoMapQuickItem::updatePolish().
Definition at line 7110 of file qquickitem.cpp.
References d, geometryChange(), pos, and QQuickItemPrivate::Position.
Referenced by QQuickSinglePointHandler::moveTarget(), QQuickItemViewFxItem::moveTo(), QQuickItemViewTransitionableItem::moveTo(), QQuickItemViewTransitionableItem::prepareTransition(), QQuickPopupPositioner::reposition(), QQuickControlPrivate::resizeContent(), QQuickFolderBreadcrumbBarPrivate::resizeContent(), QQuickDialogButtonBoxPrivate::resizeContent(), QQuickScrollBarPrivate::resizeContent(), QQuickScrollIndicatorPrivate::resizeContent(), QQuickDrawerPrivate::resizeOverlay(), QQuickItemViewFxItem::setGeometry(), QQuickGridLayoutItem::setGeometry(), and QQuickAnchorsPrivate::setItemPos().
Definition at line 6091 of file qquickitem.cpp.
References QQuickItemPrivate::BasicTransform, d, emit, ItemRotationHasChanged, and rotationChanged().
Referenced by QQuickRotationAnimatorJob::writeBack().
Definition at line 6191 of file qquickitem.cpp.
References QQuickItemPrivate::BasicTransform, d, emit, and scaleChanged().
Referenced by QQuickPopupPrivate::finalizeExitTransition(), and QQuickScaleAnimatorJob::writeBack().
Sets the size of the item to size. This methods preserves any existing binding on width and height; thus any change that triggers the binding to execute again will override the set values.
Definition at line 7545 of file qquickitem.cpp.
References d, geometryChange(), and QQuickItemPrivate::Size.
Referenced by QQuickLoaderPrivate::_q_updateSize(), QQuickWindowPrivate::init(), QQuickMultiEffectPrivate::initialize(), QQuickControlPrivate::resizeBackground(), QQuickControlPrivate::resizeContent(), QQuickFolderBreadcrumbBarPrivate::resizeContent(), QQuickDialogButtonBoxPrivate::resizeContent(), QQuickScrollBarPrivate::resizeContent(), QQuickScrollIndicatorPrivate::resizeContent(), QQuickPopupPrivate::resizeOverlay(), QQuickDrawerPrivate::resizeOverlay(), QQuickItemViewFxItem::setGeometry(), QQuickGridLayoutItem::setGeometry(), QQuickAnchorsPrivate::setItemSize(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), QQuickViewPrivate::updateSize(), QQuickWidgetPrivate::updateSize(), and QQuickMultiEffectPrivate::updateSourcePadding().
void QQuickItem::setSmooth | ( | bool | smooth | ) |
Definition at line 6823 of file qquickitem.cpp.
References d, emit, smooth, QQuickItemPrivate::Smooth, and smoothChanged().
void QQuickItem::setTransformOrigin | ( | TransformOrigin | origin | ) |
Definition at line 5811 of file qquickitem.cpp.
References d, emit, QQuickItemPrivate::TransformOrigin, and transformOriginChanged().
Referenced by QQuickMaterialPlaceholderText::QQuickMaterialPlaceholderText(), and QDeclarativeGeoMapQuickItem::updatePolish().
Definition at line 5841 of file qquickitem.cpp.
References d, and QQuickItemPrivate::TransformOrigin.
void QQuickItem::setVisible | ( | bool | v | ) |
Definition at line 6420 of file qquickitem.cpp.
References d.
Referenced by QQuickOverlay::QQuickOverlay(), QQuickLoaderPrivate::clear(), QQuickSwipePrivate::createAndShowBehindItem(), QQuickSwipePrivate::createAndShowLeftItem(), QQuickSwipePrivate::createAndShowRightItem(), QmlJSDebugger::InspectTool::enterEvent(), QQuickPopupPrivate::finalizeExitTransition(), QQuickListViewPrivate::getSectionItem(), QmlJSDebugger::InspectTool::hoverMoveEvent(), QQuickFontDialogImpl::init(), QQuickPopupPrivate::init(), QQuickBasicBusyIndicator::itemChange(), QQuickFusionBusyIndicator::itemChange(), QQuickMaterialBusyIndicator::itemChange(), QQuickOverlay::itemChange(), QQuickSplitViewPrivate::itemVisibilityChanged(), QmlJSDebugger::InspectTool::leaveEvent(), QmlJSDebugger::InspectTool::mouseDoubleClickEvent(), QmlJSDebugger::InspectTool::mousePressEvent(), QQuickPopupPrivate::prepareEnterTransition(), QQuickListViewPrivate::releaseItem(), QQuickListViewPrivate::releaseSectionItem(), QQuickStackViewAttached::resetVisible(), QQuickStackLayout::setCurrentIndex(), QQuickColorInputs::setHslAlphaInput(), QQuickColorInputs::setHsvAlphaInput(), QQuickColorDialogImpl::setOptions(), QQuickMessageDialogImpl::setOptions(), QQuickColorInputs::setRgbAlphaInput(), QQuickBasicBusyIndicator::setRunning(), QQuickFusionBusyIndicator::setRunning(), QQuickMaterialBusyIndicator::setRunning(), QQuickLayoutItemProxy::setTarget(), QQuickStackElement::setVisible(), QQuickStackViewAttached::setVisible(), QQuickFolderBreadcrumbBarPrivate::toggleTextFieldVisibility(), QQuickTextEditPrivate::transformChanged(), QQuickSplitViewPrivate::updateHandleVisibilities(), QQuickTreeViewDelegatePrivate::updateIndicatorVisibility(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativeGeoMapQuickItem::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), and QQuickListViewPrivate::updateStickySections().
Definition at line 7165 of file qquickitem.cpp.
References d, geometryChange(), qt_is_nan(), and QQuickItemPrivate::Size.
Referenced by QQuickLoaderPrivate::_q_updateSize(), QQuickStackView::geometryChange(), QQuickStackElement::initialize(), QQuickScrollBarAttachedPrivate::layoutHorizontal(), QQuickScrollIndicatorAttachedPrivate::layoutHorizontal(), QDeclarativeGeoMapItemGroup::onMapSizeChanged(), QQuickApplicationWindowPrivate::relayout(), QQuickPagePrivate::relayout(), QQuickPopupPositioner::reposition(), QQuickLabelPrivate::resizeBackground(), QQuickTextAreaPrivate::resizeBackground(), QQuickTextFieldPrivate::resizeBackground(), QQuickSwipeDelegatePrivate::resizeBackground(), QQuickSwipeDelegatePrivate::resizeContent(), QQuickSplitViewPrivate::resizeHandle(), QQuickLoaderPrivate::setInitialState(), QQuickAnchorsPrivate::setItemWidth(), FxListItemSG::setSize(), QQuickRootItem::setWidth(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativeGeoMapQuickItem::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), QQuickViewPrivate::updateSize(), QQuickWidgetPrivate::updateSize(), and QQuickMultiEffectPrivate::updateSourcePadding().
Definition at line 7058 of file qquickitem.cpp.
References d, geometryChange(), QQuickItemPrivate::Position, and qt_is_nan().
Referenced by QQuickSplitViewPrivate::layoutPositionItems(), QQuickScrollBarAttachedPrivate::layoutVertical(), QQuickScrollIndicatorAttachedPrivate::layoutVertical(), QQuickPagePrivate::relayout(), QQuickDrawerPositioner::reposition(), QQuickControlPrivate::resizeBackground(), QQuickLabelPrivate::resizeBackground(), QQuickTextAreaPrivate::resizeBackground(), QQuickTextFieldPrivate::resizeBackground(), QQuickAnchorsPrivate::setItemX(), FxListItemSG::setPosition(), QQuickFlickablePrivate::setViewportX(), QQuickTableViewPrivate::updateEditItem(), QQuickSelectionRectanglePrivate::updateHandles(), QQuickMultiEffectPrivate::updateSourcePadding(), QQuickListViewPrivate::updateStickySections(), and QQuickXAnimatorJob::writeBack().
Definition at line 7086 of file qquickitem.cpp.
References d, geometryChange(), QQuickItemPrivate::Position, and qt_is_nan().
Referenced by QQuickScrollBarAttachedPrivate::layoutHorizontal(), QQuickScrollIndicatorAttachedPrivate::layoutHorizontal(), QQuickSplitViewPrivate::layoutPositionItems(), QQuickApplicationWindowPrivate::relayout(), QQuickPagePrivate::relayout(), QQuickDrawerPositioner::reposition(), QQuickControlPrivate::resizeBackground(), QQuickLabelPrivate::resizeBackground(), QQuickTextAreaPrivate::resizeBackground(), QQuickTextFieldPrivate::resizeBackground(), QQuickSwipeDelegatePrivate::resizeBackground(), QQuickSwipeDelegatePrivate::resizeContent(), QQuickAnchorsPrivate::setItemY(), FxListItemSG::setPosition(), QQuickFlickablePrivate::setViewportY(), QQuickSelectionRectanglePrivate::updateHandles(), QQuickMultiEffectPrivate::updateSourcePadding(), QQuickListViewPrivate::updateStickySections(), and QQuickYAnimatorJob::writeBack().
Definition at line 6011 of file qquickitem.cpp.
References QQuickItemPrivate::ChildrenStackingChanged, d, QQuickItemPrivate::dirty(), emit, QQuickItemPrivate::get(), QQuickItemPrivate::markSortedChildrenDirty(), zChanged(), and QQuickItemPrivate::ZValue.
Referenced by QmlJSDebugger::HoverHighlight::HoverHighlight(), QDeclarativeCircleMapItemPrivateCPU::QDeclarativeCircleMapItemPrivateCPU(), QDeclarativePolygonMapItemPrivateCPU::QDeclarativePolygonMapItemPrivateCPU(), QDeclarativePolylineMapItemPrivateCPU::QDeclarativePolylineMapItemPrivateCPU(), QDeclarativeRectangleMapItemPrivateCPU::QDeclarativeRectangleMapItemPrivateCPU(), QQuickOverlay::QQuickOverlay(), QmlJSDebugger::QQuickWindowInspector::QQuickWindowInspector(), QQuickSelectionRectanglePrivate::createHandle(), QQuickListViewPrivate::getSectionItem(), QQuickPopupPrivate::prepareEnterTransition(), QQuickControl::setBackground(), QQuickLabel::setBackground(), QQuickTextArea::setBackground(), QQuickTextField::setBackground(), QDeclarativeGeoMapCopyrightNotice::setCopyrightsZ(), QQuickPage::setFooter(), QQuickRangeSliderNode::setHandle(), and QQuickPage::setHeader().
QSizeF QQuickItem::size | ( | ) | const |
Returns the size of the item.
Definition at line 7528 of file qquickitem.cpp.
References d.
Referenced by QQuickBasePositioner::componentComplete(), QQuickTextInput::cursorRectangle(), QQuickLayout::effectiveSizeHints_helper(), QQuickItemViewFxItem::geometry(), QQuickStyleItem::imageSize(), QQuickTextInput::positionToRectangle(), QQuickGridLayoutBase::rearrange(), QQuickDesignerSupport::refFromEffectItem(), QQuickFolderBreadcrumbBarPrivate::resizeContent(), QQuickTextInput::selectAll(), QQuickCanvasItem::setCanvasSize(), QQuickPaintedItem::setContentsSize(), QQuickTextInput::setCursorPosition(), QQuickText::setMinimumPixelSize(), QQuickText::setMinimumPointSize(), QQuickImageBase::setSourceSize(), QQuickPaintedItem::setTextureSize(), QQuickShaderEffectSource::setTextureSize(), QQuickCanvasItem::setTileSize(), QQuickGridViewPrivate::updateHighlight(), QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), QDeclarativePolylineMapItemPrivateCPU::updatePolish(), QDeclarativeRectangleMapItemPrivateCPU::updatePolish(), QQuickMultiEffectPrivate::updateSourcePadding(), and QQuick3DTexture::updateSpatialNode().
bool QQuickItem::smooth | ( | ) | const |
Definition at line 6818 of file qquickitem.cpp.
References d.
|
signal |
void QQuickItem::stackAfter | ( | const QQuickItem * | sibling | ) |
Moves the specified sibling item to the index after this item within the list of children.
The order of children affects both the visual stacking order and tab focus navigation order.
Assuming the z values of both items are the same, this will cause sibling to be rendered below this item.
If both items have activeFocusOnTab set to true
, this will also cause the tab focus order to change, with sibling receiving focus before this item.
The given sibling must be a sibling of this item; that is, they must have the same immediate \l parent.
Definition at line 2828 of file qquickitem.cpp.
References QList< T >::at(), QQuickItemPrivate::childItems, QQuickItemPrivate::ChildrenStackingChanged, d, QQuickItemPrivate::dirty(), QQuickItemPrivate::get(), QListSpecialMethodsBase< T >::lastIndexOf(), QQuickItemPrivate::markSortedChildrenDirty(), QList< T >::move(), QQuickItemPrivate::parentItem, Q_ASSERT, qMin(), qWarning, and QList< T >::size().
Referenced by QQuickScrollView::contentItemChange(), QQuickScrollBarAttachedPrivate::initHorizontal(), QQuickScrollBarAttachedPrivate::initVertical(), and QQuickPopupPrivate::prepareEnterTransition().
void QQuickItem::stackBefore | ( | const QQuickItem * | sibling | ) |
Moves the specified sibling item to the index before this item within the list of children.
The order of children affects both the visual stacking order and tab focus navigation order.
Assuming the z values of both items are the same, this will cause sibling to be rendered above this item.
If both items have activeFocusOnTab set to true
, this will also cause the tab focus order to change, with sibling receiving focus after this item.
The given sibling must be a sibling of this item; that is, they must have the same immediate \l parent.
Definition at line 2783 of file qquickitem.cpp.
References QList< T >::at(), QQuickItemPrivate::childItems, QQuickItemPrivate::ChildrenStackingChanged, d, QQuickItemPrivate::dirty(), QQuickItemPrivate::get(), QListSpecialMethodsBase< T >::lastIndexOf(), QQuickItemPrivate::markSortedChildrenDirty(), QList< T >::move(), QQuickItemPrivate::parentItem, Q_ASSERT, qMin(), qWarning, and QList< T >::size().
Referenced by QQuickRangeSliderNode::setHandle().
QString QQuickItem::state | ( | ) | const |
\qmlproperty string QtQuick::Item::state
This property holds the name of the current state of the item.
If the item is in its default state, that is, no explicit state has been set, then this property holds an empty string. Likewise, you can return an item to its default state by setting this property to an empty string.
This property holds the name of the current state of the item.
If the item is in its default state, that is, no explicit state has been set, then this property holds an empty string. Likewise, you can return an item to its default state by setting this property to an empty string.
Definition at line 5223 of file qquickitem.cpp.
References d.
Referenced by QQuickImageParticle::initialize(), QQuickSplitView::restoreState(), and setState().
|
virtual |
Returns the texture provider for an item.
The default implementation returns \nullptr.
This function may only be called on the rendering thread.
Reimplemented in QQuickCanvasItem, QQuickFramebufferObject, QQuickImage, QQuickPaintedItem, QQuickShaderEffectSource, QQuick3DViewport, and QWaylandQuickItem.
Definition at line 8995 of file qquickitem.cpp.
References d.
Referenced by QQuickCanvasItem::textureProvider(), QQuickFramebufferObject::textureProvider(), QQuickImage::textureProvider(), QQuickPaintedItem::textureProvider(), QQuick3DViewport::textureProvider(), QWaylandQuickItem::textureProvider(), and QQuick3DTexture::updateSpatialNode().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to receive touch events for an item.
The event information is provided by the event parameter.
\input item.qdocinc accepting-events
Reimplemented in QQuickMultiPointTouchArea, QQuickFlickable, QQuickPinchArea, QQuickSwipeDelegate, and QWaylandQuickItem.
Definition at line 4193 of file qquickitem.cpp.
Referenced by event(), QQuickMultiPointTouchArea::touchEvent(), QQuickFlickable::touchEvent(), and QQuickPinchArea::touchEvent().
|
protectedvirtual |
This event handler can be reimplemented in a subclass to be notified when a touch ungrab event has occurred on this item.
Reimplemented in QQuickMouseArea, QQuickMultiPointTouchArea, and QWaylandQuickItem.
Definition at line 4167 of file qquickitem.cpp.
Referenced by QQuickDeliveryAgentPrivate::removeGrabber().
QQmlListProperty< QQuickTransform > QQuickItem::transform | ( | ) |
QQuickItem::TransformOrigin QQuickItem::transformOrigin | ( | ) | const |
Definition at line 5805 of file qquickitem.cpp.
References d.
|
signal |
Referenced by QmlJSDebugger::Highlight::setItem(), and setTransformOrigin().
QPointF QQuickItem::transformOriginPoint | ( | ) | const |
Definition at line 5830 of file qquickitem.cpp.
References d.
void QQuickItem::ungrabMouse | ( | ) |
Releases the mouse grab following a call to grabMouse().
Note that this function should only be called when the item wants to stop handling further events. There is no need to call this function after a release or cancel event since no future events will be received in any case. No move or release events will be delivered after this function was called.
Definition at line 8296 of file qquickitem.cpp.
Referenced by QQuickPathView::mouseReleaseEvent(), and QQuickMultiPointTouchArea::sendMouseEvent().
void QQuickItem::ungrabTouchPoints | ( | ) |
Definition at line 8374 of file qquickitem.cpp.
References d.
|
slot |
Schedules a call to updatePaintNode() for this item.
The call to QQuickItem::updatePaintNode() will always happen if the item is showing in a QQuickWindow.
Only items which specify QQuickItem::ItemHasContents are allowed to call QQuickItem::update().
Definition at line 4504 of file qquickitem.cpp.
References QQuickItemPrivate::Content, d, flags(), ItemHasContents, metaObject(), and qWarning.
Referenced by QQuick3DViewport::QQuick3DViewport(), QQuickFusionKnob::QQuickFusionKnob(), QQuickSpriteSequence::QQuickSpriteSequence(), QQuickTextAreaPrivate::attachFlickable(), QDeclarativeGeoMapCopyrightNotice::connectMap(), QDeclarativeGeoMapCopyrightNotice::copyrightsImageChanged(), QQuickTextAreaPrivate::detachFlickable(), QQuickMaterialRipple::enterWave(), event(), QQuickMaterialRipple::exitWave(), QQuickFramebufferObject::geometryChange(), QQuickText::geometryChange(), QQuick3DViewport::geometryChange(), QSGFramebufferObjectNode::handleScreenChange(), SGFramebufferObjectNode::handleScreenChange(), QDeclarativeGeoMap::initialize(), QQuickBasicBusyIndicator::itemChange(), QQuickBasicProgressBar::itemChange(), QQuickMaterialBusyIndicator::itemChange(), QQuickMaterialProgressBar::itemChange(), QQuickUniversalBusyIndicator::itemChange(), QQuickUniversalProgressBar::itemChange(), QQuickPaintedItem::itemChange(), QQuick3DViewport::itemChange(), QQuickShaderEffectSource::itemGeometryChanged(), QQuickImageBase::load(), QQuickImageBase::loadEmptyUrl(), QQuickImageBase::loadPixmap(), QDeclarativeGeoMap::onSGNodeChanged(), QQuickBorderImage::pixmapChange(), QQuickImage::pixmapChange(), QDeclarativeGeoMapItemBase::polishAndUpdate(), QDeclarativeGeoMapCopyrightNotice::rasterizeHtmlAndUpdate(), QQuickImageBase::requestFinished(), QQuickImageParticle::reset(), QQuickRectangle::resetBottomLeftRadius(), QQuickRectangle::resetBottomRightRadius(), QQuickRectangle::resetTopLeftRadius(), QQuickRectangle::resetTopRightRadius(), QQuickShaderEffectSource::scheduleUpdate(), QQuickMaterialRipple::setActive(), QQuickPaintedItem::setAntialiasing(), QQuickRectangle::setBottomLeftRadius(), QQuickRectangle::setBottomRightRadius(), QQuick3DViewport::setCamera(), QQuickMaterialRipple::setClipRadius(), QQuickRectangle::setColor(), QQuickText::setColor(), QQuickTextInput::setColor(), QQuickBasicDial::setColor(), QQuickBasicProgressBar::setColor(), QQuickFusionBusyIndicator::setColor(), QQuickMaterialBusyIndicator::setColor(), QQuickMaterialProgressBar::setColor(), QQuickMaterialRipple::setColor(), QQuickUniversalBusyIndicator::setColor(), QQuickUniversalProgressBar::setColor(), QDeclarativeGeoMap::setColor(), QQuickPaintedItem::setContentsScale(), QQuickPaintedItem::setContentsSize(), QQuickMaterialTextContainer::setControlHasText(), QDeclarativeGeoMapCopyrightNotice::setCopyrightsZ(), QQuickUniversalBusyIndicator::setCount(), QQuickAnimatedSprite::setCurrentFrame(), QQuickImageBase::setCurrentFrame(), QQuickBasicDial::setEndAngle(), QQuick3DViewport::setEnvironment(), QQuickBasicBusyIndicator::setFill(), QQuickPaintedItem::setFillColor(), QQuickMaterialTextContainer::setFillColor(), QQuickMaterialPlaceholderText::setFilled(), QQuickMaterialTextContainer::setFilled(), QQuickVideoOutput::setFillMode(), QQuickImage::setFillMode(), QQuickMaterialTextContainer::setFocusAnimationProgress(), QQuickMaterialTextContainer::setFocusedOutlineColor(), QQuickShaderEffectSource::setFormat(), QQuickRectangle::setGradient(), QQuickShaderEffectSource::setHideSource(), QQuickFusionDial::setHighlight(), QQuickImage::setHorizontalAlignment(), QQuickMaterialTextContainer::setHorizontalPadding(), QQuickBorderImage::setHorizontalTileMode(), QQuick3DViewport::setImportScene(), QQuickBasicProgressBar::setIndeterminate(), QQuickMaterialProgressBar::setIndeterminate(), QQuickUniversalProgressBar::setIndeterminate(), QQuickText::setLinkColor(), QQuickShaderEffectSource::setLive(), QDeclarativeGeoMapItemBase::setLodThreshold(), QQuickPaintedItem::setMipmap(), QQuickShaderEffectSource::setMipmap(), QQuickImage::setMipmap(), QQuickImageBase::setMirror(), QQuickFramebufferObject::setMirrorVertically(), QQuickImageBase::setMirrorVertically(), QQuickPaintedItem::setOpaquePainting(), QQuickVideoOutput::setOrientation(), QQuickMaterialTextContainer::setOutlineColor(), QQuickPaddedRectangle::setPadding(), QWaylandQuickItem::setPaintEnabled(), QQuickBasicBusyIndicator::setPen(), QQuickPaintedItem::setPerformanceHint(), QQuickPaintedItem::setPerformanceHints(), QQuickMaterialTextContainer::setPlaceholderHasText(), QQuickMaterialTextContainer::setPlaceholderTextWidth(), QQuickBasicDial::setProgress(), QQuickBasicProgressBar::setProgress(), QQuickMaterialProgressBar::setProgress(), QQuickUniversalProgressBar::setProgress(), QQuickRectangle::setRadius(), QQuickTextInput::setReadOnly(), QQuick3DViewport::setRenderMode(), QQuickPaintedItem::setRenderTarget(), QQuickText::setRenderTypeQuality(), QQuickFusionBusyIndicator::setRunning(), QQuickShaderEffectSource::setSamples(), QQuickTextInput::setSelectedTextColor(), QQuickTextInput::setSelectionColor(), QQuickShaderEffectSource::setSourceItem(), QQuickShaderEffectSource::setSourceRect(), QQuickBasicDial::setStartAngle(), QQuickText::setStyle(), QQuickText::setStyleColor(), QWaylandQuickItem::setSurface(), QQuickShaderEffectSource::setTextureMirroring(), QQuickShaderEffectSource::setTextureSize(), QQuickRectangle::setTopLeftRadius(), QQuickRectangle::setTopRightRadius(), QQuickImage::setVerticalAlignment(), QQuickBorderImage::setVerticalTileMode(), QQuickShaderEffectSource::setWrapMode(), QmlJSDebugger::SelectionHighlight::showName(), QQuickPaintedItem::update(), QQuickImageParticle::updatePaintNode(), QQuickItemParticle::updatePaintNode(), QQuickSpriteSequence::updatePaintNode(), and QQuickCanvasItem::updatePolish().
|
protectedvirtual |
Called on the render thread when it is time to sync the state of the item with the scene graph.
The function is called as a result of QQuickItem::update(), if the user has set the QQuickItem::ItemHasContents flag on the item.
The function should return the root of the scene graph subtree for this item. Most implementations will return a single QSGGeometryNode containing the visual representation of this item. oldNode is the node that was returned the last time the function was called. updatePaintNodeData provides a pointer to the QSGTransformNode associated with this QQuickItem.
The main thread is blocked while this function is executed so it is safe to read values from the QQuickItem instance and other objects in the main thread.
If no call to QQuickItem::updatePaintNode() result in actual scene graph changes, like QSGNode::markDirty() or adding and removing nodes, then the underlying implementation may decide to not render the scene again as the visual outcome is identical.
Reimplemented in QQuickImageParticle, QQuickItemParticle, QQuickCanvasItem, QQuickAnimatedSprite, QQuickBorderImage, QQuickFramebufferObject, QQuickImage, QQuickMouseArea, QQuickMultiPointTouchArea, QQuickPaintedItem, QQuickRectangle, QQuickShaderEffectSource, QQuickSpriteSequence, QQuickText, QQuickPaddedRectangle, QDeclarativeGeoMap, QDeclarativeGeoMapItemBase, QQuickVideoOutput, QQuick3DViewport, QQuickShape, QQuickStyleItem, QQuickBasicBusyIndicator, QQuickBasicProgressBar, QQuickMaterialBusyIndicator, QQuickMaterialProgressBar, QQuickMaterialRipple, QQuickUniversalBusyIndicator, QQuickUniversalProgressBar, QQuickTextInput, QQuickNinePatchImage, QQuickTextArea, QQuickTextField, QWaylandQuickItem, QQuickShaderEffect, and QQuickTextEdit.
Definition at line 3901 of file qquickitem.cpp.
References Q_UNUSED.
Referenced by QQuickItemParticle::updatePaintNode().
|
protectedvirtual |
This function should perform any layout as required for this item.
When polish() is called, the scene graph schedules a polish event for this item. When the scene graph is ready to render this item, it calls updatePolish() to do any item layout as required before it renders the next frame.
Reimplemented in QGfxSourceProxy, QQuickCanvasItem, QQuickFlipable, QQuickItemView, QQuickPathView, QQuickBasePositioner, QQuickText, QQuickTextEdit, QQuickTextInput, QQuickLayout, QQuickStyleItem, QQuickShape, QQuickDialogButtonBox, QQuickMonthGrid, QQuickPopupItem, QQuickTabBar, QQuickTumbler, QDeclarativeCircleMapItem, QDeclarativeGeoMapQuickItem, QDeclarativePolygonMapItem, QDeclarativePolylineMapItem, and QDeclarativeRectangleMapItem.
Definition at line 3949 of file qquickitem.cpp.
Referenced by QDeclarativeGeoMapItemBase::setReferenceSurface(), QQuickCanvasItem::updatePolish(), QQuickItemView::updatePolish(), QQuickPathView::updatePolish(), QQuickDialogButtonBox::updatePolish(), QQuickMonthGrid::updatePolish(), and QQuickTabBar::updatePolish().
QQuickItem * QQuickItem::viewportItem | ( | ) | const |
If the \l ItemObservesViewport flag is set, returns the nearest parent with the \l ItemIsViewport flag.
Returns the window's contentItem if the flag is not set, or if no other viewport item is found.
Returns \nullptr only if there is no viewport item and this item is not shown in a window.
Definition at line 5762 of file qquickitem.cpp.
References flags(), ItemIsViewport, ItemObservesViewport, parentItem(), testFlag(), and window().
Referenced by clipRect().
|
signal |
Referenced by QQuickStackViewAttached::QQuickStackViewAttached(), QQuick3DItem2D::addChildItem(), QGeoMapMapboxGLPrivate::addMapItem(), QQuickScrollViewPrivate::disconnectScrollBarSignals(), QQuickScrollViewPrivate::setFlickable(), and QQuickFolderBreadcrumbBar::setTextField().
|
signal |
Referenced by setParentItem(), and QQuickItemPrivate::setVisible().
qreal QQuickItem::width | ( | ) | const |
Definition at line 7159 of file qquickitem.cpp.
References d.
|
signal |
Referenced by QQuickAnimatedSprite::QQuickAnimatedSprite(), QSizeChangeListener::QSizeChangeListener(), QQuickText::geometryChange(), QQuickFlipable::setBack(), QmlJSDebugger::Highlight::setItem(), QWaylandQtShellChrome::setLeftResizeHandle(), QDeclarativeGeoMapItemGroup::setQuickMap(), QWaylandQtShellChrome::setRightResizeHandle(), and QDeclarativeGeoMapQuickItem::updatePolish().
|
protected |
Returns whether the width property has been set explicitly.
Definition at line 7334 of file qquickitem.cpp.
References d.
Referenced by QQuickRow::doPositioning(), QQuickGrid::doPositioning(), QQuickFlow::doPositioning(), QQuickText::geometryChange(), QQuickTextEdit::geometryChange(), setImplicitSize(), setImplicitWidth(), QQuickText::setMinimumPixelSize(), QQuickText::setMinimumPointSize(), and QQuickImage::updatePaintedGeometry().
QQuickWindow * QQuickItem::window | ( | ) | const |
Returns the window in which this item is rendered.
The item does not have a window until it has been assigned into a scene. The \l windowChanged() signal provides a notification both when the item is entered into a scene and when it is removed from a scene.
Definition at line 2867 of file qquickitem.cpp.
References d.
Referenced by QQuickOverlay::QQuickOverlay(), QQuickScreenAttached::QQuickScreenAttached(), QQuickWindowAttached::QQuickWindowAttached(), Vsp2Layer::Vsp2Layer(), QQuick3DViewport::~QQuick3DViewport(), QQuickCanvasItem::~QQuickCanvasItem(), QQuickImage::~QQuickImage(), QQuickPaintedItem::~QQuickPaintedItem(), QQuickShaderEffectSource::~QQuickShaderEffectSource(), QQuick3DLightmapBaker::bake(), QQuickStackView::childMouseEventFilter(), QQuickDeliveryAgentPrivate::clearFocusInScope(), QQuickDeliveryAgentPrivate::clearHover(), QQuickWindowQmlImpl::componentComplete(), QQuickDeliveryAgentPrivate::compressTouchEvent(), QQuickStyleItem::connectToControl(), QQuickItemGrabResultPrivate::create(), QQuick3DViewport::createRenderer(), QQuickItemPrivate::data_append(), QQuickDragAttachedPrivate::deliverEnterEvent(), QQuickShapeGenericRenderer::endSync(), QQuickOverlay::eventFilter(), findAttachedParent(), grabToImage(), QQuickDeliveryAgentPrivate::handleMouseEvent(), QQuickSwipeDelegatePrivate::handleMouseMoveEvent(), QQuickText::hoveredLink(), QQuickStyleItem::initStyleOptionBase(), QQuick3DTexture::itemChange(), QQuickDragAttachedPrivate::itemParentChanged(), QQuickImageBase::loadPixmap(), QQuickFlickable::mouseReleaseEvent(), QQuickMouseArea::mouseReleaseEvent(), QQuickOverlay::overlay(), QQuickStyleItemScrollBar::paintEvent(), QQuickStyleItemScrollViewCorner::paintEvent(), QQuick3DViewport::pick(), QQuickDesignerSupport::refFromEffectItem(), QQuickCanvasItem::releaseResources(), QQuickImage::releaseResources(), QQuickPaintedItem::releaseResources(), QQuickShaderEffectSource::releaseResources(), QQuick3DViewport::releaseResources(), QQuickShapeSoftwareRenderNode::render(), QQuickMouseArea::sendMouseEvent(), QQuickMultiPointTouchArea::sendMouseEvent(), setActiveFocusOnTab(), QWaylandSurfaceTextureProvider::setBufferRef(), QQuickContext2DTexture::setCanvasWindow(), QQuickDeliveryAgentPrivate::setFocusInScope(), QQuick3DViewport::setImportScene(), QmlJSDebugger::Highlight::setItem(), QQuickAnimatedSprite::setSource(), QQuickShaderEffectSource::setSourceItem(), QQuickMultiPointTouchArea::shouldFilter(), QQuickMaterialBusyIndicatorNode::sync(), QQuick3DSceneRenderer::synchronize(), QQuickCanvasItem::textureProvider(), QQuickFramebufferObject::textureProvider(), QQuickImage::textureProvider(), QQuickPaintedItem::textureProvider(), QQuick3DViewport::textureProvider(), QQuickCanvasItem::toImage(), QQuickMultiPointTouchArea::touchEvent(), QQuickFlickable::touchEvent(), QQuickShapeGenericRenderer::updateNode(), QQuickCanvasItem::updatePaintNode(), QQuickBorderImage::updatePaintNode(), QQuickFramebufferObject::updatePaintNode(), QQuickImage::updatePaintNode(), QQuickPaintedItem::updatePaintNode(), QQuickRectangle::updatePaintNode(), QDeclarativeGeoMap::updatePaintNode(), QQuickStyleItem::updatePaintNode(), QQuick3DItem2D::updateSpatialNode(), QQuick3DTexture::updateSpatialNode(), and viewportItem().
qreal QQuickItem::x | ( | ) | const |
Definition at line 7037 of file qquickitem.cpp.
References d.
|
signal |
Referenced by QmlJSDebugger::Highlight::setItem(), and QDeclarativeGeoMapQuickItem::updatePolish().
qreal QQuickItem::y | ( | ) | const |
Definition at line 7043 of file qquickitem.cpp.
References d.
|
signal |
Referenced by QmlJSDebugger::Highlight::setItem(), and QDeclarativeGeoMapQuickItem::updatePolish().
qreal QQuickItem::z | ( | ) | const |
Definition at line 6005 of file qquickitem.cpp.
References d.
|
signal |
|
friend |
Definition at line 473 of file qquickitem.h.
|
friend |
Definition at line 474 of file qquickitem.h.
Referenced by QQuickControl::accessibleName(), QQuickControl::maybeSetAccessibleName(), QQuickTextArea::setPlaceholderText(), and QQuickTextField::setPlaceholderText().
|
friend |
Definition at line 475 of file qquickitem.h.
|
friend |
Definition at line 471 of file qquickitem.h.
|
friend |
Definition at line 472 of file qquickitem.h.
Definition at line 343 of file qquickitem.h.
Definition at line 302 of file qquickitem.h.
Referenced by grabToImage().
|
readwrite |
\qmlproperty bool QtQuick::Item::antialiasing
Used by visual elements to decide if the item should use antialiasing or not. In some cases items with antialiasing require more memory and are potentially slower to render (see \l {Antialiasing} for more details).
The default is false, but may be overridden by derived elements.
Specifies whether the item is antialiased or not
Used by visual elements to decide if the item should use antialiasing or not. In some cases items with antialiasing require more memory and are potentially slower to render (see \l {Antialiasing} for more details).
The default is false, but may be overridden by derived elements.
Definition at line 82 of file qquickitem.h.
Referenced by QQuickContext2D::init(), QQuickText::itemChange(), resetAntialiasing(), setAntialiasing(), QQuickText::setFont(), QQuickCanvasItem::updatePaintNode(), QQuickRectangle::updatePaintNode(), and QQuickCanvasItem::updatePolish().
|
readwrite |
\qmlproperty QObject* QtQuick::Item::containmentMask
By default the contains()
method will return true for any point within the Item's bounding box. containmentMask
allows for more fine-grained control. For example, if a custom C++ QQuickItem subclass with a specialized contains() method is used as containmentMask:
{item}'s contains method would then return true
only if {anotherItem}'s contains() implementation returns true
.
A \l Shape can be used as a mask, to make an item react to \l {QPointerEvent}{pointer events} only within a non-rectangular region:
\table \row
It is also possible to define the contains method in QML. For example, to create a circular item that only responds to events within its actual bounds:
\table \row
By default, \l contains() will return true
for any point within the Item's bounding box. But any QQuickItem, or any QObject that implements a function of the form
can be used as a mask, to defer hit-testing to that object.
Definition at line 82 of file qquickitem.h.
|
readwrite |
\qmlproperty bool QtQuick::Item::enabled
This property holds whether the item receives mouse and keyboard events. By default this is true.
Setting this property directly affects the enabled
value of child items. When set to false
, the enabled
values of all child items also become false
. When set to true
, the enabled
values of child items are returned to true
, unless they have explicitly been set to false
.
Setting this property to false
automatically causes \l activeFocus to be set to false
, and this item will no longer receive keyboard events.
This property holds whether the item receives mouse and keyboard events. By default this is true.
Setting this property directly affects the enabled
value of child items. When set to false
, the enabled
values of all child items also become false
. When set to true
, the enabled
values of child items are returned to true
, unless they have explicitly been set to false
.
Setting this property to false
automatically causes \l activeFocus to be set to false
, and this item will longer receive keyboard events.
false
. This makes it possible to show informational feedback (such as \l ToolTip) even when an interactive item is disabled. The same is also true for any \l {HoverHandler}{HoverHandlers} added as children of the item. A HoverHandler can, however, be \l {PointerHandler::enabled}{disabled} explicitly, or for example be bound to the enabled
state of the item.Definition at line 40 of file qquickitem.h.
Referenced by setAcceptHoverEvents(), setAcceptTouchEvents(), QWaylandQuickShellSurfaceItem::setAutoCreatePopupItems(), QQuickLayoutAttached::setChangesNotificationEnabled(), QQuickTableView::setKeyNavigationEnabled(), QQuickShaderEffectSource::setMipmap(), QWaylandQuickItem::setPaintEnabled(), QQuickTableView::setPointerNavigationEnabled(), QQuickShaderEffectSource::setRecursive(), QQuickTableView::setResizableColumns(), QQuickTableView::setResizableRows(), QWaylandQuickItem::setTouchEventsEnabled(), and QQuickControl::setWheelEnabled().
|
readwrite |
This property holds the height of this item.
Definition at line 40 of file qquickitem.h.
Referenced by QQuickSplitViewPrivate::accumulatedSize(), QQuickControl::availableHeight(), QQuickContext2DImageTexture::beginPainting(), QQuickImage::boundingRect(), QQuickStyleItemTextField::calculateGeometry(), QQuickClippedText::clipHeight(), QQuickSaturationLightnessPicker::colorAt(), QQuickGridLayoutBase::componentComplete(), QQuickStackLayout::componentComplete(), QQuickItemGrabResultPrivate::create(), QQuickMaterialRipple::diameter(), QQuickFlow::doPositioning(), QQuickParticleEmitter::emitWindow(), QQuickTrailEmitter::emitWindow(), QQuickShapeGenericRenderer::endSync(), QQuickTextAreaPrivate::ensureCursorVisible(), QQuickGridViewPrivate::footerSize(), QQuickMultiEffect::geometryChange(), QQuickCanvasItem::geometryChange(), QQuickFlickable::geometryChange(), QDeclarativeCircleMapItem::geometryChange(), QDeclarativeGeoMap::geometryChange(), QQuickLoaderPrivate::getImplicitHeight(), QQuickSplitViewPrivate::handlePress(), QQuickGridViewPrivate::headerSize(), QQuickStackElement::initialize(), QQuickItemGroup::itemChange(), QQuickScrollBarAttachedPrivate::itemGeometryChanged(), QQuickScrollIndicatorAttachedPrivate::itemGeometryChanged(), QQuickItemGroup::itemImplicitHeightChanged(), QQuickScrollBarAttachedPrivate::layoutHorizontal(), QQuickScrollIndicatorAttachedPrivate::layoutHorizontal(), QQuickSplitViewPrivate::layoutPositionItems(), QQuickSplitViewPrivate::layoutResizeSplitItems(), QQuickScrollBarAttachedPrivate::layoutVertical(), QQuickScrollIndicatorAttachedPrivate::layoutVertical(), ViewportTransformHelper::map(), QQuick3DViewport::mapFrom3DScene(), QQuick3DViewport::mapTo3DScene(), QWaylandQuickItem::mapToSurface(), QQuickFlickable::maxYExtent(), QDeclarativeGeoMapItemGroup::onMapSizeChanged(), QQuickItemView::originY(), QmlJSDebugger::SelectionHighlight::paint(), QmlJSDebugger::HoverHighlight::paint(), QQuickBasicDial::paint(), QQuickFusionBusyIndicator::paint(), QQuickFusionDial::paint(), QQuickFusionKnob::paint(), QQuickMaterialTextContainer::paint(), QQuickUniversalFocusRectangle::paint(), positionAt(), QQuickItemViewTransitionableItem::prepareTransition(), QQuickApplicationWindowPrivate::relayout(), QQuickPagePrivate::relayout(), QQuickPopupPositioner::reposition(), QQuickDrawerPositioner::reposition(), QQuickContext2D::reset(), QQuickTextAreaPrivate::resizeBackground(), QQuickTextAreaPrivate::resizeFlickableControl(), QQuickDayOfWeekRowPrivate::resizeItems(), QQuickMonthGridPrivate::resizeItems(), QQuickSwipeViewPrivate::resizeItems(), QQuickWeekNumberColumnPrivate::resizeItems(), QQuickDrawerPrivate::resizeOverlay(), QQuickViewPrivate::rootObjectSize(), QQuickWidgetPrivate::rootObjectSize(), QQuickTargetDirection::sample(), QQuickScrollBarAttachedPrivate::scrollVertical(), QQuickFlipablePrivate::setBackTransform(), QQuick3DViewport::setCamera(), QQuickClippedText::setClipHeight(), QQuickTableView::setContentHeight(), QQuickContainer::setContentHeight(), QQuickPane::setContentHeight(), QQuickFlickable::setContentHeight(), QQuickStackLayout::setCurrentIndex(), QQuickGridLayoutItem::setGeometry(), setImplicitSize(), QDeclarativeGeoMapItemBase::setMap(), QQuickMenuBarItem::setMenu(), QDeclarativeGeoMap::setVisibleRegion(), QQuickParticleAffector::shouldAffect(), QQuickImageBase::sourceSize(), QQuickMaterialBusyIndicatorNode::sync(), QQuickMaterialRippleBackgroundNode::sync(), QQuickMultiEffectPrivate::updateCenterOffset(), QQuickListViewPrivate::updateCurrentSection(), QQuickGridViewPrivate::updateFooter(), QQuickSelectionRectanglePrivate::updateHandles(), QQuickGridViewPrivate::updateHeader(), QQuickListViewPrivate::updateHighlight(), QQuickImage::updatePaintedGeometry(), QQuickBorderImage::updatePaintNode(), QQuickFramebufferObject::updatePaintNode(), QQuickImage::updatePaintNode(), QQuickMouseArea::updatePaintNode(), QQuickMultiPointTouchArea::updatePaintNode(), QQuickPaintedItem::updatePaintNode(), QQuickRectangle::updatePaintNode(), QQuickShaderEffectSource::updatePaintNode(), QQuickPaddedRectangle::updatePaintNode(), QQuickBasicBusyIndicator::updatePaintNode(), QQuickBasicProgressBar::updatePaintNode(), QQuickMaterialBusyIndicator::updatePaintNode(), QQuickMaterialProgressBar::updatePaintNode(), QQuickUniversalBusyIndicator::updatePaintNode(), QQuickUniversalProgressBar::updatePaintNode(), QWaylandQuickItem::updatePaintNode(), QQuickLayout::updatePolish(), QDeclarativeGeoMapQuickItem::updatePolish(), Vsp2Layer::updatePosition(), QQuickMultiEffectPrivate::updateShadowOffset(), QQuickViewPrivate::updateSize(), QQuickWidgetPrivate::updateSize(), QQuickMultiEffectPrivate::updateSourcePadding(), QQuick3DTexture::updateSpatialNode(), QQuickListViewPrivate::updateStickySections(), QQuickFlickableVisibleArea::updateVisible(), QQuickFlickable::vHeight(), QDeclarativeGeoMap::visibleRegion(), and QQuickFlickable::yflick().
|
readwrite |
Definition at line 82 of file qquickitem.h.
Referenced by QQuickTableViewPrivate::cellHeight(), QQuickLayout::effectiveSizeHints_helper(), QQuickControlPrivate::getContentHeight(), QQuickPanePrivate::getContentHeight(), QQuickSwipeViewPrivate::getContentHeight(), QQuickLoaderPrivate::getImplicitHeight(), QQuickPopupPositioner::reposition(), resetHeight(), QQuickSplitViewPrivate::resizeHandle(), and QQuickLayoutItemProxy::setTarget().
|
readwrite |
Definition at line 82 of file qquickitem.h.
Referenced by QQuickTableViewPrivate::cellWidth(), QQuickLayout::effectiveSizeHints_helper(), QQuickControlPrivate::getContentWidth(), QQuickPanePrivate::getContentWidth(), QQuickSwipeViewPrivate::getContentWidth(), QQuickLoaderPrivate::getImplicitWidth(), QQuickPopupPositioner::reposition(), resetWidth(), QQuickSplitViewPrivate::resizeHandle(), and QQuickLayoutItemProxy::setTarget().
|
readwrite |
\qmlproperty real QtQuick::Item::opacity
This property holds the opacity of the item. Opacity is specified as a number between 0.0 (fully transparent) and 1.0 (fully opaque). The default value is 1.0.
When this property is set, the specified opacity is also applied individually to child items. This may have an unintended effect in some circumstances. For example in the second set of rectangles below, the red rectangle has specified an opacity of 0.5, which affects the opacity of its blue child rectangle even though the child has not specified an opacity.
\table \row
Changing an item's opacity does not affect whether the item receives user input events. (In contrast, setting \l visible property to false
stops mouse events, and setting the \l enabled property to false
stops mouse and keyboard events, and also removes active focus from the item.)
This property holds the opacity of the item. Opacity is specified as a number between 0.0 (fully transparent) and 1.0 (fully opaque). The default value is 1.0.
When this property is set, the specified opacity is also applied individually to child items. This may have an unintended effect in some circumstances. For example in the second set of rectangles below, the red rectangle has specified an opacity of 0.5, which affects the opacity of its blue child rectangle even though the child has not specified an opacity.
Values outside the range of 0 to 1 will be clamped.
\table \row
Changing an item's opacity does not affect whether the item receives user input events. (In contrast, setting \l visible property to false
stops mouse events, and setting the \l enabled property to false
stops mouse and keyboard events, and also removes active focus from the item.)
Definition at line 40 of file qquickitem.h.
Referenced by QDeclarativeGeoMapItemBase::mapItemOpacity(), QDeclarativeGeoMapItemGroup::mapItemOpacity(), QQuickPopupPrivate::prepareExitTransition(), and Vsp2Layer::updateOpacity().
|
readwrite |
\qmlproperty Item QtQuick::Item::parent This property holds the visual parent of the item.
This property holds the visual parent of the item.
Definition at line 40 of file qquickitem.h.
Referenced by QDeclarativeGeoMapCopyrightNotice::QDeclarativeGeoMapCopyrightNotice(), QQuickContentItem::QQuickContentItem(), QQuickItem(), QQuickItem(), QQuickOverlay::QQuickOverlay(), QQuickPositionerAttached::QQuickPositionerAttached(), QQuickTableViewHoverHandler::QQuickTableViewHoverHandler(), QDeclarativeGeoMap::~QDeclarativeGeoMap(), QQuickOverlay::~QQuickOverlay(), QDeclarativeGeoMapCopyrightNotice::anchorToBottomLeft(), QQuickGridLayoutBase::componentComplete(), forceActiveFocus(), QQuickTableViewHoverHandler::handleEventPoint(), QDeclarativeGeoMap::isGroupNested(), QQuickPlaceholderText::textControl(), QQuickTableViewResizeHandler::updateDrag(), QQuickTableViewResizeHandler::updateState(), QQuickTableViewResizeHandler::wantsEventPoint(), and QQuickTableViewTapHandler::wantsEventPoint().
|
readwrite |
\qmlproperty real QtQuick::Item::rotation This property holds the rotation of the item in degrees clockwise around its transformOrigin.
The default value is 0 degrees (that is, no rotation).
\table \row
This property holds the rotation of the item in degrees clockwise around its transformOrigin.
The default value is 0 degrees (that is, no rotation).
\table \row
Definition at line 82 of file qquickitem.h.
Referenced by QQuickTransformAnimatorJob::Helper::sync().
|
readwrite |
\qmlproperty real QtQuick::Item::scale This property holds the scale factor for this item.
A scale of less than 1.0 causes the item to be rendered at a smaller size, and a scale greater than 1.0 renders the item at a larger size. A negative scale causes the item to be mirrored when rendered.
The default value is 1.0.
Scaling is applied from the transformOrigin.
\table \row
Rectangle { color: "blue" width: 100; height: 100
Rectangle { color: "green" width: 25; height: 25 }
Rectangle { color: "red" x: 25; y: 25; width: 50; height: 50 scale: 1.4 transformOrigin: Item.TopLeft } } \endqml \endtable
This property holds the scale factor for this item.
A scale of less than 1.0 causes the item to be rendered at a smaller size, and a scale greater than 1.0 renders the item at a larger size. A negative scale causes the item to be mirrored when rendered.
The default value is 1.0.
Scaling is applied from the transformOrigin.
\table \row
Rectangle { color: "blue" width: 100; height: 100
Rectangle { color: "green" width: 25; height: 25 }
Rectangle { color: "red" x: 25; y: 25; width: 50; height: 50 scale: 1.4 } } \endqml \endtable
Definition at line 82 of file qquickitem.h.
Referenced by QQuickPinchArea::event(), QQuickStyleItemScrollBar::paintEvent(), QQuickPopupPrivate::prepareExitTransition(), QQuickPaintedItem::setContentsScale(), QQuickPopupPositioner::setParentItem(), QQuickPdfSelection::setRenderScale(), QDeclarativeGeoMapItemBase::setShapeTriangulationScale(), and QQuickTransformAnimatorJob::Helper::sync().
|
readwrite |
\qmlproperty bool QtQuick::Item::smooth
Primarily used in image based items to decide if the item should use smooth sampling or not. Smooth sampling is performed using linear interpolation, while non-smooth is performed using nearest neighbor.
In Qt Quick 2.0, this property has minimal impact on performance.
By default, this property is set to true
.
Specifies whether the item is smoothed or not
Primarily used in image based items to decide if the item should use smooth sampling or not. Smooth sampling is performed using linear interpolation, while non-smooth is performed using nearest neighbor.
In Qt Quick 2.0, this property has minimal impact on performance.
By default, this property is set to true
.
Definition at line 82 of file qquickitem.h.
Referenced by QQuickTextNode::addImage(), QQuickContext2D::init(), setSmooth(), QQuickShaderEffectSource::textureProvider(), QWaylandQuickItem::updatePaintNode(), and QGfxSourceProxy::updatePolish().
|
read |
\qmlproperty list<Transform> QtQuick::Item::transform This property holds the list of transformations to apply.
For more information see \l Transform.
Definition at line 82 of file qquickitem.h.
Referenced by QQuickStyleItemScrollViewCorner::paintEvent().
|
readwrite |
\qmlproperty enumeration QtQuick::Item::transformOrigin This property holds the origin point around which scale and rotation transform.
Nine transform origins are available, as shown in the image below. The default transform origin is Item.Center
.
This example rotates an image around its bottom-right corner. \qml Image { source: "myimage.png" transformOrigin: Item.BottomRight rotation: 45 } \endqml
To set an arbitrary transform origin point use the \l Scale or \l Rotation transform types with \l transform.
This property holds the origin point around which scale and rotation transform.
Nine transform origins are available, as shown in the image below. The default transform origin is Item.Center
.
Definition at line 82 of file qquickitem.h.
|
read |
Definition at line 82 of file qquickitem.h.
Referenced by QQuickDragHandler::handlePointerEventImpl(), and QQuickTransformAnimatorJob::Helper::sync().
|
readwrite |
\qmlproperty bool QtQuick::Item::visible
This property holds whether the item is visible. By default this is true.
Setting this property directly affects the visible
value of child items. When set to false
, the visible
values of all child items also become false
. When set to true
, the visible
values of child items are returned to true
, unless they have explicitly been set to false
.
(Because of this flow-on behavior, using the visible
property may not have the intended effect if a property binding should only respond to explicit property changes. In such cases it may be better to use the \l opacity property instead.)
If this property is set to false
, the item will no longer receive mouse events, but will continue to receive key events and will retain the keyboard \l focus if it has been set. (In contrast, setting the \l enabled property to false
stops both mouse and keyboard events, and also removes focus from the item.)
visible
property. It does not change, for example, if this item moves off-screen, or if the \l opacity changes to 0.This property holds whether the item is visible. By default this is true.
Setting this property directly affects the visible
value of child items. When set to false
, the visible
values of all child items also become false
. When set to true
, the visible
values of child items are returned to true
, unless they have explicitly been set to false
.
(Because of this flow-on behavior, using the visible
property may not have the intended effect if a property binding should only respond to explicit property changes. In such cases it may be better to use the \l opacity property instead.)
If this property is set to false
, the item will no longer receive mouse events, but will continue to receive key events and will retain the keyboard \l focus if it has been set. (In contrast, setting the \l enabled property to false
stops both mouse and keyboard events, and also removes focus from the item.)
visible
property. It does not change, for example, if this item moves off-screen, or if the \l opacity changes to 0. However, for historical reasons, this property is true after the item's construction, even if the item hasn't been added to a scene yet. Changing or reading this property of an item that has not been added to a scene might not produce the expected results.Definition at line 40 of file qquickitem.h.
Referenced by QDeclarativeGeoMap::setCopyrightsVisible(), QDeclarativeGeoMapCopyrightNotice::setCopyrightsVisible(), and QQuickMnemonicLabel::setMnemonicVisible().
|
readwrite |
This property holds the width of this item.
Definition at line 40 of file qquickitem.h.
Referenced by QQuickSplitViewPrivate::accumulatedSize(), QQuickControl::availableWidth(), QQuickContext2DImageTexture::beginPainting(), QQuickImage::boundingRect(), QQuickClippedText::clipWidth(), QQuickSaturationLightnessPicker::colorAt(), FxGridItemSG::colPos(), QQuickGridLayoutBase::componentComplete(), QQuickStackLayout::componentComplete(), QQuickItemGrabResultPrivate::create(), QQuickSwipePrivate::createRelevantItemForDistance(), QQuickMaterialRipple::diameter(), QQuickRow::doPositioning(), QQuickGrid::doPositioning(), QQuickFlow::doPositioning(), QQuickParticleEmitter::emitWindow(), QQuickTrailEmitter::emitWindow(), QQuickShapeGenericRenderer::endSync(), QQuickTextAreaPrivate::ensureCursorVisible(), QQuickGridViewPrivate::footerSize(), QQuickMultiEffect::geometryChange(), QQuickCanvasItem::geometryChange(), QQuickFlickable::geometryChange(), QDeclarativeCircleMapItem::geometryChange(), QDeclarativeGeoMap::geometryChange(), QQuickLoaderPrivate::getImplicitWidth(), QQuickSwipeDelegatePrivate::handleMouseMoveEvent(), QQuickSplitViewPrivate::handlePress(), QQuickGridViewPrivate::headerSize(), QQuickStackElement::initialize(), QQuickItemGroup::itemChange(), QQuickScrollBarAttachedPrivate::itemGeometryChanged(), QQuickScrollIndicatorAttachedPrivate::itemGeometryChanged(), QQuickItemGroup::itemImplicitWidthChanged(), QQuickScrollBarAttachedPrivate::layoutHorizontal(), QQuickScrollIndicatorAttachedPrivate::layoutHorizontal(), QQuickSplitViewPrivate::layoutPositionItems(), QQuickSplitViewPrivate::layoutResizeSplitItems(), QQuickScrollBarAttachedPrivate::layoutVertical(), QQuickScrollIndicatorAttachedPrivate::layoutVertical(), ViewportTransformHelper::map(), QQuick3DViewport::mapFrom3DScene(), QQuick3DViewport::mapTo3DScene(), QWaylandQuickItem::mapToSurface(), QQuickFlickable::maxXExtent(), QDeclarativeGeoMapItemGroup::onMapSizeChanged(), QQuickItemView::originX(), QmlJSDebugger::SelectionHighlight::paint(), QmlJSDebugger::HoverHighlight::paint(), QQuickBasicDial::paint(), QQuickFusionBusyIndicator::paint(), QQuickFusionDial::paint(), QQuickFusionKnob::paint(), QQuickMaterialTextContainer::paint(), QQuickUniversalFocusRectangle::paint(), FxListItemSG::position(), QQuickSwitchPrivate::positionAt(), QQuickSwitchDelegatePrivate::positionAt(), positionAt(), QQuickItemViewTransitionableItem::prepareTransition(), QQuickApplicationWindowPrivate::relayout(), QQuickPopupPositioner::reposition(), QQuickDrawerPositioner::reposition(), QQuickSwipePrivate::reposition(), QQuickContext2D::reset(), QQuickTextAreaPrivate::resizeBackground(), QQuickTextAreaPrivate::resizeFlickableControl(), QQuickMenuPrivate::resizeItem(), QQuickDayOfWeekRowPrivate::resizeItems(), QQuickMonthGridPrivate::resizeItems(), QQuickSwipeViewPrivate::resizeItems(), QQuickWeekNumberColumnPrivate::resizeItems(), QQuickDrawerPrivate::resizeOverlay(), QQuickViewPrivate::rootObjectSize(), QQuickWidgetPrivate::rootObjectSize(), QQuickTargetDirection::sample(), QQuickScrollBarAttachedPrivate::scrollHorizontal(), FxListItemSG::sectionSize(), QQuickFlipablePrivate::setBackTransform(), QQuick3DViewport::setCamera(), QQuickClippedText::setClipWidth(), QQuickTableView::setContentWidth(), QQuickContainer::setContentWidth(), QQuickPane::setContentWidth(), QQuickFlickable::setContentWidth(), QQuickStackLayout::setCurrentIndex(), QQuickGridLayoutItem::setGeometry(), setImplicitSize(), QDeclarativeGeoMapItemBase::setMap(), QDeclarativeGeoMap::setVisibleRegion(), QQuickParticleAffector::shouldAffect(), FxListItemSG::size(), QQuickMaterialBusyIndicatorNode::sync(), QQuickMaterialRippleBackgroundNode::sync(), QQuickMultiEffectPrivate::updateCenterOffset(), QQuickListViewPrivate::updateCurrentSection(), QQuickTableViewPrivate::updateEditItem(), QQuickGridViewPrivate::updateFooter(), QQuickSelectionRectanglePrivate::updateHandles(), QQuickGridViewPrivate::updateHeader(), QQuickListViewPrivate::updateHighlight(), QQuickTreeViewDelegatePrivate::updateIndicatorVisibility(), QQuickTabBarPrivate::updateLayout(), QQuickImage::updatePaintedGeometry(), QQuickBorderImage::updatePaintNode(), QQuickFramebufferObject::updatePaintNode(), QQuickImage::updatePaintNode(), QQuickMouseArea::updatePaintNode(), QQuickMultiPointTouchArea::updatePaintNode(), QQuickPaintedItem::updatePaintNode(), QQuickRectangle::updatePaintNode(), QQuickShaderEffectSource::updatePaintNode(), QQuickPaddedRectangle::updatePaintNode(), QQuickBasicBusyIndicator::updatePaintNode(), QQuickBasicProgressBar::updatePaintNode(), QQuickMaterialBusyIndicator::updatePaintNode(), QQuickMaterialProgressBar::updatePaintNode(), QQuickUniversalBusyIndicator::updatePaintNode(), QQuickUniversalProgressBar::updatePaintNode(), QWaylandQuickItem::updatePaintNode(), QQuickLayout::updatePolish(), QDeclarativeGeoMapQuickItem::updatePolish(), Vsp2Layer::updatePosition(), QQuickMultiEffectPrivate::updateShadowOffset(), QQuickViewPrivate::updateSize(), QQuickWidgetPrivate::updateSize(), QQuickMultiEffectPrivate::updateSourcePadding(), QQuick3DTexture::updateSpatialNode(), QQuickListViewPrivate::updateStickySections(), QQuickFlickableVisibleArea::updateVisible(), QDeclarativeGeoMap::visibleRegion(), QQuickFlickable::vWidth(), and QQuickFlickable::xflick().
|
readwrite |
\qmlproperty real QtQuick::Item::x \qmlproperty real QtQuick::Item::y \qmlproperty real QtQuick::Item::width \qmlproperty real QtQuick::Item::height
Defines the item's position and size. The default value is 0
.
The (x,y) position is relative to the \l parent.
\qml Item { x: 100; y: 100; width: 100; height: 100 } \endqml
Defines the item's x position relative to its parent.
Definition at line 40 of file qquickitem.h.
Referenced by QQuickParticleEmitter::burst(), QQuickAnchorsPrivate::centerInChanged(), QQuickTextInput::cursorRectangle(), QQuickParticleEmitter::emitWindow(), QDeclarativeCircleMapItem::geometryChange(), QDeclarativeGeoMapQuickItem::geometryChange(), QQuickScrollBarAttachedPrivate::itemGeometryChanged(), QQuickScrollIndicatorAttachedPrivate::itemGeometryChanged(), QQuickItemViewFxItem::itemX(), QQuickItemViewTransitionableItem::itemX(), QQuickSplitViewPrivate::layoutResizeSplitItems(), ViewportTransformHelper::map(), FxListItemSG::position(), QQuickTextInput::positionToRectangle(), QQuickItemViewTransitionableItem::prepareTransition(), QQuickApplicationWindowPrivate::relayout(), QQuickPopupPositioner::reposition(), QQuickControlPrivate::resizeBackground(), QQuickLabelPrivate::resizeBackground(), QQuickTextAreaPrivate::resizeBackground(), QQuickTextFieldPrivate::resizeBackground(), QQuickDrawerPrivate::resizeOverlay(), QQuickTargetDirection::sample(), QQuickClippedText::setClipX(), QQuickFlickablePrivate::setViewportX(), QQuickTransformAnimatorJob::Helper::sync(), QQuickTreeViewDelegatePrivate::updateIndicatorVisibility(), QDeclarativeGeoMapQuickItem::updatePolish(), and QQuickListViewPrivate::updateStickySections().
|
readwrite |
Defines the item's y position relative to its parent.
Definition at line 40 of file qquickitem.h.
Referenced by QQuickParticleEmitter::burst(), QQuickTumblerAttachedPrivate::calculateDisplacement(), QQuickAnchorsPrivate::centerInChanged(), QQuickParticleEmitter::emitWindow(), QDeclarativeCircleMapItem::geometryChange(), QDeclarativeGeoMapQuickItem::geometryChange(), QQuickScrollBarAttachedPrivate::itemGeometryChanged(), QQuickScrollIndicatorAttachedPrivate::itemGeometryChanged(), QQuickItemViewFxItem::itemY(), QQuickItemViewTransitionableItem::itemY(), QQuickSplitViewPrivate::layoutResizeSplitItems(), ViewportTransformHelper::map(), FxListItemSG::position(), QQuickItemViewTransitionableItem::prepareTransition(), QQuickApplicationWindowPrivate::relayout(), QQuickPopupPositioner::reposition(), QQuickControlPrivate::resizeBackground(), QQuickLabelPrivate::resizeBackground(), QQuickTextAreaPrivate::resizeBackground(), QQuickTextFieldPrivate::resizeBackground(), QQuickSwipeDelegatePrivate::resizeBackground(), QQuickDrawerPrivate::resizeOverlay(), QQuickTargetDirection::sample(), QQuickClippedText::setClipY(), QQuickFlickablePrivate::setViewportY(), QQuickTransformAnimatorJob::Helper::sync(), and QQuickListViewPrivate::updateStickySections().
|
readwrite |
\qmlproperty real QtQuick::Item::z
Sets the stacking order of sibling items. By default the stacking order is 0.
Items with a higher stacking value are drawn on top of siblings with a lower stacking order. Items with the same stacking value are drawn bottom up in the order they appear. Items with a negative stacking value are drawn under their parent's content.
The following example shows the various effects of stacking order.
\table \row
z
- later children above earlier children: \qml Item { Rectangle { color: "red" width: 100; height: 100 } Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } \endqml \row z
on top: \qml Item { Rectangle { z: 1 color: "red" width: 100; height: 100 } Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } \endqml \row z
- children above parents: \qml Item { Rectangle { color: "red" width: 100; height: 100 Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } } \endqml \row z
below: \qml Item { Rectangle { color: "red" width: 100; height: 100 Rectangle { z: -1 color: "blue" x: 50; y: 50; width: 100; height: 100 } } } \endqml \endtableSets the stacking order of sibling items. By default the stacking order is 0.
Items with a higher stacking value are drawn on top of siblings with a lower stacking order. Items with the same stacking value are drawn bottom up in the order they appear. Items with a negative stacking value are drawn under their parent's content.
The following example shows the various effects of stacking order.
\table \row
z
- later children above earlier children: \qml Item { Rectangle { color: "red" width: 100; height: 100 } Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } \endqml \row z
on top: \qml Item { Rectangle { z: 1 color: "red" width: 100; height: 100 } Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } \endqml \row z
- children above parents: \qml Item { Rectangle { color: "red" width: 100; height: 100 Rectangle { color: "blue" x: 50; y: 50; width: 100; height: 100 } } } \endqml \row z
below: \qml Item { Rectangle { color: "red" width: 100; height: 100 Rectangle { z: -1 color: "blue" x: 50; y: 50; width: 100; height: 100 } } } \endqml \endtable Definition at line 40 of file qquickitem.h.
Referenced by QQuickSelectionRectanglePrivate::createHandle(), QQuickListViewPrivate::getSectionItem(), QQuickRangeSliderPrivate::handlePress(), QDeclarativeGeoMap::itemChange(), itemZOrder_sort(), QWaylandQuickItemPrivate::placeAboveSibling(), QWaylandQuickItemPrivate::placeBelowSibling(), QQuickPopupPrivate::prepareEnterTransition(), QQuickControl::setBackground(), QQuickLabel::setBackground(), QQuickTextArea::setBackground(), QQuickTextField::setBackground(), QQuickPage::setFooter(), QQuickRangeSliderNode::setHandle(), QQuickPage::setHeader(), and QQuickRangeSliderPrivate::updateHover().