CCIMXDesktop
 
Loading...
Searching...
No Matches
WallPaperEngine Class Reference

Engine managing desktop wallpaper switching and animations. More...

#include <WallPaperEngine.h>

Inheritance diagram for WallPaperEngine:

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
 

Detailed Description

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.

Member Enumeration Documentation

◆ SwitchingMode

enum class WallPaperEngine::SwitchingMode
strong

Enum for wallpaper switching modes.

Enumerator
Gradient 

Wallpaper switches with gradient effect.

Fixed 

Fixed wallpaper without switching.

Movement 

Wallpaper switches with movement animation.

Constructor & Destructor Documentation

◆ WallPaperEngine()

WallPaperEngine::WallPaperEngine ( DesktopMainWindow window)
explicit

Constructs the wallpaper engine associated with a main window.

Parameters
windowPointer to the main desktop window.

Member Function Documentation

◆ animation_speed()

int WallPaperEngine::animation_speed ( ) const
inline

Gets the current animation speed duration.

Returns
Animation duration in milliseconds.

◆ current_mode()

SwitchingMode WallPaperEngine::current_mode ( ) const
inline

Gets the current switching mode.

Returns
Current mode.

◆ duration_seconds()

int WallPaperEngine::duration_seconds ( ) const

Gets the animation duration in seconds.

Returns
Duration in seconds.

◆ get_current_pixmap()

QPixmap WallPaperEngine::get_current_pixmap ( ) const

Retrieves the currently displayed wallpaper pixmap.

Returns
Current wallpaper pixmap.

◆ get_easingcurve()

QEasingCurve WallPaperEngine::get_easingcurve ( ) const

get_easingcurve

Returns

◆ get_image_list()

QStringList & WallPaperEngine::get_image_list ( )

Returns a reference to the wallpaper image file path list.

Returns
Reference to image list.

◆ imagelist_changed

void WallPaperEngine::imagelist_changed ( const QStringList &  l)
signal

Signal emitted when the wallpaper image list changes.

Parameters
lNew image list.

◆ process_resize()

void WallPaperEngine::process_resize ( DesktopMainWindow window)

Handles resizing events, adjusting wallpaper display accordingly.

Parameters
windowPointer to the main desktop window.

◆ set_animation_duration_second()

void WallPaperEngine::set_animation_duration_second ( int  secs)

Sets the animation duration in seconds.

Parameters
secsDuration in seconds.

◆ set_animation_speed()

void WallPaperEngine::set_animation_speed ( int  msspeed)
inline

Sets the animation speed duration in milliseconds.

Parameters
msspeedDuration in milliseconds.

◆ set_easingcurve()

void WallPaperEngine::set_easingcurve ( const QEasingCurve  curveType)

set_easingcurve

Parameters
curveTypeset as curveType indicates

◆ set_image_list()

void WallPaperEngine::set_image_list ( const QStringList &  l)

Sets the list of wallpaper image file paths.

Parameters
lNew image list.

◆ set_mode()

void WallPaperEngine::set_mode ( const SwitchingMode  mode)

Sets the wallpaper switching mode.

Parameters
modeNew switching mode.

◆ set_showing_pictures()

void WallPaperEngine::set_showing_pictures ( const QPixmap &  map)

Sets the pixmap currently showing as wallpaper.

Parameters
mapPixmap to display.

◆ set_switch_interval()

void WallPaperEngine::set_switch_interval ( int  new_interval)

Sets the interval between wallpaper switches.

Parameters
new_intervalInterval in milliseconds.

◆ switch_interval()

int WallPaperEngine::switch_interval ( ) const

Gets the current wallpaper switch interval.

Returns
Interval in milliseconds.

◆ wallpaperChanged

void WallPaperEngine::wallpaperChanged ( const QPixmap &  pixmap)
signal

Signal emitted when the wallpaper pixmap changes.

Parameters
pixmapNew wallpaper pixmap.

The documentation for this class was generated from the following files: