mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-26 12:42:34 +01:00
Add some of the new ui design for workshop item creation
This commit is contained in:
parent
5c384174a0
commit
d33eb5934f
@ -3,12 +3,11 @@ import QtQuick.Controls 2.2
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Controls.Material 2.2
|
||||
import Qt.labs.platform 1.0
|
||||
|
||||
CustomPage {
|
||||
id: page
|
||||
pageName: ""
|
||||
|
||||
|
||||
|
||||
Connections {
|
||||
target: steamWorkshop
|
||||
onWorkshopItemCreated: {
|
||||
@ -21,107 +20,139 @@ CustomPage {
|
||||
page.state = "StartItemUpdate"
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
CheckDelegate {
|
||||
id: checkDelegate
|
||||
x: 35
|
||||
y: 398
|
||||
opacity: 0
|
||||
text: qsTr("By submitting this item, you agree to the workshop terms of service")
|
||||
onCheckedChanged: Qt.openUrlExternally( "http://steamcommunity.com/sharedfiles/workshoplegalagreement")
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnCreateWallpaper
|
||||
text: qsTr("Create New Wallpaper")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onClicked: {
|
||||
steamWorkshop.createWorkshopItem()
|
||||
busyIndicator.running = true
|
||||
Item {
|
||||
id: left
|
||||
width: parent.width * .5
|
||||
anchors {
|
||||
top: parent.top
|
||||
bottom: parent.bottom
|
||||
left: parent.left
|
||||
}
|
||||
}
|
||||
|
||||
BusyIndicator {
|
||||
id: busyIndicator
|
||||
anchors.bottom: btnCreateWallpaper.bottom
|
||||
anchors.bottomMargin: 80
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
running: false
|
||||
Material.accent: Material.Orange
|
||||
}
|
||||
|
||||
Column {
|
||||
id: column
|
||||
anchors.fill: parent
|
||||
anchors.margins: 30
|
||||
|
||||
Row {
|
||||
id: row
|
||||
width: parent.width
|
||||
height: 60
|
||||
Column {
|
||||
id: column
|
||||
anchors.fill: parent
|
||||
anchors.margins: 30
|
||||
spacing: 30
|
||||
|
||||
Text {
|
||||
id: txtHeadlineTitle
|
||||
text: qsTr("Title")
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
font.pixelSize: 12
|
||||
height: parent.height
|
||||
}
|
||||
|
||||
TextField {
|
||||
id: txtTitle
|
||||
width: 240
|
||||
width: parent.width
|
||||
height: 60
|
||||
text: qsTr("")
|
||||
height: parent.height
|
||||
placeholderText: "Title"
|
||||
}
|
||||
}
|
||||
|
||||
Row {
|
||||
id: row1
|
||||
width: parent.width
|
||||
height: 120
|
||||
Text {
|
||||
id: txtDescriptionHeadline
|
||||
height: parent.height
|
||||
text: qsTr("Description")
|
||||
font.pixelSize: 12
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
TextArea {
|
||||
TextField {
|
||||
id: txtDescription
|
||||
height: 120
|
||||
width: parent.width
|
||||
height: 60
|
||||
text: qsTr("")
|
||||
wrapMode: Text.WrapAnywhere
|
||||
width: parent.width - txtDescriptionHeadline.width - 30
|
||||
|
||||
placeholderText: "Description"
|
||||
}
|
||||
spacing: 30
|
||||
TextField {
|
||||
id: txtTags
|
||||
width: parent.width
|
||||
height: 60
|
||||
text: qsTr("")
|
||||
placeholderText: "Tags"
|
||||
}
|
||||
TextField {
|
||||
id: txtYouTube
|
||||
width: parent.width
|
||||
height: 60
|
||||
text: qsTr("")
|
||||
placeholderText: "YouTube Preview"
|
||||
}
|
||||
|
||||
Row {
|
||||
id: rowVisible
|
||||
width: parent.width
|
||||
height: 120
|
||||
Text {
|
||||
id: txtVisibleDescription
|
||||
height: parent.height
|
||||
text: qsTr("Visible")
|
||||
font.pixelSize: 12
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
id: cbVisibility
|
||||
model: ["Public", "Friends only", "Private"]
|
||||
}
|
||||
|
||||
spacing: 30
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnSubmit
|
||||
text: qsTr("Create New Wallpaper")
|
||||
onClicked: {
|
||||
//TODO wait for callback
|
||||
steamWorkshop.createWorkshopItem()
|
||||
|
||||
steamWorkshop.submitWorkshopItem(
|
||||
txtTitle.text.toString(),
|
||||
txtDescription.text.toString(), "english",
|
||||
cbVisibility.currentIndex,
|
||||
fileDialogOpenVideo.currentFile,
|
||||
fileDialogOpenPreview.currentFile)
|
||||
tiItemUpdate.start()
|
||||
}
|
||||
}
|
||||
}
|
||||
CheckDelegate {
|
||||
id: checkDelegate
|
||||
opacity: 0
|
||||
text: qsTr("By submitting this item, you agree to the workshop terms of service")
|
||||
onCheckedChanged: Qt.openUrlExternally(
|
||||
"http://steamcommunity.com/sharedfiles/workshoplegalagreement")
|
||||
}
|
||||
}
|
||||
Item {
|
||||
id: right
|
||||
width: parent.width * .5
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
margins: 30
|
||||
}
|
||||
Row {
|
||||
id: row2
|
||||
width: parent.width
|
||||
height: 120
|
||||
Text {
|
||||
id: txtVisibleDescription
|
||||
height: parent.height
|
||||
text: qsTr("Visible")
|
||||
font.pixelSize: 12
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
id: rightTop
|
||||
height: 200
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
left: parent.left
|
||||
}
|
||||
|
||||
ComboBox {
|
||||
id:cbVisibility
|
||||
model: ["Public", "Friends only", "Private"]
|
||||
}
|
||||
|
||||
spacing: 30
|
||||
Rectangle {
|
||||
color: "orange"
|
||||
width: parent.width * .4
|
||||
height: parent.height
|
||||
}
|
||||
Rectangle {
|
||||
color: "steelblue"
|
||||
width: parent.width * .4
|
||||
height: parent.height
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
id: rightBottom
|
||||
height: 400
|
||||
color: "gray"
|
||||
anchors {
|
||||
top: rightTop.bottom
|
||||
right: parent.right
|
||||
left:parent.left
|
||||
bottom: parent.bottom
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Row {
|
||||
id: row4
|
||||
width: parent.width
|
||||
@ -182,31 +213,14 @@ CustomPage {
|
||||
}
|
||||
|
||||
spacing: 30
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnSubmit
|
||||
text: "Submit"
|
||||
onClicked: {
|
||||
steamWorkshop.submitWorkshopItem(txtTitle.text.toString(),
|
||||
txtDescription.text.toString(),
|
||||
"english",
|
||||
cbVisibility.currentIndex,
|
||||
fileDialogOpenVideo.currentFile,
|
||||
fileDialogOpenPreview.currentFile);
|
||||
tiItemUpdate.start()
|
||||
}
|
||||
}
|
||||
Timer {
|
||||
id: tiItemUpdate
|
||||
interval: 500
|
||||
running: false
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
print(steamWorkshop.getItemUpdateProcess())
|
||||
}
|
||||
}*/
|
||||
Timer {
|
||||
id: tiItemUpdate
|
||||
interval: 500
|
||||
running: false
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
print(steamWorkshop.getItemUpdateProcess())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user