diff --git a/ScreenPlay/CMakeLists.txt b/ScreenPlay/CMakeLists.txt index 71b41c63..05b45be9 100644 --- a/ScreenPlay/CMakeLists.txt +++ b/ScreenPlay/CMakeLists.txt @@ -290,6 +290,12 @@ qt_add_qml_module( target_link_libraries( ScreenPlayApp PUBLIC ScreenPlaySDK + LibArchive::LibArchive + ScreenPlayUtil + ScreenPlayUtilplugin + QArchive + Plausibleplugin + SteamSDKQtEnums Threads::Threads Qt6::Quick Qt6::Gui @@ -298,12 +304,7 @@ target_link_libraries( Qt6::WebSockets Qt6::Svg Qt6::QuickControls2 - Qt6::Xml - LibArchive::LibArchive - ScreenPlayUtil - ScreenPlayUtilplugin - QArchive - SteamSDKQtEnums) + Qt6::Xml) if(${SCREENPLAY_STEAM}) target_compile_definitions(ScreenPlayApp PRIVATE SCREENPLAY_STEAM) diff --git a/ScreenPlay/main.cpp b/ScreenPlay/main.cpp index bb3daaa0..dd4cd351 100644 --- a/ScreenPlay/main.cpp +++ b/ScreenPlay/main.cpp @@ -10,12 +10,15 @@ #include #endif -Q_IMPORT_QML_PLUGIN(ScreenPlayAppPlugin) -Q_IMPORT_QML_PLUGIN(ScreenPlayUtilPlugin) #ifdef SCREENPLAY_STEAM Q_IMPORT_QML_PLUGIN(ScreenPlayWorkshopPlugin) #endif +Q_IMPORT_QML_PLUGIN(ScreenPlayAppPlugin) +Q_IMPORT_QML_PLUGIN(ScreenPlayUtilPlugin) +Q_IMPORT_QML_PLUGIN(PlausiblePlugin) + + int main(int argc, char* argv[]) { diff --git a/ScreenPlay/main.qml b/ScreenPlay/main.qml index fffef03f..585445e1 100644 --- a/ScreenPlay/main.qml +++ b/ScreenPlay/main.qml @@ -10,6 +10,8 @@ import ScreenPlay import Settings import ScreenPlayUtil as Util import Qt5Compat.GraphicalEffects +import Plausible 1.0 + import "qml/Monitors" as Monitors import "qml/Installed" as Installed import "qml/Navigation" as Navigation @@ -59,6 +61,15 @@ ApplicationWindow { minimumHeight: 450 minimumWidth: 1050 + Plausible { + id: plausible + screenSize: Qt.size(root.width, root.height) + domain: "app.screen-play.app" + debug: false + } + + + // Partial workaround for // https://bugreports.qt.io/browse/QTBUG-86047 Material.accent: Material.color(Material.Orange) @@ -151,6 +162,14 @@ ApplicationWindow { root.show(); } + function onActiveWidgetsCounterChanged() { + plausible.pageView("widget/count/" + App.screenPlayManager.activeWidgetsCounter) + } + + function onActiveWallpaperCounterChanged() { + plausible.pageView("wallpaper/count/" + App.screenPlayManager.activeWallpaperCounter) + } + target: App.screenPlayManager }