1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-18 16:32:33 +02:00
This commit is contained in:
Elias Steurer 2020-10-04 16:56:42 +02:00
parent 4f466b3022
commit 2ee67d2fb0
7 changed files with 6 additions and 1253 deletions

View File

@ -69,6 +69,12 @@ Item {
category: "Create Wallpaper"
}
ListElement {
headline: "Website Wallpaper"
source: "qrc:/qml/Create/Wizards/CreateHTMLWallpaper.qml"
category: "Create Wallpaper"
}
ListElement {
headline: "QML Wallpaper"
source: "qrc:/qml/Create/Wizards/CreateQMLWallpaper.qml"
@ -111,12 +117,6 @@ Item {
category: "Example Wallpaper"
}
ListElement {
headline: "HTML IFrame Wallpaper"
source: ""
category: "Example Wallpaper"
}
ListElement {
headline: "Clock Widget"
source: "qrc:/qml/Create/Wizards/CreateEmptyWidget/CreateEmptyWidget.qml"

View File

@ -1,296 +0,0 @@
import QtQuick 2.12
import QtGraphicalEffects 1.0
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.3
import Qt.labs.platform 1.0
import QtQuick.Layouts 1.12
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import "../../../Common"
Item {
id: root
SwipeView {
id: swipeView
anchors.fill: parent
interactive: false
clip: true
Item {
Item {
width: parent.width * .66
anchors {
top: parent.top
left: parent.left
bottom: parent.bottom
margins: 20
}
Image {
source: "qrc:/assets/images/undraw_static_website_0107.svg"
anchors {
verticalCenter: parent.verticalCenter
left: parent.left
}
width: parent.width
height: 300
fillMode: Image.PreserveAspectFit
}
}
Item {
width: parent.width * .33
anchors {
top: parent.top
right: parent.right
bottom: parent.bottom
margins: 20
}
Text {
id: txtDescription
text: qsTr("This wizard lets you create a empty html based wallpaper. You can put anything you can imagine into this html file. For example this can be a three.js scene or a utility application written in javascript.")
color: "gray"
width: parent.width - 40
font.pointSize: 13
font.family: ScreenPlay.settings.font
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
anchors {
centerIn: parent
}
}
}
Button {
text: qsTr("Next")
highlighted: true
anchors {
right: parent.right
bottom: parent.bottom
margins: 20
}
font.family: ScreenPlay.settings.font
onClicked: swipeView.incrementCurrentIndex()
}
}
Item {
Item {
width: parent.width * .5
anchors {
top: parent.top
left: parent.left
bottom: parent.bottom
margins: 20
}
Image {
source: "qrc:/assets/images/undraw_static_website_0107.svg"
anchors {
verticalCenter: parent.verticalCenter
left: parent.left
}
width: parent.width
height: 400
fillMode: Image.PreserveAspectFit
}
}
Item {
width: parent.width * .5
anchors {
top: parent.top
right: parent.right
bottom: parent.bottom
margins: 20
}
ColumnLayout {
id: rightWrapper
spacing: 8
anchors {
top: parent.top
right: parent.right
left: parent.left
}
Headline {
text.text: qsTr("Create a html Wallpaper")
}
Text {
text: qsTr("General")
font.pointSize: 14
color: "#757575"
font.family: ScreenPlay.settings.font
}
TextField {
id: tfTitle
Layout.fillWidth: true
placeholderText: qsTr("Wallpaper name")
font.family: ScreenPlay.settings.font
onTextChanged: {
if (text.length >= 3) {
btnSave.enabled = true
} else {
btnSave.enabled = false
}
}
}
TextField {
id: tfCreatedBy
font.family: ScreenPlay.settings.font
Layout.fillWidth: true
placeholderText: qsTr("Copyright owner")
}
Text {
text: qsTr("License")
font.pointSize: 14
color: "#757575"
font.family: ScreenPlay.settings.font
}
ComboBox {
id: cbLicense
Layout.fillWidth: true
font.family: ScreenPlay.settings.font
model: ListModel {
id: modelLicense
ListElement {
text: "All rights "
}
ListElement {
text: "Open Source - GPLv3"
}
ListElement {
text: "Open Source - MIT/Apache2"
}
}
}
Text {
text: qsTr("Tags")
font.pointSize: 14
color: "#757575"
font.family: ScreenPlay.settings.font
}
TagSelector {
id: tagSelector
Layout.fillWidth: true
}
Text {
text: qsTr("Preview Image")
font.pointSize: 14
color: "#757575"
font.family: ScreenPlay.settings.font
}
ImageSelector {
id: previewSelector
placeHolderText: qsTr("You can set your own preview image here!")
Layout.fillWidth: true
}
}
}
Row {
height: 80
anchors {
right: parent.right
bottom: parent.bottom
rightMargin: 20
}
spacing: 10
Connections {
target: ScreenPlay.create
function onHtmlWallpaperCreatedSuccessful(path) {
ScreenPlay.util.openFolderInExplorer(path)
}
}
Button {
id: btnExit
text: qsTr("Abort")
Material.background: Material.Red
Material.foreground: "white"
font.family: ScreenPlay.settings.font
onClicked: {
ScreenPlay.util.setNavigationActive(true)
ScreenPlay.util.setNavigation("Create")
}
}
Button {
id: btnSave
text: qsTr("Save")
enabled: false
Material.background: Material.accent
Material.foreground: "white"
font.family: ScreenPlay.settings.font
onClicked: {
btnSave.enabled = false
savePopup.open()
var tags = tagSelector.getTags()
ScreenPlay.create.createHTMLWallpaper(
ScreenPlay.globalVariables.localStoragePath,
tfTitle.text, previewSelector.imageSource,
cbLicense.currentText, tags)
}
}
}
}
}
Popup {
id: savePopup
modal: true
focus: true
width: 250
anchors.centerIn: parent
height: 200
onOpened: timerSave.start()
BusyIndicator {
anchors.centerIn: parent
running: true
}
Text {
text: qsTr("Create Html Wallpaper...")
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 30
font.family: ScreenPlay.settings.font
}
Timer {
id: timerSave
interval: 1000 + Math.random() * 1000
onTriggered: {
savePopup.close()
ScreenPlay.util.setNavigationActive(true)
ScreenPlay.util.setNavigation("Installed")
}
}
}
PageIndicator {
id: indicator
count: swipeView.count
currentIndex: swipeView.currentIndex
anchors {
bottom: swipeView.bottom
bottomMargin: 20
horizontalCenter: parent.horizontalCenter
}
}
}
/*##^##
Designer {
D{i:0;autoSize:true;height:480;width:640}
}
##^##*/

View File

@ -1,256 +0,0 @@
import QtQuick 2.14
import QtQuick.Controls.Material 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.14
import QtQuick.Dialogs 1.2
import ScreenPlay 1.0
import "../../../Common"
Item {
id: root
function cleanup() {}
Text {
id: txtHeadline
text: qsTr("Create an empty widget")
height: 40
font.family: ScreenPlay.settings.font
font.weight: Font.Light
color: "#757575"
font.pointSize: 23
anchors {
top: parent.top
left: parent.left
margins: 40
bottomMargin: 0
}
}
RowLayout {
anchors {
top: txtHeadline.bottom
right: parent.right
left: parent.left
bottom: parent.bottom
margins: 20
}
ColumnLayout {
Layout.fillHeight: true
Layout.preferredWidth: parent.width * .5
Rectangle {
id: leftWrapper
color: "#333333"
radius: 3
Layout.fillHeight: true
Layout.fillWidth: true
Image {
id: imgPreview
source: "qrc:/assets/wizards/example_qml.png"
width: parent.width
fillMode: Image.PreserveAspectCrop
}
}
ImageSelector {
id: imageSelector
Layout.fillWidth: true
}
}
Item {
Layout.fillHeight: true
Layout.preferredWidth: 20
}
ColumnLayout {
id: rightWrapper
spacing: 8
Layout.fillHeight: true
Layout.preferredWidth: parent.width * .5
Layout.alignment: Qt.AlignTop
Text {
text: qsTr("General")
font.pointSize: 14
color: "#757575"
font.family: ScreenPlay.settings.font
}
TextField {
id: tfTitle
Layout.fillWidth: true
placeholderText: qsTr("Widget name")
font.family: ScreenPlay.settings.font
onTextChanged: {
if (text.length >= 3) {
btnSave.enabled = true
} else {
btnSave.enabled = false
}
}
}
TextField {
id: tfCreatedBy
Layout.fillWidth: true
placeholderText: qsTr("Copyright owner")
font.family: ScreenPlay.settings.font
}
Text {
text: qsTr("Type")
font.pointSize: 14
color: "#757575"
font.family: ScreenPlay.settings.font
}
ComboBox {
id: cbType
Layout.fillWidth: true
font.family: ScreenPlay.settings.font
model: ListModel {
id: model
ListElement {
text: "QML"
}
ListElement {
text: "HTML"
}
}
onActivated: {
if ( index == 0) {
imgPreview.source = "qrc:/assets/wizards/example_qml.png"
} else {
imgPreview.source = "qrc:/assets/wizards/example_html.png"
}
}
}
Text {
text: qsTr("License")
font.pointSize: 14
color: "#757575"
font.family: ScreenPlay.settings.font
}
ComboBox {
id: cbLicense
Layout.fillWidth: true
font.family: ScreenPlay.settings.font
model: ListModel {
id: modelLicense
ListElement {
text: "All rights "
}
ListElement {
text: "Open Source - GPLv3"
}
ListElement {
text: "Open Source - MIT/Apache2"
}
}
}
Text {
text: qsTr("Tags")
font.pointSize: 14
color: "#757575"
font.family: ScreenPlay.settings.font
}
TagSelector {
id: tagSelector
Layout.fillWidth: true
}
Item {
Layout.fillWidth: true
Layout.preferredHeight: 10
}
Row {
height: 80
layoutDirection: Qt.RightToLeft
Layout.fillWidth: true
spacing: 10
Button {
id: btnSave
text: qsTr("Save")
enabled: false
Material.background: Material.accent
Material.foreground: "white"
font.family: ScreenPlay.settings.font
onClicked: {
btnSave.enabled = false
savePopup.open()
var tags = tagSelector.getTags()
ScreenPlay.create.createWidget(
ScreenPlay.globalVariables.localStoragePath,
tfTitle.text, imageSelector.imageSource,
tfCreatedBy.text, cbLicense.currentText,
cbType.currentText, tags)
}
}
Connections {
target: ScreenPlay.create
function onWidgetCreatedSuccessful(path) {
ScreenPlay.util.openFolderInExplorer(path)
}
}
Button {
id: btnExit
text: qsTr("Abort")
font.family: ScreenPlay.settings.font
Material.background: Material.Red
Material.foreground: "white"
onClicked: {
ScreenPlay.util.setNavigationActive(true)
ScreenPlay.util.setNavigation("Create")
}
}
}
}
}
Popup {
id: savePopup
modal: true
focus: true
width: 250
anchors.centerIn: parent
height: 200
onOpened: timerSave.start()
BusyIndicator {
anchors.centerIn: parent
running: true
}
Text {
text: qsTr("Create Widget...")
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 30
}
Timer {
id: timerSave
interval: 1000 + Math.random() * 1000
onTriggered: {
savePopup.close()
ScreenPlay.util.setNavigationActive(true)
ScreenPlay.util.setNavigation("Installed")
}
}
}
}
/*##^##
Designer {
D{i:0;autoSize:true;height:580;width:1200}
}
##^##*/

View File

@ -1,41 +0,0 @@
import QtQuick 2.12
import QtGraphicalEffects 1.0
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.3
import Qt.labs.platform 1.0
import QtQuick.Layouts 1.12
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import "../../../Common"
Item {
id: root
property string filePath
signal next
SwipeView {
id: swipeView
anchors.fill: parent
interactive: false
clip: true
CreateWallpaperCodec {
onNext: {
swipeView.currentIndex = 1
ScreenPlay.create.createWallpaperStart(filePath,codec)
}
onCodecChanged:createWallpaperVideoImportConvert.codec = codec
}
CreateWallpaperVideoImportConvert {
id:createWallpaperVideoImportConvert
filePath: root.filePath
}
CreateWallpaperResult {}
}
}

View File

@ -1,144 +0,0 @@
import QtQuick 2.12
import QtGraphicalEffects 1.0
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.3
import Qt.labs.platform 1.0
import QtQuick.Layouts 1.12
import QtWebEngine 1.8
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import "../../../Common"
Item {
id: root
property var codec: Create.VP8
signal next
Timer {
running: true
interval: 1000
onTriggered: webView.url = "https://kelteseth.gitlab.io/ScreenPlayDocs/wallpaper/wallpaper/#performance"
}
WebEngineView {
id: webView
backgroundColor: "gray"
width: parent.width * .66
anchors {
margins: 20
top: parent.top
left: parent.left
bottom: parent.bottom
}
}
Column {
spacing: 10
anchors {
top: parent.top
left: webView.right
bottom: parent.bottom
right: parent.right
margins: 40
}
Headline {
Layout.alignment: Qt.AlignTop
text.text: qsTr("Import a video")
}
Item {
width: parent.width
height: 5
}
Text {
id: txtDescription
text: qsTr("Depending on your PC configuration it is better to convert your wallpaper to a specific video codec. If both have bad performance you can also try a QML wallpaper!")
color: Material.primaryTextColor
width: parent.width
font.pointSize: 13
wrapMode: Text.WrapAtWordBoundaryOrAnywhere
font.family: ScreenPlay.settings.font
}
Item {
width: parent.width
height: 50
}
Text {
id: txtComboboxHeadline
text: qsTr("Set your preffered video codec:")
color: Material.secondaryTextColor
width: parent.width
font.pointSize: 14
font.family: ScreenPlay.settings.font
}
ComboBox {
id: comboBoxCodec
width: parent.width
textRole: "text"
valueRole: "value"
font.family: ScreenPlay.settings.font
onCurrentIndexChanged: {
root.codec = model.get(comboBoxCodec.currentIndex).value
}
model: ListModel {
id: model
ListElement {
text: "VP8 (Better for older hardware)"
value: Create.VP8
}
ListElement {
text: "VP9 (Better for newer hardware 2018+)"
value: Create.VP9
}
}
}
}
Button {
text: qsTr("Open Documentation")
Material.background: Material.LightGreen
Material.foreground: "white"
icon.source: "qrc:/assets/icons/icon_document.svg"
icon.color: "white"
icon.width: 16
icon.height: 16
font.family: ScreenPlay.settings.font
onClicked: Qt.openUrlExternally(
"https://kelteseth.gitlab.io/ScreenPlayDocs/wallpaper/wallpaper/#performance")
anchors {
left: webView.right
bottom: parent.bottom
margins: 20
}
}
Button {
text: qsTr("Next")
highlighted: true
font.family: ScreenPlay.settings.font
onClicked: {
root.next()
}
anchors {
right: parent.right
bottom: parent.bottom
margins: 20
}
}
}
/*##^##
Designer {
D{i:0;autoSize:true;height:768;width:1366}
}
##^##*/

View File

@ -1,126 +0,0 @@
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtQuick.Controls.Material 2.14
import QtQuick.Layouts 1.14
import QtQuick.Dialogs 1.2
import QtGraphicalEffects 1.0
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
Item {
id: wrapperError
property alias error:txtFFMPEGDebug.text
Text {
id: txtErrorHeadline
text: qsTr("An error occurred!")
anchors {
top: parent.top
topMargin: 30
horizontalCenter: parent.horizontalCenter
}
height: 40
font.family: ScreenPlay.settings.font
font.weight: Font.Light
color: Material.color(Material.DeepOrange)
font.pointSize: 32
}
Rectangle {
id: rectangle1
color: "#eeeeee"
radius: 3
anchors {
top: txtErrorHeadline.bottom
right: parent.right
bottom: btnBack.top
left: parent.left
margins: 30
bottomMargin: 10
}
Flickable {
anchors.fill: parent
clip: true
contentHeight: txtFFMPEGDebug.paintedHeight + 100
ScrollBar.vertical: ScrollBar {
snapMode: ScrollBar.SnapOnRelease
policy: ScrollBar.AlwaysOn
}
Text {
id: txtFFMPEGDebug
anchors {
top: parent.top
right: parent.right
left: parent.left
margins: 20
}
font.family: ScreenPlay.settings.font
wrapMode: Text.WordWrap
color: "#626262"
text: ScreenPlay.create.ffmpegOutput
height: txtFFMPEGDebug.paintedHeight
}
MouseArea {
anchors.fill: parent
propagateComposedEvents: true
acceptedButtons: Qt.RightButton
onClicked: contextMenu.popup()
}
}
}
Menu {
id: contextMenu
MenuItem {
text: qsTr("Copy text to clipboard")
onClicked: {
ScreenPlay.util.copyToClipboard(txtFFMPEGDebug.text)
}
}
}
Button {
id: btnBack
text: qsTr("Back to create and send an error report!")
Material.background: Material.accent
Material.foreground: "white"
font.family: ScreenPlay.settings.font
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
margins: 10
}
onClicked: {
ScreenPlay.setTrackerSendEvent("createWallpaperError",txtFFMPEGDebug.text);
ScreenPlay.util.setNavigationActive(true)
ScreenPlay.util.setNavigation("Create")
}
}
states: [
State {
name: "error"
PropertyChanges {
target: txtFFMPEGDebug
text: "Error!"
}
},
State {
name: "success"
PropertyChanges {
target: txtFFMPEGDebug
text: "Success!"
}
}
]
}
/*##^## Designer {
D{i:0;autoSize:true;height:480;width:640}
}
##^##*/

View File

@ -1,384 +0,0 @@
import QtQuick 2.12
import QtGraphicalEffects 1.0
import QtQuick.Controls 2.2
import QtQuick.Controls.Material 2.3
import Qt.labs.platform 1.0
import QtQuick.Layouts 1.12
import ScreenPlay 1.0
import ScreenPlay.Create 1.0
import "../../../Common"
Item {
id: wrapperContent
property bool conversionFinishedSuccessful: false
property bool canSave: false
property var codec: Create.VP8
property string filePath
onFilePathChanged: {
textFieldName.text = basename(filePath)
}
function cleanup() {
ScreenPlay.create.abortAndCleanup()
}
function basename(str) {
let filenameWithExtentions = (str.slice(str.lastIndexOf("/") + 1))
let filename = filenameWithExtentions.split('.').slice(0, -1).join('.')
return filename
}
onCanSaveChanged: wrapperContent.checkCanSave()
signal save
function checkCanSave() {
if (canSave && conversionFinishedSuccessful) {
btnSave.enabled = true
} else {
btnSave.enabled = false
}
}
Connections {
target: ScreenPlay.create
function onCreateWallpaperStateChanged(state) {
switch (state) {
case CreateImportVideo.ConvertingPreviewImage:
txtConvert.text = qsTr("Generating preview image...")
break
case CreateImportVideo.ConvertingPreviewThumbnailImage:
txtConvert.text = qsTr("Generating preview thumbnail image...")
break
case CreateImportVideo.ConvertingPreviewImageFinished:
imgPreview.source = "file:///" + ScreenPlay.create.workingDir + "/preview.jpg"
imgPreview.visible = true
break
case CreateImportVideo.ConvertingPreviewVideo:
txtConvert.text = qsTr("Generating 5 second preview video...")
break
case CreateImportVideo.ConvertingPreviewGif:
txtConvert.text = qsTr("Generating preview gif...")
break
case CreateImportVideo.ConvertingPreviewGifFinished:
gifPreview.source = "file:///" + ScreenPlay.create.workingDir + "/preview.gif"
imgPreview.visible = false
gifPreview.visible = true
gifPreview.playing = true
break
case CreateImportVideo.ConvertingAudio:
txtConvert.text = qsTr("Converting Audio...")
break
case CreateImportVideo.ConvertingVideo:
txtConvert.text = qsTr(
"Converting Video... This can take some time!")
break
case CreateImportVideo.ConvertingVideoError:
txtConvert.text = qsTr("Converting Video ERROR!")
break
case CreateImportVideo.AnalyseVideoError:
txtConvert.text = qsTr("Analyse Video ERROR!")
break
case CreateImportVideo.Finished:
txtConvert.text = ""
conversionFinishedSuccessful = true
busyIndicator.running = false
wrapperContent.checkCanSave()
ScreenPlay.setTrackerSendEvent("createWallpaperSuccessful", "")
break
}
}
function onProgressChanged(progress) {
var percentage = Math.floor(progress * 100)
if (percentage > 100 || progress > 0.95)
percentage = 100
if(percentage === NaN) {
print(progress, percentage)
}
txtConvertNumber.text = percentage + "%"
}
}
Text {
id: txtHeadline
text: qsTr("Convert a video to a wallpaper")
height: 40
font.family: ScreenPlay.settings.font
font.weight: Font.Light
color: Material.primaryTextColor
font.pointSize: 23
anchors {
top: parent.top
left: parent.left
margins: 40
bottomMargin: 0
}
}
Item {
id: wrapperLeft
width: parent.width * .5
anchors {
left: parent.left
top: txtHeadline.bottom
margins: 30
bottom: parent.bottom
}
Rectangle {
id: imgWrapper
anchors {
top: parent.top
right: parent.right
rightMargin: 20
bottom: previewSelector.top
bottomMargin: 20
left: parent.left
}
color: Material.color(Material.Grey)
Image {
fillMode: Image.PreserveAspectCrop
id: imgPreview
asynchronous: true
visible: false
anchors.fill: parent
}
AnimatedImage {
id: gifPreview
fillMode: Image.PreserveAspectCrop
asynchronous: true
playing: true
visible: false
anchors.fill: parent
}
LinearGradient {
id: shadow
cached: true
anchors.fill: parent
start: Qt.point(0, height)
end: Qt.point(0, 0)
gradient: Gradient {
GradientStop {
id: gradientStop0
position: 0.0
color: "#DD000000"
}
GradientStop {
id: gradientStop1
position: 1.0
color: "#00000000"
}
}
}
BusyIndicator {
id: busyIndicator
anchors.centerIn: parent
running: true
}
Text {
id: txtConvertNumber
color: "white"
text: qsTr("")
font.pointSize: 21
font.family: ScreenPlay.settings.font
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
bottomMargin: 40
}
}
Text {
id: txtConvert
color: Material.secondaryTextColor
text: qsTr("Generating preview video...")
font.pointSize: 14
font.family: ScreenPlay.settings.font
anchors {
horizontalCenter: parent.horizontalCenter
bottom: parent.bottom
bottomMargin: 20
}
}
}
ImageSelector {
id: previewSelector
height: 80
placeHolderText: qsTr("You can set your own preview image here!")
anchors {
right: parent.right
rightMargin: 20
left: parent.left
bottom: parent.bottom
}
}
}
Item {
id: wrapperRight
width: parent.width * .5
anchors {
top: txtHeadline.bottom
topMargin: 30
bottom: parent.bottom
right: parent.right
}
ColumnLayout {
id: column
spacing: 0
anchors {
right: parent.right
left: parent.left
margins: 30
top: parent.top
topMargin: 0
bottom: column1.top
bottomMargin: 50
}
TextField {
id: textFieldName
placeholderText: qsTr("Name (required!)")
width: parent.width
font.family: ScreenPlay.settings.font
Layout.fillWidth: true
onTextChanged: {
if (textFieldName.text.length >= 3) {
canSave = true
} else {
canSave = false
}
}
}
TextField {
id: textFieldDescription
placeholderText: qsTr("Description")
font.family: ScreenPlay.settings.font
width: parent.width
Layout.fillWidth: true
}
TextField {
id: textFieldYoutubeURL
placeholderText: qsTr("Youtube URL")
font.family: ScreenPlay.settings.font
width: parent.width
Layout.fillWidth: true
}
TagSelector {
id: textFieldTags
width: parent.width
Layout.fillWidth: true
}
}
Row {
id: column1
height: 80
width: childrenRect.width
spacing: 10
anchors {
right: parent.right
rightMargin: 30
bottomMargin: -10
bottom: parent.bottom
}
Button {
id: btnExit
text: qsTr("Abort")
Material.background: Material.Red
Material.foreground: "white"
font.family: ScreenPlay.settings.font
onClicked: {
ScreenPlay.create.abortAndCleanup()
ScreenPlay.util.setNavigationActive(true)
ScreenPlay.util.setNavigation("Create")
}
}
Button {
id: btnSave
text: qsTr("Save")
enabled: false
Material.background: Material.accent
Material.foreground: "white"
font.family: ScreenPlay.settings.font
onClicked: {
if (conversionFinishedSuccessful) {
btnSave.enabled = false
ScreenPlay.create.saveWallpaper(
textFieldName.text,
textFieldDescription.text,
wrapperContent.filePath,
previewSelector.imageSource,
textFieldYoutubeURL.text, codec,
textFieldTags.getTags())
savePopup.open()
ScreenPlay.installedListModel.reset()
}
}
}
}
}
Popup {
id: savePopup
modal: true
focus: true
width: 250
anchors.centerIn: parent
height: 200
onOpened: timerSave.start()
BusyIndicator {
anchors.centerIn: parent
running: true
}
Text {
text: qsTr("Save Wallpaper...")
color: Material.primaryTextColor
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 30
font.family: ScreenPlay.settings.font
}
Timer {
id: timerSave
interval: 1000 + Math.random() * 1000
onTriggered: {
savePopup.close()
ScreenPlay.util.setNavigationActive(true)
ScreenPlay.util.setNavigation("Installed")
}
}
}
}
/*##^##
Designer {
D{i:0;autoSize:true;height:580;width:1200}
}
##^##*/