• ScreenPlayManager
  • ScreenPlayManager Class

    (ScreenPlay::ScreenPlayManager)

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

    Header: #include <ScreenPlayManager>

    Public Functions

    ScreenPlayManager(const shared_ptr<ScreenPlay::GlobalVariables> &globalVariables, const shared_ptr<ScreenPlay::MonitorListModel> &mlm, const shared_ptr<ScreenPlay::SDKConnector> &sdkc, const int &telemetry, QObject *parent = nullptr)
    int activeWallpaperCounter() const
    int activeWidgetsCounter() const

    Public Slots

    void createWallpaper(QVector<int> monitorIndex, const QString &absoluteStoragePath, const QString &previewImage, const float volume, const QString &fillMode, const QString &type, const bool saveToProfilesConfigFile = true)
    void createWidget(const QUrl &absoluteStoragePath, const QString &previewImage, const QString &type)
    int getWallpaperByAppID(const QString &)
    void removeAllWallpapers()
    void requestProjectSettingsListModelAt(const int index)
    void setActiveWallpaperCounter(int activeWallpaperCounter)
    void setActiveWidgetsCounter(int activeWidgetsCounter)
    void setAllWallpaperValue(const QString &key, const QString &value)
    void setWallpaperValue(const int index, const QString &key, const QString &value)

    Signals

    void activeWallpaperCounterChanged(int activeWallpaperCounter)
    void activeWidgetsCounterChanged(int activeWidgetsCounter)

    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

    ScreenPlayManager::ScreenPlayManager(const shared_ptr<ScreenPlay::GlobalVariables> &globalVariables, const shared_ptr<ScreenPlay::MonitorListModel> &mlm, const shared_ptr<ScreenPlay::SDKConnector> &sdkc, const int &telemetry, QObject *parent = nullptr)

    Constructor

    [slot] void ScreenPlayManager::createWallpaper(QVector<int> monitorIndex, const QString &absoluteStoragePath, const QString &previewImage, const float volume, const QString &fillMode, const QString &type, const bool saveToProfilesConfigFile = true)

    Creates a wallpaper with a given monitorIndex list, a absoluteStoragePath folder, a previewImage (relative path to the absoluteStoragePath), a default volume, a fillMode, a type (htmlWallpaper, qmlWallpaper etc.), a saveToProfilesConfigFile bool only set to flase if we call the method when using via the settings on startup to skip a unnecessary save.

    [slot] void ScreenPlayManager::createWidget(const QUrl &absoluteStoragePath, const QString &previewImage, const QString &type)

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

    [slot] int ScreenPlayManager::getWallpaperByAppID(const QString &)

    Returns a ScreenPlayWallpaper if successful, otherwhise std::nullopt.

    [slot] void ScreenPlayManager::removeAllWallpapers()

    Removes all wallpaper entries in the profiles.json. This method will likely be removed when using nlohmann/json in the future.

    [slot] void ScreenPlayManager::requestProjectSettingsListModelAt(const int index)

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

    [slot] void ScreenPlayManager::setAllWallpaperValue(const QString &key, const QString &value)

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

    [slot] void ScreenPlayManager::setWallpaperValue(const int index, const QString &key, const QString &value)

    Set a wallpaper value at a given index and key.