Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qsequentialanimationgroup_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QSEQUENTIALANIMATIONGROUP_P_H
6
#
define
QSEQUENTIALANIMATIONGROUP_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
"qsequentialanimationgroup.h"
20
#
include
"private/qanimationgroup_p.h"
21
#
include
"private/qproperty_p.h"
22
23
QT_REQUIRE_CONFIG
(
animation
);
24
25
QT_BEGIN_NAMESPACE
26
27
class
QSequentialAnimationGroupPrivate :
public
QAnimationGroupPrivate
28
{
29
Q_DECLARE_PUBLIC(QSequentialAnimationGroup)
30
public
:
31
QSequentialAnimationGroupPrivate() : currentAnimationIndex(-1), lastLoop(0) { }
32
33
struct
AnimationIndex
34
{
35
AnimationIndex() : index(0), timeOffset(0) {}
36
// index points to the animation at timeOffset, skipping 0 duration animations.
37
// Note that the index semantic is slightly different depending on the direction.
38
int
index;
// the index of the animation in timeOffset
39
int
timeOffset;
// time offset when the animation at index starts.
40
};
41
42
int
animationActualTotalDuration(
int
index)
const
;
43
AnimationIndex indexForCurrentTime()
const
;
44
45
void
setCurrentAnimation(
int
index,
bool
intermediate =
false
);
46
void
activateCurrentAnimation(
bool
intermediate =
false
);
47
48
void
animationInsertedAt(qsizetype index) override;
49
void
animationRemoved(qsizetype index, QAbstractAnimation *anim) override;
50
51
bool
atEnd()
const
;
52
53
Q_OBJECT_BINDABLE_PROPERTY_WITH_ARGS(QSequentialAnimationGroupPrivate, QAbstractAnimation *,
54
currentAnimation,
55
nullptr
// initial value
56
)
57
int
currentAnimationIndex;
58
59
// this is the actual duration of uncontrolled animations
60
// it helps seeking and even going forward
61
QList<
int
> actualDuration;
62
63
void
restart();
64
int
lastLoop;
65
66
// handle time changes
67
void
rewindForwards(
const
AnimationIndex &newAnimationIndex);
68
void
advanceForwards(
const
AnimationIndex &newAnimationIndex);
69
70
// private slot
71
void
_q_uncontrolledAnimationFinished();
72
};
73
74
QT_END_NAMESPACE
75
76
#
endif
//QSEQUENTIALANIMATIONGROUP_P_H
QSequentialAnimationGroup
\inmodule QtCore
Definition
qsequentialanimationgroup.h:18
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QT_BEGIN_NAMESPACE::addSaturating
int addSaturating(int a, int b)
Definition
qsequentialanimationgroup.cpp:53
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(animation)
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(animation)
AnimationListConstIt
QList< QAbstractAnimation * >::ConstIterator AnimationListConstIt
Definition
qsequentialanimationgroup.cpp:63
qtbase
src
corelib
animation
qsequentialanimationgroup_p.h
Generated on
for Qt by
1.18.0