mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-22 18:52:30 +01:00
Add new filedropper
This commit is contained in:
parent
d33eb5934f
commit
105bd76f6d
11
assets/icons/icon_multiple_images.svg
Normal file
11
assets/icons/icon_multiple_images.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 50 44" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
|
||||
<g transform="matrix(1,0,0,1,-3173.52,-3047.83)">
|
||||
<g transform="matrix(0.981266,0,0,0.974923,2039.13,2355.18)">
|
||||
<g id="images" transform="matrix(1.38833,0,0,1.39737,1156.06,710.47)">
|
||||
<path d="M30,0C31.1,0 32,0.9 32,2L32,4L34,4C35.1,4 36,4.9 36,6L36,30C36,31.1 35.1,32 34,32L6,32C4.9,32 4,31.1 4,30L4,28L2,28C0.9,28 0,27.1 0,26L0,2C0,0.9 0.9,0 2,0L30,0ZM33.996,5.999L6.003,5.999C6.001,6 6,6.002 5.999,6.003L5.999,29.996C6,29.998 6.002,29.999 6.003,30L33.996,30C33.998,29.999 33.999,29.997 34,29.996L34,6.003C33.999,6.001 33.997,6 33.996,5.999ZM32,28L8,28L8,24L15,12L23,22L25,22L32,16L32,28ZM29.997,1.999L2.004,1.999C2.002,2 2.001,2.002 2,2.003L2,25.996C2.001,25.998 2.003,25.999 2.004,26L4,26L4,6L4.001,5.999C4.001,4.899 4.901,3.999 6.001,3.999L30.001,3.999L30.001,2.003C30,2.001 29.998,2 29.997,1.999ZM30,11C30,12.657 28.657,14 27,14C25.343,14 24,12.657 24,11C24,9.343 25.343,8 27,8C28.657,8 30,9.343 30,11Z" style="fill:rgb(48,48,48);"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
11
assets/icons/icon_single_image.svg
Normal file
11
assets/icons/icon_single_image.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 32 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
|
||||
<g transform="matrix(1,0,0,1,-3494.33,-2734.78)">
|
||||
<g transform="matrix(1.13181,0,0,1.13181,220.521,1569.53)">
|
||||
<g id="image" transform="matrix(0.883543,0,0,0.883543,2892.55,1027.78)">
|
||||
<path d="M30,2C31.1,2 32,2.9 32,4L32,28C32,29.1 31.1,30 30,30L2,30C0.9,30 0,29.1 0,28L0,4C0,2.9 0.9,2 2,2L30,2ZM29.996,28.001C29.998,28 29.999,27.998 30,27.997L30,4.004C29.999,4.002 29.997,4.001 29.996,4L2.003,4C2.001,4.001 2,4.003 1.999,4.004L1.999,27.997C2,27.999 2.002,28 2.003,28.001L29.996,28.001ZM28,26L4,26L4,22L11,10L19,20L21,20L28,14L28,26ZM26,9C26,10.657 24.657,12 23,12C21.343,12 20,10.657 20,9C20,7.343 21.343,6 23,6C24.657,6 26,7.343 26,9Z" style="fill:rgb(38,38,38);"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
11
assets/icons/icon_tv.svg
Normal file
11
assets/icons/icon_tv.svg
Normal file
@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg width="100%" height="100%" viewBox="0 0 32 33" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:1.41421;">
|
||||
<g transform="matrix(1,0,0,1,-3111.33,-2734.78)">
|
||||
<g transform="matrix(1.13181,0,0,1.13181,-162.479,1569.53)">
|
||||
<g id="tv" transform="matrix(0.883543,0,0,0.883543,2892.55,1029.55)">
|
||||
<path d="M30.662,9.003C27.887,8.604 24.931,8.315 21.847,8.152L27,2.999L25,0.999L17.983,8.016C17.327,8.005 16.666,7.999 16,7.999L8,-0.001L6,1.999L12.069,8.068C8.29,8.201 4.683,8.522 1.338,9.003C0.478,12.369 0,16.089 0,20C0,23.911 0.477,27.63 1.338,30.997C5.827,31.642 10.786,32 16,32C21.214,32 26.173,31.642 30.662,30.997C31.522,27.631 32,23.911 32,20C32,16.089 31.523,12.37 30.662,9.003ZM26.997,27.331C23.63,27.761 19.911,28 16,28C12.089,28 8.37,27.761 5.003,27.331C4.358,25.087 4,22.607 4,20C4,17.393 4.358,14.913 5.003,12.669C8.369,12.239 12.089,12 16,12C19.911,12 23.63,12.239 26.996,12.669C27.641,14.913 28,17.393 28,20C28,22.607 27.642,25.087 26.997,27.331L26.997,27.331Z" style="fill:rgb(38,38,38);fill-rule:nonzero;"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
4
qml.qrc
4
qml.qrc
@ -42,5 +42,9 @@
|
||||
<file>qml/Components/MonitorSelection.qml</file>
|
||||
<file>qml/Components/CustomPage.qml</file>
|
||||
<file>qml/Components/MonitorSelectionItem.qml</file>
|
||||
<file>qml/Components/FileDropperSingleFile.qml</file>
|
||||
<file>assets/icons/icon_multiple_images.svg</file>
|
||||
<file>assets/icons/icon_single_image.svg</file>
|
||||
<file>assets/icons/icon_tv.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
@ -1,7 +1,7 @@
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.2
|
||||
import QtQuick.Dialogs 1.2
|
||||
import QtQuick.Controls.Material 2.2
|
||||
|
||||
import Qt.labs.platform 1.0
|
||||
|
||||
CustomPage {
|
||||
@ -11,19 +11,28 @@ CustomPage {
|
||||
Connections {
|
||||
target: steamWorkshop
|
||||
onWorkshopItemCreated: {
|
||||
print("created")
|
||||
if (userNeedsToAcceptWorkshopLegalAgreement) {
|
||||
checkDelegate.opacity = 1
|
||||
} else {
|
||||
checkDelegate.opacity = 0
|
||||
checkDelegate.checkable = false
|
||||
checkDelegate.enabled = false
|
||||
busyIndicator.running = false
|
||||
page.state = "StartItemUpdate"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FontLoader {
|
||||
id: font_Roboto_Regular
|
||||
source: "qrc:/assets/fonts/Roboto-Regular.ttf"
|
||||
}
|
||||
FontLoader {
|
||||
id: font_LibreBaskerville
|
||||
source: "qrc:/assets/fonts/LibreBaskerville-Italic.ttf"
|
||||
}
|
||||
|
||||
Item {
|
||||
id: left
|
||||
id: leftArea
|
||||
width: parent.width * .5
|
||||
anchors {
|
||||
top: parent.top
|
||||
@ -68,7 +77,7 @@ CustomPage {
|
||||
Row {
|
||||
id: rowVisible
|
||||
width: parent.width
|
||||
height: 120
|
||||
height: 50
|
||||
Text {
|
||||
id: txtVisibleDescription
|
||||
height: parent.height
|
||||
@ -110,117 +119,82 @@ CustomPage {
|
||||
"http://steamcommunity.com/sharedfiles/workshoplegalagreement")
|
||||
}
|
||||
}
|
||||
|
||||
Item {
|
||||
id: right
|
||||
width: parent.width * .5
|
||||
id: rightArea
|
||||
width: parent.width * .4
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
bottom: parent.bottom
|
||||
margins: 30
|
||||
}
|
||||
Row {
|
||||
Item {
|
||||
id: rightTop
|
||||
height: 200
|
||||
height: 100
|
||||
anchors {
|
||||
top: parent.top
|
||||
right: parent.right
|
||||
left: parent.left
|
||||
}
|
||||
spacing: 30
|
||||
Item {
|
||||
width: parent.width * .46
|
||||
height: parent.height
|
||||
FileDropperSingleFile {
|
||||
anchors.fill: parent
|
||||
z:99
|
||||
descriptionTitle: "Set Video"
|
||||
imagePath: "qrc:/assets/icons/icon_tv.svg"
|
||||
}
|
||||
}
|
||||
Item {
|
||||
width: parent.width * .46
|
||||
anchors.right: parent.right
|
||||
height: parent.height
|
||||
|
||||
FileDropperSingleFile {
|
||||
anchors.fill: parent
|
||||
z:99
|
||||
descriptionTitle: "Set Preview Image"
|
||||
imagePath: "qrc:/assets/icons/icon_single_image.svg"
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
color: "orange"
|
||||
width: parent.width * .4
|
||||
height: parent.height
|
||||
}
|
||||
Rectangle {
|
||||
color: "steelblue"
|
||||
width: parent.width * .4
|
||||
height: parent.height
|
||||
id: rightBottom
|
||||
color: "white"
|
||||
radius: 16
|
||||
antialiasing: true
|
||||
border.width: 1
|
||||
height: 300
|
||||
anchors {
|
||||
top: rightTop.bottom
|
||||
topMargin: 30
|
||||
right: parent.right
|
||||
left: parent.left
|
||||
}
|
||||
Text {
|
||||
id: txtAdditionalImagesInput
|
||||
text: qsTr("Drop additional images here")
|
||||
anchors.centerIn: parent
|
||||
font.pointSize: 12
|
||||
color: "#626262"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.family: font_LibreBaskerville.name
|
||||
font.italic: true
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
}
|
||||
}
|
||||
Rectangle {
|
||||
id: rightBottom
|
||||
height: 400
|
||||
color: "gray"
|
||||
anchors {
|
||||
top: rightTop.bottom
|
||||
right: parent.right
|
||||
left:parent.left
|
||||
bottom: parent.bottom
|
||||
|
||||
Timer {
|
||||
id: tiItemUpdate
|
||||
interval: 500
|
||||
running: false
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
print(steamWorkshop.getItemUpdateProcess())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Row {
|
||||
id: row4
|
||||
width: parent.width
|
||||
height: 120
|
||||
Text {
|
||||
id: txtVideoFileDescription
|
||||
height: parent.height
|
||||
text: qsTr("Video File")
|
||||
font.pixelSize: 12
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnOpenVideo
|
||||
text: qsTr("Open Video ")
|
||||
onClicked: {
|
||||
fileDialogOpenVideo.open()
|
||||
}
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
id: fileDialogOpenVideo
|
||||
nameFilters: ["Videos (*.mp4)"]
|
||||
onAccepted: {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
spacing: 30
|
||||
}
|
||||
Row {
|
||||
width: parent.width
|
||||
height: 120
|
||||
Text {
|
||||
id: txtPreviewFileDescription
|
||||
height: parent.height
|
||||
text: qsTr("Video File preview")
|
||||
font.pixelSize: 12
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
}
|
||||
|
||||
Button {
|
||||
id: btnOpenPreview
|
||||
text: qsTr("Open Preview Image")
|
||||
onClicked: {
|
||||
fileDialogOpenPreview.open()
|
||||
}
|
||||
}
|
||||
|
||||
FileDialog {
|
||||
id: fileDialogOpenPreview
|
||||
nameFilters: ["*.png *.jpg *.gif","PNG (*.png)","JPG (*.jpg)","GIF (*.gif)"]
|
||||
onAccepted: {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
spacing: 30
|
||||
}*/
|
||||
Timer {
|
||||
id: tiItemUpdate
|
||||
interval: 500
|
||||
running: false
|
||||
repeat: true
|
||||
onTriggered: {
|
||||
print(steamWorkshop.getItemUpdateProcess())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
110
qml/Components/FileDropperSingleFile.qml
Normal file
110
qml/Components/FileDropperSingleFile.qml
Normal file
@ -0,0 +1,110 @@
|
||||
import QtQuick 2.7
|
||||
|
||||
Rectangle {
|
||||
|
||||
property color background: "white"
|
||||
property string descriptionTitle: "value"
|
||||
property url imagePath: "qrc:/assets/icons/icon_plus.svg"
|
||||
|
||||
id: fileDropperSingleFile
|
||||
color: fileDropperSingleFile.background
|
||||
border.color: "#C2C2C2"
|
||||
border.width: 2
|
||||
radius: 4
|
||||
state: ""
|
||||
|
||||
FontLoader {
|
||||
id: font_LibreBaskerville
|
||||
source: "qrc:/assets/fonts/LibreBaskerville-Italic.ttf"
|
||||
}
|
||||
|
||||
Item {
|
||||
id: column
|
||||
height:imageIcon.height + txtSplashInput.contentHeight
|
||||
anchors {
|
||||
right:parent.right
|
||||
left:parent.left
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
|
||||
Image {
|
||||
id: imageIcon
|
||||
width: 32
|
||||
height: 32
|
||||
sourceSize.height: 32
|
||||
sourceSize.width: 32
|
||||
source: fileDropperSingleFile.imagePath
|
||||
anchors {
|
||||
top:parent.top
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
}
|
||||
Text {
|
||||
id: txtSplashInput
|
||||
text: descriptionTitle
|
||||
anchors {
|
||||
top:imageIcon.bottom
|
||||
topMargin: 10
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
height:40
|
||||
font.pointSize: 12
|
||||
color: "#626262"
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
font.family: font_LibreBaskerville.name
|
||||
font.italic: true
|
||||
renderType: Text.NativeRendering
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
DropArea {
|
||||
anchors.fill: parent
|
||||
onEntered: {
|
||||
fileDropperSingleFile.state = "fileEntered"
|
||||
}
|
||||
onDropped: {
|
||||
fileDropperSingleFile.state = "fileDropped"
|
||||
}
|
||||
onExited: {
|
||||
fileDropperSingleFile.state = "empty"
|
||||
}
|
||||
}
|
||||
|
||||
states: [
|
||||
State {
|
||||
name: "fileEntered"
|
||||
|
||||
PropertyChanges {
|
||||
target: fileDropperSingleFile
|
||||
color: "#d9d9d9"
|
||||
}
|
||||
},
|
||||
State {
|
||||
name: "fileDropped"
|
||||
|
||||
PropertyChanges {
|
||||
target: fileDropperSingleFile
|
||||
color: "#ffbf49"
|
||||
}
|
||||
|
||||
},
|
||||
State {
|
||||
name: "empty"
|
||||
PropertyChanges {
|
||||
target: fileDropperSingleFile
|
||||
color: "white"
|
||||
}
|
||||
}
|
||||
]
|
||||
transitions: [
|
||||
Transition {
|
||||
from: "*"
|
||||
to: "*"
|
||||
|
||||
ColorAnimation {
|
||||
duration: 200
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -115,9 +115,6 @@ ApplicationWindow {
|
||||
z:98
|
||||
}
|
||||
|
||||
FileDropper {
|
||||
anchors.fill: parent
|
||||
z:99
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user