mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01:00
WIP on es/feature/create: 9863d62
Better output when disconnection
This commit is contained in:
commit
ccc1be415c
@ -21,21 +21,24 @@ ApplicationWindow {
|
||||
|
||||
Tracker {
|
||||
id: tracker
|
||||
Component.onCompleted: tracker.sendScreenView("Main Screen")
|
||||
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"
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -8,7 +8,6 @@ Item {
|
||||
id: createWallpaper
|
||||
state: "in"
|
||||
|
||||
//Component.onCompleted: state = "in"
|
||||
signal videoFileSelected(var videoFile)
|
||||
signal projectFileSelected(var projectFile)
|
||||
|
||||
|
@ -6,8 +6,6 @@ Rectangle {
|
||||
id: root
|
||||
property bool allNecessaryConfigsSet: false
|
||||
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: rectangle1
|
||||
width: parent.width * .5
|
||||
|
@ -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") {
|
||||
|
@ -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,
|
||||
|
@ -54,7 +54,6 @@ QHash<int, QByteArray> 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;
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ void ScreenPlay::createWallpaper(int monitorIndex, QUrl absoluteStoragePath, QSt
|
||||
}
|
||||
|
||||
// Remove previous wallpaper
|
||||
removeWallpaperAt(monitorIndex);
|
||||
//removeWallpaperAt(monitorIndex);
|
||||
|
||||
m_settings->increaseActiveWallpaperCounter();
|
||||
QVector<int> 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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/'
|
||||
|
Loading…
Reference in New Issue
Block a user