1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-18 16:32:33 +02:00

Add working property transmission!

This commit is contained in:
kelteseth 2018-03-12 15:23:03 +01:00
parent 8b5b16a761
commit 025d6080ab

View File

@ -2,23 +2,35 @@ import QtQuick 2.9
import net.aimber.screenplaysdk 1.0
Rectangle {
id: root
color: "gray"
anchors.fill: parent
property string tmpVideoPath
property var jsonProjectFile
Component.onCompleted: {
// jsonProjectFile = JSON.parse(mainwindow.projectConfig)
// if(jsonProjectFile.type === "qmlScene"){
Component.onCompleted: {
// }
// jsonProjectFile = JSON.parse(mainwindow.projectConfig)
// if(jsonProjectFile.type === "qmlScene"){
// }
}
ScreenPlaySDK {
contentType: "wallpaper"
id: spSDK
contentType: "ScreenPlayWindow"
appID: mainwindow.appID
onIncommingMessageError: {
rctError.opacity = 1
txtDebug.text = "ERROR: " + msg.toString()
}
onIncommingMessage: {
var obj2 = 'import QtQuick 2.9; Item {Component.onCompleted: sceneLoader.item.' + key + ' = ' + value + '; }'
var newObject = Qt.createQmlObject(obj2.toString(), root, "err")
newObject.destroy(10000)
}
onSdkConnected: {
@ -32,9 +44,9 @@ Rectangle {
}
}
Connections {
target: mainwindow
onPlayVideo: {
screenVideo.videoPath = path
//screenVideoLoader.setSource("qrc:/ScreenVideo.qml", {videoPath: path})
@ -45,20 +57,31 @@ Rectangle {
sceneLoader.setSource(tmp)
mainwindow.init()
}
}
ScreenVideo {
id:screenVideo
id: screenVideo
}
// Loader {
// id:screenVideoLoader
// anchors.fill: parent
// }
// Loader {
// id:screenVideoLoader
// anchors.fill: parent
// }
Loader {
id:sceneLoader
id: sceneLoader
anchors.fill: parent
z:11
}
Rectangle {
id: rctError
opacity: 0
height: 300
width: 600
anchors.centerIn: parent
Text {
id: txtDebug
font.pixelSize: 32
anchors.centerIn: parent
}
}
}