• ScreenPlayManager
  • ScreenPlayManager Class

    class ScreenPlay::ScreenPlayManager

    The ScreenPlayManager is used to manage multiple ScreenPlayWallpaper and ScreenPlayWidget. More...

    Header: #include <ScreenPlayManager>

    Public Functions

    bool createWidget(const int type, const int &position, const int &absoluteStoragePath, const int &previewImage, const int &properties, const bool saveToProfilesConfigFile)
    ScreenPlay::ScreenPlayWallpaper *getWallpaperByAppID(const int &appID) const
    void newConnection()
    bool removeAllWallpapers()
    bool removeAllWidgets()
    bool requestProjectSettingsAtMonitorIndex(const int index)
    bool setAllWallpaperValue(const int &key, const int &value)
    bool setWallpaperFillModeAtMonitorIndex(const int index, const int fillmode)
    bool setWallpaperValue(const int &appID, const int &key, const int &value)
    bool setWallpaperValueAtMonitorIndex(const int index, const int &key, const int &value)

    Detailed Description

    Creates and (indirectly) destroys Wallpaper and Widgets via opening and closing QLocalPipe connectons of the ScreenPlaySDK. Also responsible to set the current active wallpaper to the monitorListModel.

    Member Function Documentation

    bool ScreenPlayManager::createWidget(const int type, const int &position, const int &absoluteStoragePath, const int &previewImage, const int &properties, const bool saveToProfilesConfigFile)

    Creates a ScreenPlayWidget object via a absoluteStoragePath and a preview image (relative path).

    ScreenPlay::ScreenPlayWallpaper *ScreenPlayManager::getWallpaperByAppID(const int &appID) const

    Returns a ScreenPlayWallpaper if successful, otherwhise std::nullopt. This function is only used in QML.

    void ScreenPlayManager::newConnection()

    Appends a new SDKConnection object shared_ptr to the m_clients list.

    bool ScreenPlayManager::removeAllWallpapers()

    Removes all wallpaper entries in the profiles.json.

    bool ScreenPlayManager::removeAllWidgets()

    Removes all widgets and resets the activeWidgetCounter to 0.

    bool ScreenPlayManager::requestProjectSettingsAtMonitorIndex(const int index)

    Request a spesific json profile to display in the active wallpaper popup on the right.

    bool ScreenPlayManager::setAllWallpaperValue(const int &key, const int &value)

    Convenient function to set a value at a given index and key for all wallaper. For exmaple used to mute all wallpaper.

    bool ScreenPlayManager::setWallpaperFillModeAtMonitorIndex(const int index, const int fillmode)

    Set a wallpaper fillmode at a given index and converts the qml enum (int) into the c++ enum class value.

    bool ScreenPlayManager::setWallpaperValue(const int &appID, const int &key, const int &value)

    Sets a given value to a given key. The appID is used to identify the receiver socket.

    bool ScreenPlayManager::setWallpaperValueAtMonitorIndex(const int index, const int &key, const int &value)

    Set a wallpaper value at a given index and key.