A class implementing simple keyframe animation to a
QTransform. 更多 …
def
addKeyframe
(keyframe)
def
easing
()
def
endMode
()
def
framePositions
()
def
keyframeList
()
def
removeKeyframe
(keyframe)
def
setKeyframes
(keyframes)
def
startMode
()
def
target
()
def
targetName
()
def
setEasing
(easing)
def
setEndMode
(mode)
def
setFramePositions
(positions)
def
setStartMode
(mode)
def
setTarget
(target)
def
setTargetName
(name)
def
easingChanged
(easing)
def
endModeChanged
(endMode)
def
framePositionsChanged
(positions)
def
startModeChanged
(startMode)
def
targetChanged
(target)
def
targetNameChanged
(name)
A
QKeyframeAnimationclass implements simple keyframe animation that can be used to animateQTransform. The keyframes consists of multiple timed QTransforms, which are interpolated and applied to the targetQTransform.QEasingCurveis used between keyframes to control the interpolator.RepeatModecan be set for when the position set to theQKeyframeAnimationis below or above the values defined in the keyframe positions.
PySide2.Qt3DAnimation.Qt3DAnimation.
QKeyframeAnimation
(
[
parent=None
]
)
¶
- param parent
QObject
Constructs an
QKeyframeAnimation
with
parent
.
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
RepeatMode
¶
This enumeration specifies how position values outside keyframe values are handled.
|
常量 |
描述 |
|---|---|
|
Qt3DAnimation.QKeyframeAnimation.None |
The animation is not applied to the target transform. |
|
Qt3DAnimation.QKeyframeAnimation.Constant |
The edge keyframe value is used. |
|
Qt3DAnimation.QKeyframeAnimation.Repeat |
The animation is repeated. |
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
addKeyframe
(
keyframe
)
¶
keyframe
–
QTransform
Adds new
keyframe
at the end of the animation. The
QTransform
can be added to the animation multiple times.
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
easing
(
)
¶
QEasingCurve
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
easingChanged
(
easing
)
¶
easing
–
QEasingCurve
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
endMode
(
)
¶
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
endModeChanged
(
endMode
)
¶
endMode
–
RepeatMode
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
framePositions
(
)
¶
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
framePositionsChanged
(
positions
)
¶
positions –
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
keyframeList
(
)
¶
Returns the list of keyframes.
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
removeKeyframe
(
keyframe
)
¶
keyframe
–
QTransform
Removes a
keyframe
from the animation. If the same
QTransform
is set as keyframe multiple times, all occurrences are removed.
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
setEasing
(
easing
)
¶
easing
–
QEasingCurve
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
setEndMode
(
mode
)
¶
mode
–
RepeatMode
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
setFramePositions
(
positions
)
¶
positions –
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
setKeyframes
(
keyframes
)
¶
keyframes –
设置
keyframes
of the animation. Old keyframes are cleared.
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
setStartMode
(
mode
)
¶
mode
–
RepeatMode
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
setTarget
(
target
)
¶
target
–
QTransform
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
setTargetName
(
name
)
¶
name – unicode
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
startMode
(
)
¶
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
startModeChanged
(
startMode
)
¶
startMode
–
RepeatMode
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
target
(
)
¶
QTransform
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
targetChanged
(
target
)
¶
target
–
QTransform
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
targetName
(
)
¶
unicode
另请参阅
PySide2.Qt3DAnimation.Qt3DAnimation.QKeyframeAnimation.
targetNameChanged
(
name
)
¶
name – unicode