• ScreenPlayWallpaper
  • ScreenPlayWallpaper Class

    class ScreenPlay::ScreenPlayWallpaper

    A Single Object to manage a Wallpaper. More...

    Header: #include <ScreenPlayWallpaper>

    Public Functions

    ScreenPlayWallpaper(const QVector<int> &screenNumber, const std::shared_ptr<GlobalVariables> &globalVariables, const QString &appID, const QString &absolutePath, const QString &previewImage, const QString &file, const float volume, const float playbackRate, const FillMode::FillMode fillMode, const InstalledType::InstalledType type, const QJsonObject &properties, const bool checkWallpaperVisible, QObject *parent = nullptr)
    QString absolutePath() const
    QString appID() const
    QString file() const
    FillMode::FillMode fillMode() const
    QJsonObject getActiveSettingsJson()
    bool isLooping() const
    float playbackRate() const
    QString previewImage() const
    void replace(const QString &absolutePath, const QString &previewImage, const QString &file, const float volume, const FillMode::FillMode fillMode, const InstalledType::InstalledType type, const bool checkWallpaperVisible)
    QVector<int> screenNumber() const
    void setSDKConnection(const std::shared_ptr<SDKConnection> &connection)
    InstalledType::InstalledType type() const
    float volume() const

    Public Slots

    void processError(QProcess::ProcessError error)
    void processExit(int exitCode, QProcess::ExitStatus exitStatus)
    void setAbsolutePath(QString absolutePath)
    void setAppID(QString appID)
    void setFile(QString file)
    void setFillMode(FillMode::FillMode fillMode)
    void setIsLooping(bool isLooping)
    void setPlaybackRate(float playbackRate)
    void setPreviewImage(QString previewImage)
    void setScreenNumber(QVector<int> screenNumber)
    void setType(InstalledType::InstalledType type)
    void setVolume(float volume)
    void setWallpaperValue(const QString &key, const QString &value, const bool save = false)

    Signals

    void absolutePathChanged(QString absolutePath)
    void appIDChanged(QString appID)
    void fileChanged(QString file)
    void fillModeChanged(FillMode::FillMode fillMode)
    void isLoopingChanged(bool isLooping)
    void playbackRateChanged(float playbackRate)
    void previewImageChanged(QString previewImage)
    void screenNumberChanged(QVector<int> screenNumber)
    void typeChanged(InstalledType::InstalledType type)
    void volumeChanged(float volume)

    Detailed Description

    This class is only for managing the QProcess to an extern ScreenPlayWallpaper!

    Member Function Documentation

    ScreenPlayWallpaper::ScreenPlayWallpaper(const QVector<int> &screenNumber, const std::shared_ptr<GlobalVariables> &globalVariables, const QString &appID, const QString &absolutePath, const QString &previewImage, const QString &file, const float volume, const float playbackRate, const FillMode::FillMode fillMode, const InstalledType::InstalledType type, const QJsonObject &properties, const bool checkWallpaperVisible, QObject *parent = nullptr)

    Constructor for ScreenPlayWallpaper.

    [slot] void ScreenPlayWallpaper::processError(QProcess::ProcessError error)

    Prints the exit code error.

    [slot] void ScreenPlayWallpaper::processExit(int exitCode, QProcess::ExitStatus exitStatus)

    Prints the exit code if != 0.

    [slot] void ScreenPlayWallpaper::setWallpaperValue(const QString &key, const QString &value, const bool save = false)

    Sets a wallpaper value. We directly set the property if it is either volume, playbackRate or fillMode. Otherwise it is a simple key, value json pair.

    QJsonObject ScreenPlayWallpaper::getActiveSettingsJson()

    Loads the project.json that contains all settings to display the wallpaper.

    void ScreenPlayWallpaper::replace(const QString &absolutePath, const QString &previewImage, const QString &file, const float volume, const FillMode::FillMode fillMode, const InstalledType::InstalledType type, const bool checkWallpaperVisible)

    Replaces the current wallpaper with the given one.

    void ScreenPlayWallpaper::setSDKConnection(const std::shared_ptr<SDKConnection> &connection)

    Connects to ScreenPlay. Start a alive ping check for every 16 seconds.