mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-09-18 16:32:33 +02:00
WIP on es/feature/create: 9863d62
Better output when disconnection
This commit is contained in:
commit
ccc1be415c
@ -20,22 +20,25 @@ ApplicationWindow {
|
|||||||
minimumWidth: 1050
|
minimumWidth: 1050
|
||||||
|
|
||||||
Tracker {
|
Tracker {
|
||||||
id: tracker
|
id: tracker
|
||||||
Component.onCompleted: tracker.sendScreenView("Main Screen")
|
Component.onCompleted: tracker.sendScreenView("Installed")
|
||||||
trackingID: "UA-43193236-3"
|
trackingID: "UA-43193236-3"
|
||||||
|
sendInterval: 100
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
|
tracker.startSession()
|
||||||
if (!screenPlaySettings.autostart) {
|
if (!screenPlaySettings.autostart) {
|
||||||
show()
|
show()
|
||||||
}
|
}
|
||||||
steamWorkshop.initSteam()
|
steamWorkshop.initSteam()
|
||||||
}
|
}
|
||||||
|
Component.onDestruction: {
|
||||||
|
tracker.endSession()
|
||||||
|
}
|
||||||
|
|
||||||
function switchPage(name) {
|
function switchPage(name) {
|
||||||
|
tracker.sendScreenView(name)
|
||||||
if (name === "Create") {
|
if (name === "Create") {
|
||||||
pageLoader.visible = false
|
pageLoader.visible = false
|
||||||
pageLoaderCreate.setSource("qrc:/qml/Create/Create.qml")
|
pageLoaderCreate.setSource("qrc:/qml/Create/Create.qml")
|
||||||
@ -54,6 +57,7 @@ ApplicationWindow {
|
|||||||
pageLoaderWorkshop.visible = false
|
pageLoaderWorkshop.visible = false
|
||||||
pageLoader.setSource("qrc:/qml/" + name + "/" + name + ".qml")
|
pageLoader.setSource("qrc:/qml/" + name + "/" + name + ".qml")
|
||||||
sidebar.state = "inactive"
|
sidebar.state = "inactive"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtAV 1.07
|
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import Qt.labs.platform 1.0
|
import Qt.labs.platform 1.0
|
||||||
@ -13,17 +13,7 @@ Item {
|
|||||||
property bool isVideoPlaying: true
|
property bool isVideoPlaying: true
|
||||||
property url file
|
property url file
|
||||||
onFileChanged: {
|
onFileChanged: {
|
||||||
timerSource.start()
|
|
||||||
}
|
|
||||||
|
|
||||||
Timer {
|
|
||||||
id: timerSource
|
|
||||||
interval: 1000
|
|
||||||
onTriggered: {
|
|
||||||
//var tmp = Qt.resolvedUrl(file).toString()
|
|
||||||
player.source = Qt.resolvedUrl(file)
|
|
||||||
player.play()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RectangularGlow {
|
RectangularGlow {
|
||||||
@ -57,73 +47,8 @@ Item {
|
|||||||
topMargin: 180
|
topMargin: 180
|
||||||
horizontalCenter: parent.horizontalCenter
|
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 {
|
RectangularGlow {
|
||||||
id: effect2
|
id: effect2
|
||||||
@ -291,15 +216,7 @@ Item {
|
|||||||
target: createImport
|
target: createImport
|
||||||
opacity: 1
|
opacity: 1
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
|
||||||
target: videoOut
|
|
||||||
opacity: 1
|
|
||||||
}
|
|
||||||
PropertyChanges {
|
|
||||||
target: effect
|
|
||||||
opacity: .4
|
|
||||||
color: "black"
|
|
||||||
}
|
|
||||||
PropertyChanges {
|
PropertyChanges {
|
||||||
target: contentWrapper
|
target: contentWrapper
|
||||||
opacity: 1
|
opacity: 1
|
||||||
|
@ -5,16 +5,11 @@ import QtQuick.Controls.Material 2.2
|
|||||||
import Qt.labs.platform 1.0
|
import Qt.labs.platform 1.0
|
||||||
import QtQuick.Layouts 1.3
|
import QtQuick.Layouts 1.3
|
||||||
|
|
||||||
import "../Wizard"
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: createNew
|
id: createNew
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
state: "out"
|
state: "out"
|
||||||
property string project
|
|
||||||
property string icon
|
|
||||||
property string projectTitle
|
|
||||||
Component.onCompleted: createNew.state = "in"
|
|
||||||
|
|
||||||
RectangularGlow {
|
RectangularGlow {
|
||||||
id: effect
|
id: effect
|
||||||
@ -47,38 +42,6 @@ Item {
|
|||||||
radius: 4
|
radius: 4
|
||||||
height: 560
|
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 {
|
MouseArea {
|
||||||
anchors {
|
anchors {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
|
@ -8,7 +8,6 @@ Item {
|
|||||||
id: createWallpaper
|
id: createWallpaper
|
||||||
state: "in"
|
state: "in"
|
||||||
|
|
||||||
//Component.onCompleted: state = "in"
|
|
||||||
signal videoFileSelected(var videoFile)
|
signal videoFileSelected(var videoFile)
|
||||||
signal projectFileSelected(var projectFile)
|
signal projectFileSelected(var projectFile)
|
||||||
|
|
||||||
|
@ -6,8 +6,6 @@ Rectangle {
|
|||||||
id: root
|
id: root
|
||||||
property bool allNecessaryConfigsSet: false
|
property bool allNecessaryConfigsSet: false
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: rectangle1
|
id: rectangle1
|
||||||
width: parent.width * .5
|
width: parent.width * .5
|
||||||
|
@ -3,6 +3,7 @@ import QtQml.Models 2.2
|
|||||||
import QtQuick.Controls 2.3
|
import QtQuick.Controls 2.3
|
||||||
import QtQuick.Controls.Styles 1.4
|
import QtQuick.Controls.Styles 1.4
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
|
import analytics 0.1
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
id: pageInstalled
|
id: pageInstalled
|
||||||
@ -116,6 +117,7 @@ Item {
|
|||||||
|
|
||||||
//Pull to refresh
|
//Pull to refresh
|
||||||
if (contentY <= -180 && !refresh && !isDragging) {
|
if (contentY <= -180 && !refresh && !isDragging) {
|
||||||
|
tracker.sendEvent("ui_event", "pulltorefresh", "refresh")
|
||||||
installedListModel.reset()
|
installedListModel.reset()
|
||||||
installedListModel.loadScreens()
|
installedListModel.loadScreens()
|
||||||
}
|
}
|
||||||
@ -146,6 +148,13 @@ Item {
|
|||||||
snapMode: ScrollBar.SnapOnRelease
|
snapMode: ScrollBar.SnapOnRelease
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Tracker {
|
||||||
|
id: tracker
|
||||||
|
trackingID: "UA-43193236-3"
|
||||||
|
sendInterval: 1000
|
||||||
|
}
|
||||||
|
|
||||||
function onPageChanged(name) {
|
function onPageChanged(name) {
|
||||||
setSidebarActive(false)
|
setSidebarActive(false)
|
||||||
if (name === "All") {
|
if (name === "All") {
|
||||||
|
@ -347,9 +347,6 @@ Item {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
print(type + " "+activeScreen + " " + installedListModel.absoluteStoragePath+ "/" + activeScreen,
|
|
||||||
installedListModel.get(
|
|
||||||
activeScreen).screenPreview)
|
|
||||||
if (type === "video" || type === "qmlScene" || type === "html") {
|
if (type === "video" || type === "qmlScene" || type === "html") {
|
||||||
screenPlay.createWallpaper(
|
screenPlay.createWallpaper(
|
||||||
monitorSelection.activeMonitorIndex, installedListModel.absoluteStoragePath + "/" + activeScreen,
|
monitorSelection.activeMonitorIndex, installedListModel.absoluteStoragePath + "/" + activeScreen,
|
||||||
|
@ -54,7 +54,6 @@ QHash<int, QByteArray> ProjectSettingsListModel::roleNames() const
|
|||||||
|
|
||||||
void ProjectSettingsListModel::init(QString file)
|
void ProjectSettingsListModel::init(QString file)
|
||||||
{
|
{
|
||||||
qDebug() << "ProjectSettingsListModel loading: " << file;
|
|
||||||
QFile configTmp;
|
QFile configTmp;
|
||||||
configTmp.setFileName(file);
|
configTmp.setFileName(file);
|
||||||
QJsonDocument configJsonDocument;
|
QJsonDocument configJsonDocument;
|
||||||
@ -76,7 +75,6 @@ void ProjectSettingsListModel::init(QString file)
|
|||||||
if (obj.contains("properties")) {
|
if (obj.contains("properties")) {
|
||||||
tmpParent = obj.value("properties").toObject();
|
tmpParent = obj.value("properties").toObject();
|
||||||
} else {
|
} else {
|
||||||
qWarning("Could not find settings");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ void ScreenPlay::createWallpaper(int monitorIndex, QUrl absoluteStoragePath, QSt
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Remove previous wallpaper
|
// Remove previous wallpaper
|
||||||
removeWallpaperAt(monitorIndex);
|
//removeWallpaperAt(monitorIndex);
|
||||||
|
|
||||||
m_settings->increaseActiveWallpaperCounter();
|
m_settings->increaseActiveWallpaperCounter();
|
||||||
QVector<int> tmpMonitorIndex;
|
QVector<int> tmpMonitorIndex;
|
||||||
@ -51,10 +51,10 @@ void ScreenPlay::removeAllWallpaper()
|
|||||||
|
|
||||||
void ScreenPlay::requestProjectSettingsListModelAt(int index)
|
void ScreenPlay::requestProjectSettingsListModelAt(int index)
|
||||||
{
|
{
|
||||||
|
Q_ASSERT(index < m_screenPlayWallpaperList.size());
|
||||||
for (int i = 0; i < m_screenPlayWallpaperList.count(); ++i) {
|
for (int i = 0; i < m_screenPlayWallpaperList.count(); ++i) {
|
||||||
if (m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0) == index) {
|
if (m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0) == index) {
|
||||||
emit projectSettingsListModelFound(m_screenPlayWallpaperList.at(i).data()->projectSettingsListModel().data(),
|
emit projectSettingsListModelFound(m_screenPlayWallpaperList.at(i).data()->projectSettingsListModel().data(), m_screenPlayWallpaperList.at(i).data()->type());
|
||||||
m_screenPlayWallpaperList.at(i).get()->type());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -77,7 +77,7 @@ QString ScreenPlay::generateID()
|
|||||||
|
|
||||||
void ScreenPlay::setWallpaperValue(int at, QString key, QString value)
|
void ScreenPlay::setWallpaperValue(int at, QString key, QString value)
|
||||||
{
|
{
|
||||||
|
Q_ASSERT(at < m_screenPlayWallpaperList.size());
|
||||||
for (int i = 0; i < m_screenPlayWallpaperList.count(); ++i) {
|
for (int i = 0; i < m_screenPlayWallpaperList.count(); ++i) {
|
||||||
if (m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0) == at) {
|
if (m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0) == at) {
|
||||||
m_sdkc->setWallpaperValue(m_screenPlayWallpaperList.at(i).data()->appID(), key, value);
|
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)
|
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) {
|
for (int i = 0; i < m_screenPlayWallpaperList.length(); ++i) {
|
||||||
|
|
||||||
if (m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0) == at) {
|
if (m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0) == at) {
|
||||||
qDebug() << i << m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0);
|
qDebug() << i << m_screenPlayWallpaperList.at(i).data()->screenNumber().at(0);
|
||||||
m_sdkc->closeWallpapersAt(at);
|
m_sdkc->closeWallpapersAt(at);
|
||||||
//m_screenPlayWallpaperList.removeAt(i);
|
m_screenPlayWallpaperList.removeAt(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
QtPath='C:/Qt/5.11.1/msvc2017_64/bin'
|
QtPath='C:/Qt/5.11.1/msvc2017_64/bin'
|
||||||
QtCreatorPath='C:\Qt\Tools\QtCreator\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/'
|
DeployPath='C:/Users/Eli/Code/Qt/ScreenPlay-Deploy/'
|
||||||
SourcePath=$PWD
|
SourcePath=$PWD
|
||||||
SteamSDK='ScreenPlay/ThirdParty/steam/redistributable_bin/win64/'
|
SteamSDK='ScreenPlay/ThirdParty/steam/redistributable_bin/win64/'
|
||||||
|
Loading…
Reference in New Issue
Block a user