![]() |
Qt 6.x
The Qt SDK
|
\qmltype PropertyChanges \inqmlmodule QtQuick More...
Public Member Functions | |
QQuickReplaceSignalHandler () | |
~QQuickReplaceSignalHandler () | |
EventType | type () const override |
void | execute () override |
bool | isReversable () override |
void | reverse () override |
void | saveOriginals () override |
bool | needsCopy () override |
void | copyOriginals (QQuickStateActionEvent *other) override |
void | rewind () override |
void | saveCurrentValues () override |
bool | mayOverride (QQuickStateActionEvent *other) override |
![]() | |
virtual | ~QQuickStateActionEvent () |
virtual EventType | type () const =0 |
virtual void | execute () |
virtual bool | isReversable () |
virtual void | reverse () |
virtual void | saveOriginals () |
virtual bool | needsCopy () |
virtual void | copyOriginals (QQuickStateActionEvent *) |
virtual bool | isRewindable () |
virtual void | rewind () |
virtual void | saveCurrentValues () |
virtual void | saveTargetValues () |
virtual bool | changesBindings () |
virtual void | clearBindings () |
virtual bool | mayOverride (QQuickStateActionEvent *other) |
Additional Inherited Members | |
![]() | |
enum | EventType { Script , SignalHandler , ParentChange , AnchorChanges } |
\qmltype PropertyChanges \inqmlmodule QtQuick
Describes new property bindings or values for a state.
PropertyChanges is used to define the property values or bindings in a \l State. This enables an item's property values to be changed when it \l {Qt Quick States}{changes between states}.
To create a PropertyChanges object, bind to properties of the target item like you would bind to local properties. This way you can define the new property values or bindings. For example:
\codeline
When the mouse is pressed, the \l Rectangle changes to the resized state. In this state, the PropertyChanges object sets the rectangle's color to blue and the height
value to that of container.height
.
Note this automatically binds rect.height
to container.height
in the resized state. If a property binding should not be established, and the height should just be set to the value of container.height
at the time of the state change, set the \l explicit property to true
.
A PropertyChanges object can also override the default signal handler for an object to implement a signal handler specific to the new state:
\qml PropertyChanges { myMouseArea.onClicked: doSomethingDifferent() } \endqml
Definition at line 115 of file qquickpropertychanges.cpp.
|
inline |
Definition at line 118 of file qquickpropertychanges.cpp.
|
inline |
Definition at line 119 of file qquickpropertychanges.cpp.
|
inlineoverridevirtual |
Reimplemented from QQuickStateActionEvent.
Definition at line 143 of file qquickpropertychanges.cpp.
References other(), reverseExpression, and saveCurrentValues().
|
inlineoverridevirtual |
Reimplemented from QQuickStateActionEvent.
Definition at line 128 of file qquickpropertychanges.cpp.
References QQmlRefPointer< T >::data(), expression, property, and QQmlPropertyPrivate::setSignalExpression().
|
inlineoverridevirtual |
Reimplemented from QQuickStateActionEvent.
Definition at line 132 of file qquickpropertychanges.cpp.
|
inlineoverridevirtual |
Reimplemented from QQuickStateActionEvent.
Definition at line 159 of file qquickpropertychanges.cpp.
References other(), and property.
|
inlineoverridevirtual |
Reimplemented from QQuickStateActionEvent.
Definition at line 142 of file qquickpropertychanges.cpp.
|
inlineoverridevirtual |
Reimplemented from QQuickStateActionEvent.
Definition at line 133 of file qquickpropertychanges.cpp.
References QQmlRefPointer< T >::data(), property, reverseExpression, and QQmlPropertyPrivate::setSignalExpression().
|
inlineoverridevirtual |
Reimplemented from QQuickStateActionEvent.
Definition at line 152 of file qquickpropertychanges.cpp.
References QQmlRefPointer< T >::data(), property, rewindExpression, and QQmlPropertyPrivate::setSignalExpression().
|
inlineoverridevirtual |
Reimplemented from QQuickStateActionEvent.
Definition at line 155 of file qquickpropertychanges.cpp.
References property, rewindExpression, and QQmlPropertyPrivate::signalExpression().
Referenced by copyOriginals(), and saveOriginals().
|
inlineoverridevirtual |
Reimplemented from QQuickStateActionEvent.
Definition at line 137 of file qquickpropertychanges.cpp.
References reverseExpression, rewindExpression, and saveCurrentValues().
|
inlineoverridevirtual |
Implements QQuickStateActionEvent.
Definition at line 121 of file qquickpropertychanges.cpp.
References QQuickStateActionEvent::SignalHandler.
QQmlRefPointer<QQmlBoundSignalExpression> QQuickReplaceSignalHandler::expression |
Definition at line 124 of file qquickpropertychanges.cpp.
Referenced by QQuickPropertyChangesPrivate::decodeBinding(), and execute().
QQmlProperty QQuickReplaceSignalHandler::property |
Definition at line 123 of file qquickpropertychanges.cpp.
Referenced by QQuickPropertyChanges::actions(), QQuickPropertyChangesPrivate::decodeBinding(), execute(), mayOverride(), reverse(), rewind(), and saveCurrentValues().
QQmlRefPointer<QQmlBoundSignalExpression> QQuickReplaceSignalHandler::reverseExpression |
Definition at line 125 of file qquickpropertychanges.cpp.
Referenced by copyOriginals(), reverse(), and saveOriginals().
QQmlRefPointer<QQmlBoundSignalExpression> QQuickReplaceSignalHandler::rewindExpression |
Definition at line 126 of file qquickpropertychanges.cpp.
Referenced by rewind(), saveCurrentValues(), and saveOriginals().