diff --git a/Docs/configWindows.qdocconf b/Docs/configWindows.qdocconf index 1e2008a9..8441839f 100644 --- a/Docs/configWindows.qdocconf +++ b/Docs/configWindows.qdocconf @@ -1,11 +1,11 @@ # Run: -# C:\Qt\5.15.1\msvc2019_64\bin\qdoc.exe config.qdocconf +# C:\Qt\6.0.0\msvc2019_64\bin\qdoc.exe config.qdocconf # in this directory. You can shift + right click in this explorer # window and select "Open PowerShell Window here" for this. -include(C:\Qt\5.15.1\msvc2019_64\doc\global\qt-cpp-defines.qdocconf) -include(C:\Qt\5.15.1\msvc2019_64\doc\global\compat.qdocconf) -include(C:\Qt\5.15.1\msvc2019_64\doc\global\fileextensions.qdocconf) +include(C:\Qt\6.0.0\msvc2019_64\doc\global\qt-cpp-defines.qdocconf) +include(C:\Qt\6.0.0\msvc2019_64\doc\global\compat.qdocconf) +include(C:\Qt\6.0.0\msvc2019_64\doc\global\fileextensions.qdocconf) descripton = ScreenPlay is an open source cross plattform app for displaying Wallpaper, Widgets and AppDrawer. language = Cpp @@ -42,14 +42,14 @@ includepaths += ../ScreenPlayWidget/src/ includepaths += ../ScreenPlayWidget/ # qt -includepaths += C:/Qt/5.15.1/msvc2019_64/include/ -includepaths += C:/Qt/5.15.1/msvc2019_64/include/QtCore/ -includepaths += C:/Qt/5.15.1/msvc2019_64/include/QtGui/ -includepaths += C:/Qt/5.15.1/msvc2019_64/include/QtQml/ -includepaths += C:/Qt/5.15.1/msvc2019_64/include/QtWebEngine/ -includepaths += C:/Qt/5.15.1/msvc2019_64/include/QtNetwork/ -includepaths += C:/Qt/5.15.1/msvc2019_64/include/QtQuick/ -includepaths += C:/Qt/5.15.1/msvc2019_64/include/QtQuickControls2/ +includepaths += C:/Qt/6.0.0/msvc2019_64/include/ +includepaths += C:/Qt/6.0.0/msvc2019_64/include/QtCore/ +includepaths += C:/Qt/6.0.0/msvc2019_64/include/QtGui/ +includepaths += C:/Qt/6.0.0/msvc2019_64/include/QtQml/ +includepaths += C:/Qt/6.0.0/msvc2019_64/include/QtWebEngine/ +includepaths += C:/Qt/6.0.0/msvc2019_64/include/QtNetwork/ +includepaths += C:/Qt/6.0.0/msvc2019_64/include/QtQuick/ +includepaths += C:/Qt/6.0.0/msvc2019_64/include/QtQuickControls2/ diff --git a/Docs/html/screenplay-create-members.html b/Docs/html/screenplay-create-members.html index 56ef7a8f..cbdbfa03 100644 --- a/Docs/html/screenplay-create-members.html +++ b/Docs/html/screenplay-create-members.html @@ -17,17 +17,17 @@
  • Create()
  • Create(const std::shared_ptr<GlobalVariables> &, QObject *)
  • abortAndCleanup()
  • -
  • appendFfmpegOutput(QString )
  • +
  • appendFfmpegOutput(QString)
  • createHTMLWallpaper(const QString &, const QString &, const QString &, const QString &, const QVector<QString> &)
  • -
  • createWallpaperStart(QString , Create::VideoCodec )
  • +
  • createWallpaperStart(QString, Create::VideoCodec)
  • createWidget(const QString &, const QString &, const QString &, const QString &, const QString &, const QString &, const QVector<QString> &)
  • -
  • ffmpegOutputChanged(QString )
  • +
  • ffmpegOutputChanged(QString)
  • diff --git a/Docs/html/screenplay-installedlistmodel-members.html b/Docs/html/screenplay-installedlistmodel-members.html index 9307d53e..50032383 100644 --- a/Docs/html/screenplay-installedlistmodel-members.html +++ b/Docs/html/screenplay-installedlistmodel-members.html @@ -15,12 +15,12 @@ diff --git a/Docs/html/screenplay-monitorlistmodel-members.html b/Docs/html/screenplay-monitorlistmodel-members.html index e0a30bec..03b3dc1f 100644 --- a/Docs/html/screenplay-monitorlistmodel-members.html +++ b/Docs/html/screenplay-monitorlistmodel-members.html @@ -18,11 +18,11 @@
  • closeWallpaper(const QString &)
  • getAbsoluteDesktopSize() const : QRect
  • reset()
  • -
  • data(const QModelIndex &, int ) const : QVariant
  • -
  • getAppIDByMonitorIndex(const int) const : int
  • +
  • data(const QModelIndex &, int) const : QVariant
  • +
  • getAppIDByMonitorIndex(const int) const : std::optional<QString>
  • roleNames() const : QHash<int, QByteArray>
  • rowCount(const QModelIndex &) const : int
  • -
  • setWallpaperActiveMonitor(const std::shared_ptr<ScreenPlayWallpaper> &, const QVector<int> )
  • +
  • setWallpaperActiveMonitor(const std::shared_ptr<ScreenPlayWallpaper> &, const QVector<int>)
  • diff --git a/Docs/html/screenplay-monitorlistmodel.html b/Docs/html/screenplay-monitorlistmodel.html index 02d87de7..35dd3176 100644 --- a/Docs/html/screenplay-monitorlistmodel.html +++ b/Docs/html/screenplay-monitorlistmodel.html @@ -34,7 +34,7 @@

    Public Functions

    - +
    MonitorListModel(QObject *parent = nullptr)
    int getAppIDByMonitorIndex(const int) const
    std::optional<QString> getAppIDByMonitorIndex(const int index) const
    void setWallpaperActiveMonitor(const std::shared_ptr<ScreenPlayWallpaper> &wallpaper, const QVector<int> monitors)
    @@ -92,7 +92,7 @@

    Retruns the data member of the Monitor.

    -

    int MonitorListModel::getAppIDByMonitorIndex(const int) const

    +

    std::optional<QString> MonitorListModel::getAppIDByMonitorIndex(const int index) const

    If successful this function returns an AppID. Otherwhise std::nullopt.

    diff --git a/Docs/html/screenplay-projectsettingslistmodel.html b/Docs/html/screenplay-projectsettingslistmodel.html index cc8d4c16..bad5da65 100644 --- a/Docs/html/screenplay-projectsettingslistmodel.html +++ b/Docs/html/screenplay-projectsettingslistmodel.html @@ -71,7 +71,7 @@

    void ProjectSettingsListModel::init(const InstalledType::InstalledType &type, const QJsonObject &properties)

    Constructor when loading properties from settings.json We need to _flatten_ the json to make it work with a flat list model! See

    -

    See also getActiveSettingsJson, to, make, the, flat, list, to, a, hierarchical, json, and object.

    +

    See also getActiveSettingsJson, to, make, the, flat, list, to, a, hierarchical, json, and object.

    diff --git a/Docs/html/screenplay-screenplaymanager-members.html b/Docs/html/screenplay-screenplaymanager-members.html index 8511074b..2f1cce3c 100644 --- a/Docs/html/screenplay-screenplaymanager-members.html +++ b/Docs/html/screenplay-screenplaymanager-members.html @@ -15,25 +15,25 @@
    diff --git a/Docs/html/screenplay-screenplaymanager.html b/Docs/html/screenplay-screenplaymanager.html index 7d2536e2..65726dbf 100644 --- a/Docs/html/screenplay-screenplaymanager.html +++ b/Docs/html/screenplay-screenplaymanager.html @@ -42,8 +42,8 @@
    - - + + @@ -54,7 +54,7 @@ - +
    void closeAllWallpapers()
    void closeAllWidgets()
    void closeConntectionByType(const QStringList &list)
    bool closeWallpaper(const QString &appID)
    bool closeConnection(const QString &appID)
    bool closeConntectionByType(const QStringList &types)
    void createWallpaper(const ScreenPlay::InstalledType::InstalledType type, const ScreenPlay::FillMode::FillMode fillMode, const QString &absoluteStoragePath, const QString &previewImage, const QString &file, const QVector<int> &monitorIndex, const float volume, const float playbackRate, const QJsonObject &properties, const bool saveToProfilesConfigFile)
    void createWidget(const ScreenPlay::InstalledType::InstalledType type, const QPoint &position, const QString &absoluteStoragePath, const QString &previewImage, const QJsonObject &properties, const bool saveToProfilesConfigFile)
    ScreenPlay::ScreenPlayWallpaper *getWallpaperByAppID(const QString &appID) const
    void setActiveWallpaperCounter(int activeWallpaperCounter)
    void setActiveWidgetsCounter(int activeWidgetsCounter)
    void setAllWallpaperValue(const QString &key, const QString &value)
    void setWallpaperValue(const QString &appID, const QString &key, const QVariant &value)
    void setWallpaperValue(const QString &appID, const QString &key, const QString &value)
    void setWallpaperValueAtMonitorIndex(const int index, const QString &key, const QString &value)
    @@ -95,14 +95,14 @@
  • standaloneWidget
  • + +

    [slot] bool ScreenPlayManager::closeConnection(const QString &appID)

    +

    Closes a Wallpaper or Widget connection by the given appID.

    + -

    [slot] void ScreenPlayManager::closeConntectionByType(const QStringList &list)

    +

    [slot] bool ScreenPlayManager::closeConntectionByType(const QStringList &types)

    Closes a connection by type. Used only by closeAllWidgets() and closeAllWallpapers()

    - -

    [slot] bool ScreenPlayManager::closeWallpaper(const QString &appID)

    -

    Closes a wallpaper by the given appID.

    -

    [slot] void ScreenPlayManager::createWallpaper(const ScreenPlay::InstalledType::InstalledType type, const ScreenPlay::FillMode::FillMode fillMode, const QString &absoluteStoragePath, const QString &previewImage, const QString &file, const QVector<int> &monitorIndex, const float volume, const float playbackRate, const QJsonObject &properties, const bool saveToProfilesConfigFile)

    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.

    @@ -135,8 +135,8 @@

    [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 QString &appID, const QString &key, const QVariant &value)

    + +

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

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

    diff --git a/Docs/html/screenplay-screenplaywallpaper-members.html b/Docs/html/screenplay-screenplaywallpaper-members.html index 3e1dcbd2..fec2f438 100644 --- a/Docs/html/screenplay-screenplaywallpaper-members.html +++ b/Docs/html/screenplay-screenplaywallpaper-members.html @@ -14,30 +14,30 @@

    This is the complete list of members for ScreenPlay::ScreenPlayWallpaper, including inherited members.

    -

    [static slot] int Util::getVersionNumberFromString(const QString &)

    +

    [static slot] std::optional<QVersionNumber> Util::getVersionNumberFromString(const QString &str)

    Parses a version from a given QString. The QString must be looke like this: 1.0.0 - Major.Minor.Patch. A fixed position is used for parsing (at 0,2,4). Return std::nullopt when not successful.

    -

    [slot] void Util::logToGui(QtMsgType type, const QMessageLogContext &context, const QString &msg)

    +

    [static slot] void Util::logToGui(QtMsgType type, const QMessageLogContext &context, const QString &msg)

    Basic logging to the GUI. No logging is done to a log file for now. This string can be copied in the settings tab in the UI.

    @@ -104,15 +95,15 @@

    Opens a native folder window on the given path. Windows and Mac only for now!

    -

    [static slot] int Util::openJsonFileToObject(const QString &)

    +

    [static slot] std::optional<QJsonObject> Util::openJsonFileToObject(const QString &path)

    Opens a json file (absolute path) and tries to convert it to a QJsonObject. Returns std::nullopt when not successful.

    -

    [static slot] int Util::openJsonFileToString(const QString &)

    +

    [static slot] std::optional<QString> Util::openJsonFileToString(const QString &path)

    Opens a json file (absolute path) and tries to convert it to a QString. Returns std::nullopt when not successful.

    -

    [static slot] int Util::parseQByteArrayToQJsonObject(const QByteArray &)

    +

    [static slot] std::optional<QJsonObject> Util::parseQByteArrayToQJsonObject(const QByteArray &byteArray)

    Parses a QByteArray to a QJsonObject. If returns and std::nullopt on failure.

    diff --git a/Docs/html/screenplay.index b/Docs/html/screenplay.index index bc5d1cc2..66d0f3d7 100644 --- a/Docs/html/screenplay.index +++ b/Docs/html/screenplay.index @@ -5,20 +5,10 @@ - - - - - - - - - - - - - - + + + + @@ -104,7 +94,13 @@ - + + + + + + + @@ -112,14 +108,18 @@ - + - - + + + + + + @@ -208,92 +208,92 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + @@ -321,11 +321,11 @@ - + - + @@ -333,43 +333,43 @@ - + - + - + - - + + - - - + + + - + - + - - - - - - + + + + + + @@ -377,9 +377,10 @@ - - + + + @@ -406,21 +407,20 @@ - - - - + + + + - - + + + - - @@ -442,15 +442,15 @@ - - + + - - + + @@ -471,7 +471,7 @@ - + @@ -479,7 +479,7 @@ - + @@ -506,7 +506,7 @@ - + @@ -514,7 +514,7 @@ - + @@ -532,7 +532,7 @@ - + @@ -540,7 +540,7 @@ - + @@ -559,7 +559,7 @@ - + @@ -567,7 +567,7 @@ - + @@ -642,7 +642,7 @@ - + @@ -650,7 +650,7 @@ - + @@ -705,57 +705,57 @@ - + - + - + - + - + - + - + - + - + - + - + @@ -778,37 +778,42 @@ + - - - - - - - - - - - - + + + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + - - - + + + @@ -818,12 +823,14 @@ - - - - - - + + + + + + + + @@ -834,9 +841,11 @@ - - - + + + + + @@ -845,7 +854,7 @@ - + @@ -853,46 +862,46 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -910,43 +919,43 @@ - + - + - + - + - + - + - + - - - - - - - - - + + + + + + + + + @@ -958,221 +967,181 @@ + + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + - - - + + + - - - + + + - - + + - - + + + - - - + + + - - + + - + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - + @@ -1182,14 +1151,14 @@ - + - + @@ -1199,7 +1168,7 @@ - + @@ -1250,7 +1219,13 @@ - + + + + + + + @@ -1258,7 +1233,7 @@ - + @@ -1291,17 +1266,17 @@ - + - + - + @@ -1316,39 +1291,45 @@ - + - + - - - - - - + + + + + + - + - - - + + + - - + + - - + + - + + + + + + + @@ -1356,21 +1337,20 @@ - + - + - + - - + @@ -1405,30 +1385,30 @@ - + - - - - - - - - - - - - - + + + + + + + + + + + + + - + @@ -1438,17 +1418,17 @@ - - + + - + - + @@ -1476,7 +1456,7 @@ - + @@ -1484,7 +1464,7 @@ - + @@ -1512,25 +1492,25 @@ - + - + - + - + - + @@ -1545,7 +1525,7 @@ - + @@ -1563,7 +1543,7 @@ - + @@ -1571,7 +1551,7 @@ - + @@ -1594,36 +1574,39 @@ - + - + - + - + - - + + - + - - - - + - + + + + + + + @@ -1631,55 +1614,49 @@ - + - + - + - - - - - - - - - - - - - - - - - + + + + + + + + + + + - + - - - - + + + + - + - + @@ -1717,14 +1694,20 @@ - - + + - + - + + + + + + + @@ -1732,7 +1715,7 @@ - + @@ -1746,7 +1729,7 @@ - + @@ -1772,12 +1755,12 @@ - + - - - + + + @@ -1785,13 +1768,13 @@ - - - - - - - + + + + + + + @@ -1810,7 +1793,7 @@ - + @@ -1818,7 +1801,7 @@ - + @@ -1843,18 +1826,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -1865,7 +1848,7 @@ - + @@ -1891,7 +1874,13 @@ - + + + + + + + @@ -1899,7 +1888,7 @@ - + @@ -1923,8 +1912,8 @@ - - + + @@ -1935,45 +1924,46 @@ - + - + - + + - + - + - + - + - + - + - + @@ -1981,54 +1971,53 @@ - - - + + - + - + - - - - - + + + + + - - + + - - + + - - + + - + - - - - - - - + + + + - + + + + @@ -2040,7 +2029,7 @@ - + @@ -2048,102 +2037,109 @@ - - - + + + - - - + + + - - - - - + + + + + + + - + - + - + - - - - - - + + + - + - - - - + + + + + + + + + + - + - + - + - + - + - - + + - + - - - - - - - - - - - - - + + + + + + + + + + + + + + + - + @@ -2158,48 +2154,48 @@ - - + + - - + + - - + + - - + + - - - - + + + + - - + + - - + + - + - + - + - + @@ -2207,13 +2203,13 @@ - + - + @@ -2222,122 +2218,126 @@ - - - + + + + + + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -2350,6 +2350,7 @@ + @@ -2369,7 +2370,7 @@ - + @@ -2377,13 +2378,16 @@ - + - + + + + @@ -2406,192 +2410,232 @@ - - + - + - + - + - + - - - - - - - - - + + + + + + + + + + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + + + + + - - - + + + - + - - + + - - + + - - - + + + - + + + + + + + + + + + + + - + - + - - - + + + - - + + - + - + - + - + + + + - + - + - + - + - + - + - + - + + + + - + - + - - - - + + + + - - + + + + + + - - + + - + - - + + + + + + + + + + + + + + + + @@ -2599,88 +2643,101 @@ + - + - + - + - + - + - + + + + + + - + - + - + - + - + - + + + + + + - + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -2701,7 +2758,7 @@ - + @@ -2711,176 +2768,144 @@ - - - - + + + + - - + + - + - + - + - - - + + + - + - - + + - - - - - - + - - + + - + - - + + - + - - + + - - + + - - + + - - + + - + - + - + - - - + + + - + - - - - - - - - - - - - + + - + - + - - + + - + - - - - - - - - - - - - - - - - - - - - + + - - - - - - - - - + + + + - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + + @@ -2895,7 +2920,7 @@ - + @@ -2903,26 +2928,27 @@ - + - + - + - + - + - + + @@ -2930,7 +2956,7 @@ - + @@ -2940,12 +2966,12 @@ - + - + @@ -2953,91 +2979,93 @@ - - + + - + - + - + - + - + - + - + - - - - + + + + + - - + + - + - + - + - - + + - - + + - + - + - + - - + + + @@ -3046,7 +3074,7 @@ - + @@ -3079,6 +3107,7 @@ + @@ -3086,19 +3115,28 @@ - + + + + + + + + + - - - - + + + + + @@ -3107,9 +3145,15 @@ - + - + + + + + + + @@ -3117,14 +3161,14 @@ - + - - + + @@ -3150,11 +3194,11 @@ - + - + @@ -3162,37 +3206,37 @@ - + - + - + - + - + - + - - - + + + @@ -3203,11 +3247,42 @@ - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3247,7 +3322,7 @@ - + @@ -3255,7 +3330,7 @@ - + @@ -3271,7 +3346,7 @@ - + @@ -3290,7 +3365,7 @@ - + @@ -3302,43 +3377,43 @@ - + - + - + - + - + - - - - - - - - - - - - + + + + + + + + + + + + @@ -3355,7 +3430,7 @@ - + @@ -3363,7 +3438,7 @@ - + @@ -3390,7 +3465,7 @@ - + @@ -3401,7 +3476,7 @@ - + @@ -3421,7 +3496,7 @@ - + @@ -3429,7 +3504,7 @@ - + @@ -3466,32 +3541,32 @@ - + - + - + - + - + - + @@ -3507,25 +3582,36 @@ - - - - + + + + + + + + + + + + + + + + + - - - + + - - - - - - - - - + + + + + + + + diff --git a/ScreenPlay/main.qml b/ScreenPlay/main.qml index 3a0ff3c1..d93d2cf4 100644 --- a/ScreenPlay/main.qml +++ b/ScreenPlay/main.qml @@ -8,9 +8,9 @@ import QtGraphicalEffects 1.0 import ScreenPlay 1.0 import Settings 1.0 -import "qml/" import "qml/Monitors" as Monitors import "qml/Common" as Common +import "qml/Common/Dialogs" as Dialogs import "qml/Installed" as Installed import "qml/Navigation" as Navigation import "qml/Workshop" as Workshop @@ -24,7 +24,7 @@ ApplicationWindow { visible: false width: 1400 height: 788 - title: "ScreenPlay Alpha - V0.13.0" + title: "ScreenPlay Alpha - V0.12.1" minimumHeight: 450 minimumWidth: 1050 onVisibilityChanged: { @@ -84,12 +84,7 @@ ApplicationWindow { } function switchPage(name) { - if (name === "Create") { - pageLoader.visible = false - pageLoaderCreate.visible = true - pageLoaderWorkshop.visible = false - pageLoaderCreate.setSource("qrc:/qml/Create/Create.qml") - } else if (name === "Workshop") { + if (name === "Workshop") { if (!ScreenPlay.settings.steamVersion) { const steamAvialable = ScreenPlay.loadSteamPlugin() if (!steamAvialable) { @@ -98,130 +93,67 @@ ApplicationWindow { return } } - pageLoader.visible = false - pageLoaderCreate.visible = false - pageLoaderWorkshop.visible = true - pageLoaderWorkshop.setSource("qrc:/qml/Workshop/Workshop.qml") - } else if (name === "Community") { - pageLoader.visible = true - pageLoaderCreate.visible = false - pageLoaderWorkshop.visible = false - pageLoader.setSource("qrc:/qml/Community/Community.qml") - } else { - pageLoader.visible = true - pageLoaderCreate.visible = false - pageLoaderWorkshop.visible = false - pageLoader.setSource("qrc:/qml/" + name + "/" + name + ".qml") } + stackView.replace("qrc:/qml/" + name + "/" + name + ".qml") + sidebar.state = "inactive" } - Dialog { + Dialogs.SteamNotAvailable { id: dialogSteam - modal: true - anchors.centerIn: Overlay.overlay - standardButtons: Dialog.Ok - title: qsTr("Could not load steam integration!") } - Dialog { + Dialogs.MonitorConfiguration { id: dialogMonitorConfigurationChanged - modal: true - anchors.centerIn: Overlay.overlay - standardButtons: Dialog.Ok - contentHeight: 250 - - contentItem: Item { - ColumnLayout { - - anchors.margins: 20 - anchors.fill: parent - spacing: 20 - - Image { - Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: 150 - Layout.preferredHeight: 150 - source: "qrc:/assets/icons/monitor_setup.svg" - fillMode: Image.PreserveAspectFit - } - - Text { - text: qsTr("Your monitor setup changed!\n Please configure your wallpaper again.") - Layout.fillWidth: true - Layout.fillHeight: true - wrapMode: Text.WrapAtWordBoundaryOrAnywhere - horizontalAlignment: Text.AlignHCenter - font.family: ScreenPlay.settings.font - font.pointSize: 16 - color: Material.primaryTextColor - } - } - } - Connections { - target: ScreenPlay.monitorListModel - function onMonitorConfigurationChanged() { - dialogMonitorConfigurationChanged.open() - } - } } Common.TrayIcon {} - Loader { - id: pageLoader - asynchronous: true - source: "qrc:/qml/Installed/Installed.qml" + StackView { + id: stackView anchors { top: nav.bottom right: parent.right bottom: parent.bottom left: parent.left } - onStatusChanged: { - if (status == Loader.Ready) { - if (pageLoaderCreate.source != "qrc:/qml/Create/Create.qml") - timerLoader.start() + + property int duration: 300 + + replaceEnter: Transition { + OpacityAnimator { + from: 0 + to: 1 + duration: stackView.duration + easing.type: Easing.InOutQuart + } + ScaleAnimator { + from: 0.8 + to: 1 + duration: stackView.duration + easing.type: Easing.InOutQuart + } + } + replaceExit: Transition { + OpacityAnimator { + from: 1 + to: 0 + duration: stackView.duration + easing.type: Easing.InOutQuart + } + ScaleAnimator { + from: 1 + to: 0.8 + duration: stackView.duration + easing.type: Easing.InOutQuart } } } - Timer { - id: timerLoader - interval: 500 - onTriggered: { - pageLoaderCreate.source = "qrc:/qml/Create/Create.qml" - } - } - - Loader { - id: pageLoaderCreate - visible: false - anchors { - top: nav.bottom - right: parent.right - bottom: parent.bottom - left: parent.left - } - } - - Loader { - id: pageLoaderWorkshop - visible: false - enabled: ScreenPlay.settings.steamVersion - asynchronous: true - anchors { - top: nav.bottom - right: parent.right - bottom: parent.bottom - left: parent.left - } - } - Connections { - target: pageLoader.item + target: stackView.currentItem ignoreUnknownSignals: true function onSetSidebarActive(active) { diff --git a/ScreenPlay/qml.qrc b/ScreenPlay/qml.qrc index 8bd438c2..c6cb453b 100644 --- a/ScreenPlay/qml.qrc +++ b/ScreenPlay/qml.qrc @@ -73,5 +73,7 @@ qml/Create/Wizards/ImportWebm/ImportWebm.qml qml/Create/Wizards/ImportWebm/ImportWebmConvert.qml qml/Create/Wizards/ImportWebm/ImportWebmInit.qml + qml/Common/Dialogs/MonitorConfiguration.qml + qml/Common/Dialogs/SteamNotAvailable.qml diff --git a/ScreenPlay/qml/Common/Background.qml b/ScreenPlay/qml/Common/Background.qml new file mode 100644 index 00000000..bb34f2c2 --- /dev/null +++ b/ScreenPlay/qml/Common/Background.qml @@ -0,0 +1,132 @@ +import QtQuick 2.12 +import QtQuick.Controls.Material 2.12 +import QtGraphicalEffects 1.0 +import QtQuick.Particles 2.0 + +Rectangle { + id: element + anchors.fill: parent + color: Material.theme === Material.Light ? "white" : Qt.darker( + Material.background) + state: "init" + onStateChanged: { + if (state === "init") { + colorShaderCreateTimer.stop() + } else { + colorShaderCreateTimer.start() + } + } + + Rectangle { + id: bgCommunity + anchors.fill: parent + } + Rectangle { + id: bgWorkshop + color: "#161C1D" + anchors.fill: parent + } + + property var myDate: new Date() + + Timer { + id: colorShaderCreateTimer + interval: 16 + repeat: true + onTriggered: colorShaderCreate.time = myDate.getMilliseconds() + } + + ShaderEffect { + id: colorShaderCreate + anchors.fill: parent + blending: true + property real shaderOpacity: 0 + property real time: 45 + property vector2d resolution: Qt.vector2d(parent.width, + parent.height * 2) + fragmentShader: "qrc:/assets/shader/movingcolorramp.fsh" + } + + states: [ + State { + name: "init" + PropertyChanges { + target: colorShaderCreate + shaderOpacity: 0 + } + PropertyChanges { + target: bgCommunity + opacity: 0 + } + PropertyChanges { + target: bgWorkshop + opacity: 0 + } + }, + State { + name: "create" + PropertyChanges { + target: colorShaderCreate + shaderOpacity: 1 + } + PropertyChanges { + target: bgCommunity + opacity: 0 + } + PropertyChanges { + target: bgWorkshop + opacity: 0 + } + }, + State { + name: "community" + PropertyChanges { + target: colorShaderCreate + shaderOpacity: 0 + } + PropertyChanges { + target: bgCommunity + opacity: 1 + } + PropertyChanges { + target: bgWorkshop + opacity: 0 + } + }, + State { + name: "workshop" + PropertyChanges { + target: colorShaderCreate + shaderOpacity: 0 + } + PropertyChanges { + target: bgCommunity + opacity: 0 + } + PropertyChanges { + target: bgWorkshop + opacity: 1 + } + } + ] + + transitions: [ + + Transition { + from: "*" + to: "*" + + PropertyAnimation { + targets: [bgCommunity, bgWorkshop] + property: "opacity" + duration: 400 + easing.type: Easing.InOutQuart + } + PropertyAnimation { + target: colorShaderCreate + property: "shaderOpacity" + duration: 0 + } + } + ] +} diff --git a/ScreenPlay/qml/Common/Dialogs/MonitorConfiguration.qml b/ScreenPlay/qml/Common/Dialogs/MonitorConfiguration.qml new file mode 100644 index 00000000..4dce81a6 --- /dev/null +++ b/ScreenPlay/qml/Common/Dialogs/MonitorConfiguration.qml @@ -0,0 +1,48 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.3 +import QtQuick.Controls.Material 2.12 + +import ScreenPlay 1.0 + +Dialog { + id: dialogMonitorConfigurationChanged + modal: true + anchors.centerIn: Overlay.overlay + standardButtons: Dialog.Ok + contentHeight: 250 + + contentItem: Item { + ColumnLayout { + + anchors.margins: 20 + anchors.fill: parent + spacing: 20 + + Image { + Layout.alignment: Qt.AlignHCenter + Layout.preferredWidth: 150 + Layout.preferredHeight: 150 + source: "qrc:/assets/icons/monitor_setup.svg" + fillMode: Image.PreserveAspectFit + } + + Text { + text: qsTr("Your monitor setup changed!\n Please configure your wallpaper again.") + Layout.fillWidth: true + Layout.fillHeight: true + wrapMode: Text.WrapAtWordBoundaryOrAnywhere + horizontalAlignment: Text.AlignHCenter + font.family: ScreenPlay.settings.font + font.pointSize: 16 + color: Material.primaryTextColor + } + } + } + Connections { + target: ScreenPlay.monitorListModel + function onMonitorConfigurationChanged() { + dialogMonitorConfigurationChanged.open() + } + } +} diff --git a/ScreenPlay/qml/Common/Dialogs/SteamNotAvailable.qml b/ScreenPlay/qml/Common/Dialogs/SteamNotAvailable.qml new file mode 100644 index 00000000..faa8932d --- /dev/null +++ b/ScreenPlay/qml/Common/Dialogs/SteamNotAvailable.qml @@ -0,0 +1,11 @@ +import QtQuick 2.12 +import QtQuick.Controls 2.3 +import QtQuick.Layouts 1.3 + +Dialog { + id: dialogSteam + modal: true + anchors.centerIn: Overlay.overlay + standardButtons: Dialog.Ok + title: qsTr("Could not load steam integration!") +} diff --git a/ScreenPlay/qml/Community/Community.qml b/ScreenPlay/qml/Community/Community.qml index 5dc4b958..c45b0f47 100644 --- a/ScreenPlay/qml/Community/Community.qml +++ b/ScreenPlay/qml/Community/Community.qml @@ -7,8 +7,7 @@ import ScreenPlay 1.0 import QtWebEngine 1.8 Item { - id: community - anchors.fill: parent + id: root Rectangle { id: navWrapper @@ -22,6 +21,7 @@ Item { TabBar { id: nav height: parent.height + currentIndex: 0 background: Item {} anchors { top: parent.top @@ -32,28 +32,28 @@ Item { CommunityNavItem { text: qsTr("Wiki") - openLink: swipeView.itemAt(0).url + openLink: webModel.get(0).url icon.source: "qrc:/assets/icons/icon_help_center.svg" } CommunityNavItem { text: qsTr("Forum") - openLink: swipeView.itemAt(1).url + openLink: webModel.get(1).url icon.source: "qrc:/assets/icons/icon_forum.svg" } CommunityNavItem { text: qsTr("Issue List") - openLink: swipeView.itemAt(2).url + openLink: webModel.get(2).url icon.source: "qrc:/assets/icons/icon_report_problem.svg" } CommunityNavItem { text: qsTr("Release Notes") - openLink: swipeView.itemAt(3).url + openLink: webModel.get(3).url icon.source: "qrc:/assets/icons/icon_new_releases.svg" } CommunityNavItem { text: qsTr("Contribution Guide") - openLink: swipeView.itemAt(4).url + openLink: webModel.get(4).url icon.source: "qrc:/assets/icons/icon_supervisor_account.svg" } CommunityNavItem { @@ -96,29 +96,52 @@ Item { bottom: parent.bottom left: parent.left } + Repeater { + id: repeater + model: ListModel { + id: webModel - WebEngineView { - url: "https://kelteseth.gitlab.io/ScreenPlayDocs/" - } + ListElement { + url: "https://kelteseth.gitlab.io/ScreenPlayDocs/" + } + ListElement { + url: "https://forum.screen-play.app/" + } - WebEngineView { - url: "https://forum.screen-play.app/" - } + ListElement { + url: "https://gitlab.com/kelteseth/ScreenPlay/-/issues" + } - WebEngineView { - url: "https://gitlab.com/kelteseth/ScreenPlay/-/issues" - } + ListElement { + url: "https://gitlab.com/kelteseth/ScreenPlay/-/releases" + } - WebEngineView { - url: "https://gitlab.com/kelteseth/ScreenPlay/-/releases" - } + ListElement { + url: "https://gitlab.com/kelteseth/ScreenPlay#contributing-for-none-programmer" + } - WebEngineView { - url: "https://gitlab.com/kelteseth/ScreenPlay#contributing-for-none-programmer" - } + ListElement { + url: "https://steamcommunity.com/app/672870/workshop/" + } + } - WebEngineView { - url: "https://steamcommunity.com/app/672870/workshop/" + Loader { + active: SwipeView.isCurrentItem || SwipeView.isNextItem + || SwipeView.isPreviousItem + sourceComponent: Item { + Component.onCompleted: timer.start() + Timer { + id: timer + interval: 200 + onTriggered: webView.url = webModel.get(index).url + } + + WebEngineView { + id: webView + anchors.fill: parent + } + } + } } } } diff --git a/ScreenPlay/qml/Create/Create.qml b/ScreenPlay/qml/Create/Create.qml index fe68607c..8a10ae9f 100644 --- a/ScreenPlay/qml/Create/Create.qml +++ b/ScreenPlay/qml/Create/Create.qml @@ -13,7 +13,6 @@ import ScreenPlay.QMLUtilities 1.0 Item { id: root - anchors.fill: parent Sidebar { id: sidebar diff --git a/ScreenPlay/qml/Installed/Installed.qml b/ScreenPlay/qml/Installed/Installed.qml index 531da4e3..a1786b7f 100644 --- a/ScreenPlay/qml/Installed/Installed.qml +++ b/ScreenPlay/qml/Installed/Installed.qml @@ -240,6 +240,7 @@ Item { } } } + Dialog { id: deleteDialog title: qsTr("Are you sure you want to delete this item?") @@ -256,7 +257,6 @@ Item { Navigation { id: navWrapper height: 115 - width: parent.width anchors { top: parent.top right: parent.right diff --git a/ScreenPlay/qml/Installed/Navigation.qml b/ScreenPlay/qml/Installed/Navigation.qml index 13e5ef40..bf55d939 100644 --- a/ScreenPlay/qml/Installed/Navigation.qml +++ b/ScreenPlay/qml/Installed/Navigation.qml @@ -14,7 +14,6 @@ import "../Common" as Common Item { id: navWrapper - state: "out" Rectangle { diff --git a/ScreenPlay/qml/Navigation/NavigationItem.qml b/ScreenPlay/qml/Navigation/NavigationItem.qml index 5afad722..fe30d6a7 100644 --- a/ScreenPlay/qml/Navigation/NavigationItem.qml +++ b/ScreenPlay/qml/Navigation/NavigationItem.qml @@ -69,7 +69,6 @@ Item { font.family: ScreenPlay.settings.font font.weight: Font.Normal text: "" - } Text { diff --git a/ScreenPlay/qml/Settings/Settings.qml b/ScreenPlay/qml/Settings/Settings.qml index 79ba1366..e41a2f32 100644 --- a/ScreenPlay/qml/Settings/Settings.qml +++ b/ScreenPlay/qml/Settings/Settings.qml @@ -14,7 +14,6 @@ import "../Common" Item { id: root - anchors.fill: parent function indexOfValue(model, value) { diff --git a/ScreenPlay/qml/Workshop/Workshop.qml b/ScreenPlay/qml/Workshop/Workshop.qml index 9a560be7..8edd01d1 100644 --- a/ScreenPlay/qml/Workshop/Workshop.qml +++ b/ScreenPlay/qml/Workshop/Workshop.qml @@ -13,7 +13,6 @@ import "upload/" Item { id: workshop state: "base" - anchors.fill: parent onVisibleChanged: { if (!visible) sidebar.close()