Engine managing desktop wallpaper switching and animations. More...
#include <WallPaperEngine.h>
Classes | |
struct | ModeMapping |
Helper struct for mapping between mode names and enum values. More... | |
Public Types | |
enum class | SwitchingMode { Gradient , Fixed , Movement } |
Enum for wallpaper switching modes. More... | |
Signals | |
void | imagelist_changed (const QStringList &l) |
Signal emitted when the wallpaper image list changes. | |
void | wallpaperChanged (const QPixmap &pixmap) |
Signal emitted when the wallpaper pixmap changes. | |
Public Member Functions | |
WallPaperEngine ()=delete | |
Deleted default constructor. | |
WallPaperEngine (DesktopMainWindow *window) | |
Constructs the wallpaper engine associated with a main window. | |
void | process_resize (DesktopMainWindow *window) |
Handles resizing events, adjusting wallpaper display accordingly. | |
void | set_switch_interval (int new_interval) |
Sets the interval between wallpaper switches. | |
int | switch_interval () const |
Gets the current wallpaper switch interval. | |
void | set_animation_speed (int msspeed) |
Sets the animation speed duration in milliseconds. | |
int | animation_speed () const |
Gets the current animation speed duration. | |
void | set_mode (const SwitchingMode mode) |
Sets the wallpaper switching mode. | |
QPixmap | get_current_pixmap () const |
Retrieves the currently displayed wallpaper pixmap. | |
SwitchingMode | current_mode () const |
Gets the current switching mode. | |
void | set_showing_pictures (const QPixmap &map) |
Sets the pixmap currently showing as wallpaper. | |
void | set_animation_duration_second (int secs) |
Sets the animation duration in seconds. | |
int | duration_seconds () const |
Gets the animation duration in seconds. | |
QStringList & | get_image_list () |
Returns a reference to the wallpaper image file path list. | |
void | set_image_list (const QStringList &l) |
Sets the list of wallpaper image file paths. | |
void | reset_defaults () |
Resets all settings to default values. | |
QEasingCurve | get_easingcurve () const |
get_easingcurve | |
void | set_easingcurve (const QEasingCurve curveType) |
set_easingcurve | |
void | fallback_empty_session () |
Handles fallback behavior when no wallpaper images are available. | |
Public Attributes | |
struct WallPaperEngine::ModeMapping | modeMappings |
mode mappings for the string <=> mode transfer | |
Friends | |
class | WallPaperAnimationHandler |
Engine managing desktop wallpaper switching and animations.
Supports multiple switching modes such as gradient, fixed, and movement, handles wallpaper image lists, animation timing, and wallpaper display.
|
strong |
|
explicit |
Constructs the wallpaper engine associated with a main window.
window | Pointer to the main desktop window. |
|
inline |
Gets the current animation speed duration.
|
inline |
Gets the current switching mode.
int WallPaperEngine::duration_seconds | ( | ) | const |
Gets the animation duration in seconds.
QPixmap WallPaperEngine::get_current_pixmap | ( | ) | const |
Retrieves the currently displayed wallpaper pixmap.
QEasingCurve WallPaperEngine::get_easingcurve | ( | ) | const |
get_easingcurve
QStringList & WallPaperEngine::get_image_list | ( | ) |
Returns a reference to the wallpaper image file path list.
|
signal |
Signal emitted when the wallpaper image list changes.
l | New image list. |
void WallPaperEngine::process_resize | ( | DesktopMainWindow * | window | ) |
Handles resizing events, adjusting wallpaper display accordingly.
window | Pointer to the main desktop window. |
void WallPaperEngine::set_animation_duration_second | ( | int | secs | ) |
Sets the animation duration in seconds.
secs | Duration in seconds. |
|
inline |
Sets the animation speed duration in milliseconds.
msspeed | Duration in milliseconds. |
void WallPaperEngine::set_easingcurve | ( | const QEasingCurve | curveType | ) |
set_easingcurve
curveType | set as curveType indicates |
void WallPaperEngine::set_image_list | ( | const QStringList & | l | ) |
Sets the list of wallpaper image file paths.
l | New image list. |
void WallPaperEngine::set_mode | ( | const SwitchingMode | mode | ) |
Sets the wallpaper switching mode.
mode | New switching mode. |
void WallPaperEngine::set_showing_pictures | ( | const QPixmap & | map | ) |
Sets the pixmap currently showing as wallpaper.
map | Pixmap to display. |
void WallPaperEngine::set_switch_interval | ( | int | new_interval | ) |
Sets the interval between wallpaper switches.
new_interval | Interval in milliseconds. |
int WallPaperEngine::switch_interval | ( | ) | const |
Gets the current wallpaper switch interval.
|
signal |
Signal emitted when the wallpaper pixmap changes.
pixmap | New wallpaper pixmap. |