CCIMXDesktop
 
Loading...
Searching...
No Matches
wallpaperanimationhandler.h
1#ifndef WALLPAPERANIMATIONHANDLER_H
2#define WALLPAPERANIMATIONHANDLER_H
3
4#include "desktopmainwindow.h"
5#include <QEasingCurve>
6#include <QObject>
7#include <QStringList>
8#include <functional>
9/* this class is expected to do the wallpaper switch */
10
15struct WallPaperAnimationHandler : public QObject {
16 Q_OBJECT
17public:
23 explicit WallPaperAnimationHandler(QObject* parent = nullptr);
24
32 QStringList* image_list { nullptr };
37 std::function<int(QStringList*)> selector { nullptr };
43 static QString default_selections(const QStringList& list);
49 static int default_index(const QStringList& list);
50 };
51
58 QEasingCurve curve;
59 };
60
68 static void process_opacity_switch(
69 const WallPaperEngine* group,
70 ImagePoolEngine& engine,
71 const AnimationSettingsPackage& packages);
79 static void process_movement_switch(
80 const WallPaperEngine* group,
81 ImagePoolEngine& engine,
82 const AnimationSettingsPackage& packages);
83};
84
85#endif // WALLPAPERANIMATIONHANDLER_H
Engine managing desktop wallpaper switching and animations.
Definition WallPaperEngine.h:20
AnimationSettingsPackage settings.
Definition wallpaperanimationhandler.h:56
int durations
animation durations
Definition wallpaperanimationhandler.h:57
QEasingCurve curve
animation curve type
Definition wallpaperanimationhandler.h:58
The ImagePoolEngine class makes a image selection as an engine, WallPaperAnimationHandler requires th...
Definition wallpaperanimationhandler.h:31
static QString default_selections(const QStringList &list)
default_selections makes the default random selections
Definition wallpaperanimationhandler.cpp:50
QStringList * image_list
image list of the src
Definition wallpaperanimationhandler.h:32
static int default_index(const QStringList &list)
default_index makes the default random selections
Definition wallpaperanimationhandler.cpp:54
std::function< int(QStringList *)> selector
selector make sense in deciding how to select from the image list, if not set, then it will be random...
Definition wallpaperanimationhandler.h:37
The WallPaperAnimationHandler class is the animation holder for the wallpaper, it is used to animate ...
Definition wallpaperanimationhandler.h:15
static void process_opacity_switch(const WallPaperEngine *group, ImagePoolEngine &engine, const AnimationSettingsPackage &packages)
process_opacity_switch makes the real switch async, invoke this for the real switching.
Definition wallpaperanimationhandler.cpp:59
static void process_movement_switch(const WallPaperEngine *group, ImagePoolEngine &engine, const AnimationSettingsPackage &packages)
process_movement_switch makes the real switch async, invoke this for the real switching.
Definition wallpaperanimationhandler.cpp:110