CCIMXDesktop
 
Loading...
Searching...
No Matches
stackpage_switcher_animation.h
1#ifndef STACKPAGE_SWITCHER_ANIMATION_H
2#define STACKPAGE_SWITCHER_ANIMATION_H
3#include <QObject>
4class QStackedWidget;
5
10struct StackpageSwitcherAnimation : public QObject {
11 Q_OBJECT
12public:
18 explicit StackpageSwitcherAnimation(QObject* parent = nullptr)
19 : QObject(parent) { }
20
21 static constexpr unsigned short ANIMATION_DURATION = 400;
22
28 struct AnimationInfo {
29 int new_index;
30 bool toLeft;
32 };
33
39 static void process_animations(
40 QStackedWidget* binding_widget,
41 AnimationInfo* animation_info);
42};
43
44#endif // STACKPAGE_SWITCHER_ANIMATION_H
The AnimationInfo class contains the animation info that the static functions process_animations requ...
Definition stackpage_switcher_animation.h:24
int animation_duration
the animation duration
Definition stackpage_switcher_animation.h:27
bool toLeft
the direction of the animation
Definition stackpage_switcher_animation.h:26
int new_index
the new index to be switched
Definition stackpage_switcher_animation.h:25
The StackpageSwitcherAnimation class holdings the animations of the stack page animations.
Definition stackpage_switcher_animation.h:6
StackpageSwitcherAnimation(QObject *parent=nullptr)
Construct a new Stackpage Switcher Animation object.
Definition stackpage_switcher_animation.h:18
static constexpr unsigned short ANIMATION_DURATION
the animation duration
Definition stackpage_switcher_animation.h:17
static void process_animations(QStackedWidget *binding_widget, AnimationInfo *animation_info)
process_animations process the animations