2017-07-12 21:48:46 +02:00
|
|
|
import QtQuick 2.7
|
|
|
|
import QtQuick.Controls 2.2
|
2017-07-13 15:34:35 +02:00
|
|
|
import QtQuick.Dialogs 1.2
|
2017-07-14 13:34:55 +02:00
|
|
|
import Qt.labs.platform 1.0
|
2017-10-04 22:03:45 +02:00
|
|
|
|
2017-07-13 10:49:12 +02:00
|
|
|
CustomPage {
|
2017-07-12 21:48:46 +02:00
|
|
|
id: page
|
2017-07-13 10:49:12 +02:00
|
|
|
pageName: ""
|
2017-07-12 21:48:46 +02:00
|
|
|
|
2017-07-13 15:34:35 +02:00
|
|
|
Connections {
|
|
|
|
target: steamWorkshop
|
|
|
|
onWorkshopItemCreated: {
|
|
|
|
if (userNeedsToAcceptWorkshopLegalAgreement) {
|
|
|
|
checkDelegate.opacity = 1
|
|
|
|
} else {
|
|
|
|
checkDelegate.opacity = 0
|
2017-10-05 10:32:17 +02:00
|
|
|
checkDelegate.checkable = false
|
|
|
|
checkDelegate.enabled = false
|
2017-07-13 15:34:35 +02:00
|
|
|
busyIndicator.running = false
|
|
|
|
}
|
2017-07-12 21:48:46 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-14 19:30:06 +02:00
|
|
|
Connections {
|
|
|
|
target: leftArea
|
|
|
|
onHasEmptyField:{
|
|
|
|
if(fieldNumber === 0){
|
|
|
|
fileDropperVideo.state = "error"
|
|
|
|
} else if (fieldNumber === 1) {
|
|
|
|
fileDropperPreview.state = "error"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-05 10:32:17 +02:00
|
|
|
FontLoader {
|
|
|
|
id: font_Roboto_Regular
|
|
|
|
source: "qrc:/assets/fonts/Roboto-Regular.ttf"
|
|
|
|
}
|
|
|
|
FontLoader {
|
|
|
|
id: font_LibreBaskerville
|
|
|
|
source: "qrc:/assets/fonts/LibreBaskerville-Italic.ttf"
|
|
|
|
}
|
|
|
|
|
2017-10-14 10:42:07 +02:00
|
|
|
CreateLeftArea {
|
2017-10-05 10:32:17 +02:00
|
|
|
id: leftArea
|
2017-10-16 18:03:06 +02:00
|
|
|
width: parent.width * .35
|
|
|
|
radius: 4
|
|
|
|
border.width: 2
|
|
|
|
border.color: "#c2c2c2"
|
|
|
|
anchors.leftMargin: 30
|
|
|
|
anchors.topMargin: 30
|
2017-10-04 22:03:45 +02:00
|
|
|
anchors {
|
|
|
|
top: parent.top
|
|
|
|
left: parent.left
|
2017-10-14 10:42:07 +02:00
|
|
|
margins: 10
|
2017-10-04 22:03:45 +02:00
|
|
|
}
|
2017-10-14 19:30:06 +02:00
|
|
|
|
2017-10-04 22:03:45 +02:00
|
|
|
}
|
2017-10-05 10:32:17 +02:00
|
|
|
|
2017-10-04 22:03:45 +02:00
|
|
|
Item {
|
2017-10-05 10:32:17 +02:00
|
|
|
id: rightArea
|
2017-10-16 18:03:06 +02:00
|
|
|
width: parent.width * .58
|
2017-10-04 22:03:45 +02:00
|
|
|
anchors {
|
|
|
|
top: parent.top
|
|
|
|
right: parent.right
|
|
|
|
bottom: parent.bottom
|
|
|
|
margins: 30
|
2017-07-13 15:34:35 +02:00
|
|
|
}
|
2017-10-05 10:32:17 +02:00
|
|
|
Item {
|
2017-10-04 22:03:45 +02:00
|
|
|
id: rightTop
|
2017-10-16 18:03:06 +02:00
|
|
|
height: 200
|
2017-10-04 22:03:45 +02:00
|
|
|
anchors {
|
|
|
|
top: parent.top
|
|
|
|
right: parent.right
|
|
|
|
left: parent.left
|
|
|
|
}
|
2017-10-05 10:32:17 +02:00
|
|
|
Item {
|
2017-10-16 18:03:06 +02:00
|
|
|
width: parent.width * .48
|
2017-10-04 22:03:45 +02:00
|
|
|
height: parent.height
|
2017-10-05 10:32:17 +02:00
|
|
|
FileDropperSingleFile {
|
2017-10-14 19:30:06 +02:00
|
|
|
id:fileDropperVideo
|
2017-10-05 10:32:17 +02:00
|
|
|
anchors.fill: parent
|
2017-10-14 10:42:07 +02:00
|
|
|
z: 99
|
|
|
|
descriptionTitle: "Drop your video here"
|
2017-10-16 19:08:18 +02:00
|
|
|
helpText: "Supportet Video formats: mp4 for older devices and VP9 for newer like NVidia 1000 or AMD VEGA"
|
2017-10-05 11:17:23 +02:00
|
|
|
isVideo: true
|
2017-10-05 10:32:17 +02:00
|
|
|
imagePath: "qrc:/assets/icons/icon_tv.svg"
|
2017-10-14 19:30:06 +02:00
|
|
|
onExternalFilePathChanged: leftArea.videoPath = fileDropperVideo.externalFilePath
|
2017-10-05 10:32:17 +02:00
|
|
|
}
|
2017-10-04 22:03:45 +02:00
|
|
|
}
|
2017-10-05 10:32:17 +02:00
|
|
|
Item {
|
2017-10-16 18:03:06 +02:00
|
|
|
width: parent.width * .48
|
2017-10-05 10:32:17 +02:00
|
|
|
anchors.right: parent.right
|
2017-07-13 15:34:35 +02:00
|
|
|
height: parent.height
|
|
|
|
|
2017-10-05 10:32:17 +02:00
|
|
|
FileDropperSingleFile {
|
2017-10-14 19:30:06 +02:00
|
|
|
id:fileDropperPreview
|
2017-10-05 10:32:17 +02:00
|
|
|
anchors.fill: parent
|
2017-10-14 10:42:07 +02:00
|
|
|
z: 99
|
2017-10-05 10:32:17 +02:00
|
|
|
descriptionTitle: "Set Preview Image"
|
2017-10-16 19:08:18 +02:00
|
|
|
helpText: "Use PNG for best results. The image ratio should be 21:9. Preffered resulution 123x123."
|
2017-10-05 10:32:17 +02:00
|
|
|
imagePath: "qrc:/assets/icons/icon_single_image.svg"
|
2017-10-14 19:30:06 +02:00
|
|
|
onExternalFilePathChanged: leftArea.previewPath = fileDropperPreview.externalFilePath
|
2017-07-13 15:34:35 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-10-05 11:17:23 +02:00
|
|
|
Item {
|
2017-10-05 10:32:17 +02:00
|
|
|
id: rightBottom
|
|
|
|
height: 300
|
|
|
|
anchors {
|
|
|
|
top: rightTop.bottom
|
|
|
|
topMargin: 30
|
|
|
|
right: parent.right
|
|
|
|
left: parent.left
|
2017-07-14 13:34:55 +02:00
|
|
|
}
|
2017-10-05 11:17:23 +02:00
|
|
|
FileDropperSingleFile {
|
|
|
|
anchors.fill: parent
|
2017-10-14 10:42:07 +02:00
|
|
|
z: 99
|
2017-10-05 11:17:23 +02:00
|
|
|
descriptionTitle: "Add additional images"
|
|
|
|
imagePath: "qrc:/assets/icons/icon_multiple_images.svg"
|
2017-10-14 19:30:06 +02:00
|
|
|
|
2017-07-14 13:34:55 +02:00
|
|
|
}
|
|
|
|
}
|
2017-10-05 10:32:17 +02:00
|
|
|
}
|
2017-07-14 13:34:55 +02:00
|
|
|
|
2017-10-05 10:32:17 +02:00
|
|
|
Timer {
|
|
|
|
id: tiItemUpdate
|
2017-10-14 10:42:07 +02:00
|
|
|
interval: 100
|
2017-10-05 10:32:17 +02:00
|
|
|
running: false
|
|
|
|
repeat: true
|
|
|
|
onTriggered: {
|
|
|
|
print(steamWorkshop.getItemUpdateProcess())
|
2017-07-13 15:34:35 +02:00
|
|
|
}
|
2017-07-14 13:34:55 +02:00
|
|
|
}
|
2017-07-12 21:48:46 +02:00
|
|
|
}
|
2017-10-16 18:03:06 +02:00
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: rectangle
|
|
|
|
color: "#e6ffffff"
|
|
|
|
enabled: false
|
|
|
|
opacity: 0
|
|
|
|
anchors.fill: parent
|
|
|
|
}
|
|
|
|
states: [
|
|
|
|
State {
|
|
|
|
name: "createLocalWallpaper"
|
|
|
|
|
|
|
|
PropertyChanges {
|
|
|
|
target: rectangle
|
|
|
|
enabled: true
|
|
|
|
opacity: 1
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
transitions: [
|
|
|
|
Transition {
|
|
|
|
from: "*"
|
|
|
|
to: "*"
|
|
|
|
PropertyAnimation{
|
|
|
|
properties: "opacity"; easing.type: Easing.InOutQuad
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2017-07-06 14:00:43 +02:00
|
|
|
}
|