CCIMXDesktop
 
Loading...
Searching...
No Matches
WallPaperEngine::ModeMapping Struct Reference

Helper struct for mapping between mode names and enum values. More...

#include <WallPaperEngine.h>

Public Member Functions

QStringList values () const
 Returns all mode names as a QStringList.
 
QString toString (const WallPaperEngine::SwitchingMode mode)
 Converts a SwitchingMode enum to its string representation.
 
WallPaperEngine::SwitchingMode fromString (const QString &l)
 Converts a string name to the corresponding SwitchingMode enum.
 

Public Attributes

const QMap< QString, WallPaperEngine::SwitchingModemappings
 Mapping from string names to SwitchingMode values.
 

Detailed Description

Helper struct for mapping between mode names and enum values.

Member Function Documentation

◆ fromString()

WallPaperEngine::SwitchingMode WallPaperEngine::ModeMapping::fromString ( const QString &  l)
inline

Converts a string name to the corresponding SwitchingMode enum.

Parameters
lThe mode name string.
Exceptions
std::runtime_errorif the name is invalid.
Returns
Corresponding SwitchingMode.

◆ toString()

QString WallPaperEngine::ModeMapping::toString ( const WallPaperEngine::SwitchingMode  mode)
inline

Converts a SwitchingMode enum to its string representation.

Parameters
modeThe mode to convert.
Returns
Corresponding mode name.

◆ values()

QStringList WallPaperEngine::ModeMapping::values ( ) const
inline

Returns all mode names as a QStringList.

Returns
List of mode names.

Member Data Documentation

◆ mappings

const QMap<QString, WallPaperEngine::SwitchingMode> WallPaperEngine::ModeMapping::mappings
Initial value:
= {
{ "Fixed WallPaper", SwitchingMode::Fixed },
{ "Gradient Switch", SwitchingMode::Gradient },
{ "Movement Sessions", SwitchingMode::Movement },
}
@ Fixed
Fixed wallpaper without switching.
@ Movement
Wallpaper switches with movement animation.
@ Gradient
Wallpaper switches with gradient effect.

Mapping from string names to SwitchingMode values.


The documentation for this struct was generated from the following file: