CCIMXDesktop
 
Loading...
Searching...
No Matches
StackPageSwitcher.h
1#ifndef STACKPAGESWITCHER_H
2#define STACKPAGESWITCHER_H
3#include <QObject>
4class QStackedWidget;
5
6struct StackpageSwitcherAnimation : public QObject {
7 Q_OBJECT
8public:
14 explicit StackpageSwitcherAnimation(QObject* parent = nullptr)
15 : QObject(parent) { }
16
17 static constexpr unsigned short ANIMATION_DURATION = 400;
18
24 struct AnimationInfo {
25 int new_index;
26 bool toLeft;
28 };
29
35 static void process_animations(
36 QStackedWidget* binding_widget,
37 AnimationInfo* animation_info);
38};
39
40#endif // STACKPAGESWITCHER_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 StackPageSwitcher.h:14
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