1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00
ScreenPlay/ScreenPlayWidget/main.qml

66 lines
1.4 KiB
QML
Raw Normal View History

2018-03-08 22:03:05 +01:00
import QtQuick 2.9
import net.aimber.screenplaysdk 1.0
2018-04-18 18:39:25 +02:00
import QtQuick.Controls 2.3
2018-03-08 22:03:05 +01:00
Item {
2018-03-08 22:03:05 +01:00
id: mainWindow
visible: true
anchors.fill: parent
Rectangle {
2018-11-24 14:28:02 +01:00
id: bgColor
anchors.fill: parent
color: "white"
//color: "#1A1F22"
opacity: .15
}
Image {
id: bg
source: "qrc:/assets/image/noisy-texture-3.png"
anchors.fill: parent
opacity: .05
fillMode: Image.Tile
}
MouseArea {
id: mouseArea
anchors.fill: parent
onPressed: {
backend.setClickPos(Qt.point(mouse.x, mouse.y))
}
onPositionChanged: {
backend.setPos(mouse.x, mouse.y)
}
2018-03-21 18:56:58 +01:00
}
Connections {
2018-03-23 14:49:52 +01:00
target: backend
2018-03-21 18:56:58 +01:00
onSetWidgetSource: {
loader.source = Qt.resolvedUrl("file:///" + source)
print(loader.source)
}
2018-11-24 14:28:02 +01:00
onQmlSceneValueReceived: {
var obj2 = 'import QtQuick 2.9; Item {Component.onCompleted: loader.item.'
+ key + ' = ' + value + '; }'
var newObject = Qt.createQmlObject(obj2.toString(), root, "err")
newObject.destroy(10000)
}
2018-03-21 18:56:58 +01:00
}
2018-03-08 22:03:05 +01:00
Loader {
2018-03-21 18:56:58 +01:00
id: loader
2018-03-08 22:03:05 +01:00
anchors.fill: parent
asynchronous: true
2018-03-23 14:49:52 +01:00
onStatusChanged: {
if (loader.status === Loader.Ready) {
}
}
}
2018-03-08 22:03:05 +01:00
}