diff --git a/ScreenPlay/main.qml b/ScreenPlay/main.qml index 65900e9b..ffad9c66 100644 --- a/ScreenPlay/main.qml +++ b/ScreenPlay/main.qml @@ -20,22 +20,25 @@ ApplicationWindow { minimumWidth: 1050 Tracker { - id: tracker - Component.onCompleted: tracker.sendScreenView("Main Screen") - trackingID: "UA-43193236-3" + id: tracker + Component.onCompleted: tracker.sendScreenView("Installed") + trackingID: "UA-43193236-3" + sendInterval: 100 } - - Component.onCompleted: { - + tracker.startSession() if (!screenPlaySettings.autostart) { show() } steamWorkshop.initSteam() } + Component.onDestruction: { + tracker.endSession() + } function switchPage(name) { + tracker.sendScreenView(name) if (name === "Create") { pageLoader.visible = false pageLoaderCreate.setSource("qrc:/qml/Create/Create.qml") @@ -54,6 +57,7 @@ ApplicationWindow { pageLoaderWorkshop.visible = false pageLoader.setSource("qrc:/qml/" + name + "/" + name + ".qml") sidebar.state = "inactive" + } } diff --git a/ScreenPlay/qml/Create/CreateImport.qml b/ScreenPlay/qml/Create/CreateImport.qml index 50eba44f..8596d98d 100644 --- a/ScreenPlay/qml/Create/CreateImport.qml +++ b/ScreenPlay/qml/Create/CreateImport.qml @@ -1,5 +1,5 @@ import QtQuick 2.9 -import QtAV 1.07 + import QtGraphicalEffects 1.0 import QtQuick.Controls 2.3 import Qt.labs.platform 1.0 @@ -13,17 +13,7 @@ Item { property bool isVideoPlaying: true property url file onFileChanged: { - timerSource.start() - } - Timer { - id: timerSource - interval: 1000 - onTriggered: { - //var tmp = Qt.resolvedUrl(file).toString() - player.source = Qt.resolvedUrl(file) - player.play() - } } RectangularGlow { @@ -57,73 +47,8 @@ Item { topMargin: 180 horizontalCenter: parent.horizontalCenter } - - VideoOutput2 { - id: videoOut - z: 13 - anchors.fill: parent - source: player - opengl: true - fillMode: VideoOutput.Stretch - - Slider { - id: sliVideoPosition - height: 30 - width: parent.width * .8 - from: 0 - to: 1 - anchors { - horizontalCenter: parent.horizontalCenter - bottom: parent.bottom - bottomMargin: 20 - } - onValueChanged: { - print(player.position) - player.seek(sliVideoPosition.value * player.duration) - } - } - - Image { - id: imgPreview - anchors.fill: parent - opacity: 0 - } - - BusyIndicator { - id: busyIndicator - anchors.horizontalCenter: parent.horizontalCenter - anchors.verticalCenter: parent.verticalCenter - visible: false - } - Text { - id: txtDescriptionThumbnail - text: qsTr("Select preview image") - font.family: "Roboto" - opacity: .5 - renderType: Text.NativeRendering - font.pixelSize: 14 - color: "white" - anchors { - horizontalCenter: parent.horizontalCenter - bottom: parent.bottom - bottomMargin: 10 - } - } - } } - MediaPlayer { - id: player - videoCodecPriority: ["CUDA", "D3D11", "DXVA", "VAAPI", "FFmpeg"] - autoPlay: true - loops: MediaPlayer.Infinite - volume: 0 - onSeekFinished: { - busyIndicator.visible = false - pause() - print(player.metaData.videoFrameRate) - } - } RectangularGlow { id: effect2 @@ -291,15 +216,7 @@ Item { target: createImport opacity: 1 } - PropertyChanges { - target: videoOut - opacity: 1 - } - PropertyChanges { - target: effect - opacity: .4 - color: "black" - } + PropertyChanges { target: contentWrapper opacity: 1 diff --git a/ScreenPlay/qml/Create/CreateNew.qml b/ScreenPlay/qml/Create/CreateNew.qml index ad001cd5..24b7ddac 100644 --- a/ScreenPlay/qml/Create/CreateNew.qml +++ b/ScreenPlay/qml/Create/CreateNew.qml @@ -5,16 +5,11 @@ import QtQuick.Controls.Material 2.2 import Qt.labs.platform 1.0 import QtQuick.Layouts 1.3 -import "../Wizard" Item { id: createNew anchors.fill: parent state: "out" - property string project - property string icon - property string projectTitle - Component.onCompleted: createNew.state = "in" RectangularGlow { id: effect @@ -47,38 +42,6 @@ Item { radius: 4 height: 560 - SwipeView { - id: view - clip: true - currentIndex: 0 - anchors.fill: parent - anchors.margins: 40 - - Rectangle { - id: firstPage - color: "orange" - } - Rectangle { - id: secondPage - color: "grey" - } - Rectangle { - id: thirdPage - color: "steelblue" - } - } - - PageIndicator { - id: indicator - - count: view.count - currentIndex: view.currentIndex - - anchors.bottom: parent.bottom - anchors.bottomMargin: 20 - anchors.horizontalCenter: parent.horizontalCenter - } - MouseArea { anchors { top: parent.top diff --git a/ScreenPlay/qml/Create/CreateWallpaper.qml b/ScreenPlay/qml/Create/CreateWallpaper.qml index e61f7ec8..807b7139 100644 --- a/ScreenPlay/qml/Create/CreateWallpaper.qml +++ b/ScreenPlay/qml/Create/CreateWallpaper.qml @@ -8,7 +8,6 @@ Item { id: createWallpaper state: "in" - //Component.onCompleted: state = "in" signal videoFileSelected(var videoFile) signal projectFileSelected(var projectFile) diff --git a/ScreenPlay/qml/Create/Wizards/CreateWallpaper/Page_0.qml b/ScreenPlay/qml/Create/Wizards/CreateWallpaper/Page_0.qml index 6a4f2c74..e7dfab47 100644 --- a/ScreenPlay/qml/Create/Wizards/CreateWallpaper/Page_0.qml +++ b/ScreenPlay/qml/Create/Wizards/CreateWallpaper/Page_0.qml @@ -6,8 +6,6 @@ Rectangle { id: root property bool allNecessaryConfigsSet: false - - Rectangle { id: rectangle1 width: parent.width * .5 diff --git a/ScreenPlay/qml/Installed/Installed.qml b/ScreenPlay/qml/Installed/Installed.qml index 186120ac..32df607f 100644 --- a/ScreenPlay/qml/Installed/Installed.qml +++ b/ScreenPlay/qml/Installed/Installed.qml @@ -3,6 +3,7 @@ import QtQml.Models 2.2 import QtQuick.Controls 2.3 import QtQuick.Controls.Styles 1.4 import QtGraphicalEffects 1.0 +import analytics 0.1 Item { id: pageInstalled @@ -116,6 +117,7 @@ Item { //Pull to refresh if (contentY <= -180 && !refresh && !isDragging) { + tracker.sendEvent("ui_event", "pulltorefresh", "refresh") installedListModel.reset() installedListModel.loadScreens() } @@ -146,6 +148,13 @@ Item { snapMode: ScrollBar.SnapOnRelease } } + + Tracker { + id: tracker + trackingID: "UA-43193236-3" + sendInterval: 1000 + } + function onPageChanged(name) { setSidebarActive(false) if (name === "All") { diff --git a/ScreenPlay/qml/Installed/Sidebar.qml b/ScreenPlay/qml/Installed/Sidebar.qml index 9e51907d..ee1455fe 100644 --- a/ScreenPlay/qml/Installed/Sidebar.qml +++ b/ScreenPlay/qml/Installed/Sidebar.qml @@ -347,9 +347,6 @@ Item { } onClicked: { - print(type + " "+activeScreen + " " + installedListModel.absoluteStoragePath+ "/" + activeScreen, - installedListModel.get( - activeScreen).screenPreview) if (type === "video" || type === "qmlScene" || type === "html") { screenPlay.createWallpaper( monitorSelection.activeMonitorIndex, installedListModel.absoluteStoragePath + "/" + activeScreen, diff --git a/ScreenPlay/src/projectsettingslistmodel.cpp b/ScreenPlay/src/projectsettingslistmodel.cpp index 3513ae2e..308b41cb 100644 --- a/ScreenPlay/src/projectsettingslistmodel.cpp +++ b/ScreenPlay/src/projectsettingslistmodel.cpp @@ -54,7 +54,6 @@ QHash ProjectSettingsListModel::roleNames() const void ProjectSettingsListModel::init(QString file) { - qDebug() << "ProjectSettingsListModel loading: " << file; QFile configTmp; configTmp.setFileName(file); QJsonDocument configJsonDocument; @@ -76,7 +75,6 @@ void ProjectSettingsListModel::init(QString file) if (obj.contains("properties")) { tmpParent = obj.value("properties").toObject(); } else { - qWarning("Could not find settings"); return; } diff --git a/ScreenPlay/src/screenplay.cpp b/ScreenPlay/src/screenplay.cpp index 5ca3422b..c028afbd 100644 --- a/ScreenPlay/src/screenplay.cpp +++ b/ScreenPlay/src/screenplay.cpp @@ -19,7 +19,7 @@ void ScreenPlay::createWallpaper(int monitorIndex, QUrl absoluteStoragePath, QSt } // Remove previous wallpaper - removeWallpaperAt(monitorIndex); + //removeWallpaperAt(monitorIndex); m_settings->increaseActiveWallpaperCounter(); QVector tmpMonitorIndex; @@ -51,10 +51,10 @@ void ScreenPlay::removeAllWallpaper() void ScreenPlay::requestProjectSettingsListModelAt(int index) { + Q_ASSERT(index < m_screenPlayWallpaperList.size()); for (int i = 0; i < m_screenPlayWallpaperList.count(); ++i) { if (m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0) == index) { - emit projectSettingsListModelFound(m_screenPlayWallpaperList.at(i).data()->projectSettingsListModel().data(), - m_screenPlayWallpaperList.at(i).get()->type()); + emit projectSettingsListModelFound(m_screenPlayWallpaperList.at(i).data()->projectSettingsListModel().data(), m_screenPlayWallpaperList.at(i).data()->type()); return; } } @@ -77,7 +77,7 @@ QString ScreenPlay::generateID() void ScreenPlay::setWallpaperValue(int at, QString key, QString value) { - + Q_ASSERT(at < m_screenPlayWallpaperList.size()); for (int i = 0; i < m_screenPlayWallpaperList.count(); ++i) { if (m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0) == at) { m_sdkc->setWallpaperValue(m_screenPlayWallpaperList.at(i).data()->appID(), key, value); @@ -95,12 +95,16 @@ void ScreenPlay::setAllWallpaperValue(QString key, QString value) void ScreenPlay::removeWallpaperAt(int at) { + Q_ASSERT(at < m_screenPlayWallpaperList.size()); + // if(m_screenPlayWallpaperList.isEmpty()) + // return; + for (int i = 0; i < m_screenPlayWallpaperList.length(); ++i) { if (m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0) == at) { qDebug() << i << m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0); m_sdkc->closeWallpapersAt(at); - //m_screenPlayWallpaperList.removeAt(i); + m_screenPlayWallpaperList.removeAt(i); } } } diff --git a/WinDeploy.sh b/WinDeploy.sh index 2c974745..2e7b9be9 100644 --- a/WinDeploy.sh +++ b/WinDeploy.sh @@ -2,7 +2,7 @@ QtPath='C:/Qt/5.11.1/msvc2017_64/bin' QtCreatorPath='C:\Qt\Tools\QtCreator\bin' -ReleasePath='C:/Users/Eli/Code/Qt/build-ScreenPlay-Desktop_Qt_5_11_1_MSVC2017_64bit-Release/ScreenPlay/release/' +ReleasePath='C:\Users\Eli\Code\Qt\build-ScreenPlay-Desktop_Qt_5_11_1_MSVC2017_64bit-Release/ScreenPlay/release/' DeployPath='C:/Users/Eli/Code/Qt/ScreenPlay-Deploy/' SourcePath=$PWD SteamSDK='ScreenPlay/ThirdParty/steam/redistributable_bin/win64/'