1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-15 06:52:34 +02:00

Add basic Wizard

This commit is contained in:
kelteseth 2018-09-14 16:04:06 +02:00
parent 63caa6f3b2
commit 39fa01475e
5 changed files with 77 additions and 167 deletions

View File

@ -115,6 +115,8 @@
<file>legal/OFL.txt</file>
<file>legal/OpenSSL.txt</file>
<file>legal/Qt LGPLv3.txt</file>
<file>qml/Wizard/Wizard.qml</file>
<file>assets/shader/movingcolorramp.fsh</file>
<file>qml/Controls/Slider.qml</file>
</qresource>
</RCC>

View File

@ -0,0 +1,19 @@
precision lowp float;
uniform float time;
uniform vec2 resolution;
void main( void ) {
vec2 position = ( gl_FragCoord.xy / resolution.xy );
vec3 color1 = vec3(1.0, 0.0, 0.0);
vec3 color2 = vec3(0.97, 0.24, 0.24);
float mixValue = distance(position,vec2(0,1));
vec3 color = mix( color1, color2,mixValue);
gl_FragColor = vec4(color,mixValue);
}

View File

@ -23,7 +23,7 @@ Rectangle {
activeVideoFile = videoFile
loader.setSource("CreateImport.qml", {
file: videoFile
"file": videoFile
})
}
onProjectFileSelected: {
@ -31,7 +31,7 @@ Rectangle {
activeFolder = projectFile
loader.setSource("CreateUpload.qml", {
projectFile: projectFile
"projectFile": projectFile
})
}
}
@ -55,54 +55,26 @@ Rectangle {
}
onUploadToSteamWorkshop: {
loader.setSource("CreateUpload.qml", {
file: activeVideoFile
"file": activeVideoFile
})
}
}
LinearGradient {
id: gradient
anchors.fill: parent
cached: true
start: Qt.point(0, 0)
end: Qt.point(gradient.width, gradient.height)
gradient: Gradient {
GradientStop {
position: 0.0
color: "#FF9700"
SequentialAnimation on color {
loops: Animation.Infinite
ColorAnimation {
from: "#FF9700"
to: "#F83C3C"
duration: 5000
}
ColorAnimation {
from: "#F83C3C"
to: "#FF9700"
duration: 5000
}
}
}
GradientStop {
position: 1.0
color: "#F83C3C"
SequentialAnimation on color {
loops: Animation.Infinite
property var myDate: new Date()
ColorAnimation {
from: "#F83C3C"
to: "#FF9700"
duration: 100000
}
ColorAnimation {
from: "#FF9700"
to: "#F83C3C"
duration: 100000
}
}
}
}
Timer {
interval: 1
running: true
repeat: true
onTriggered: colorShader.time = myDate.getMilliseconds()
}
ShaderEffect {
id: colorShader
anchors.fill: parent
property real time: 45
property vector2d resolution: Qt.vector2d(parent.width, parent.height)
fragmentShader: "qrc:/assets/shader/movingcolorramp.fsh"
}
Item {
@ -235,7 +207,11 @@ Rectangle {
}
onButtonPressed: {
create.state = "new"
loader.setSource("CreateNew.qml", {project: type, projectTitle: title, icon: iconSource })
loader.setSource("CreateNew.qml", {
"project": type,
"projectTitle": title,
"icon": iconSource
})
}
}

View File

@ -5,6 +5,8 @@ import QtQuick.Controls.Material 2.2
import Qt.labs.platform 1.0
import QtQuick.Layouts 1.3
import "../Wizard"
Item {
id: createNew
anchors.fill: parent
@ -35,140 +37,46 @@ Item {
Rectangle {
id: wrapper
anchors {
horizontalCenter: parent.horizontalCenter
top: parent.top
}
width: 510
width: 910
radius: 4
height: 560
ColumnLayout {
anchors {
top: parent.top
margins: 50
bottom: parent.bottom
left: parent.left
right: parent.right
SwipeView {
id: view
clip: true
currentIndex: 0
anchors.fill: parent
anchors.margins: 40
Rectangle {
id: firstPage
color: "orange"
}
spacing: 50
Item {
width: 300
height: 180
Layout.alignment: Qt.AlignCenter
Image {
id: imgIcon
width: 120
height: 120
sourceSize: Qt.size(120, 120)
source: createNew.icon
anchors.centerIn: parent
}
ColorOverlay {
color: "gray"
source: imgIcon
anchors.fill: imgIcon
}
Text {
text: projectTitle
color: "#5D5D5D"
font.pixelSize: 16
font.family: "Roboto"
renderType: Text.NativeRendering
verticalAlignment: Qt.AlignVCenter
horizontalAlignment: Qt.AlignHCenter
wrapMode: Text.WrapAnywhere
clip: true
height: 30
anchors {
left: parent.left
bottom: parent.bottom
right: parent.right
}
}
Rectangle {
id: secondPage
color: "grey"
}
TextField {
id: txtTitle
height: 60
anchors {
right: parent.right
left: parent.left
}
selectByMouse: true
text: qsTr("")
placeholderText: "Project Name"
onTextChanged: {
txtPath.text = folderDialog.currentFolder + "/" + txtTitle.text
}
Rectangle {
id: thirdPage
color: "steelblue"
}
Item {
height: 60
width: parent.width
}
Text {
id: txtPath
text: StandardPaths.standardLocations(
StandardPaths.HomeLocation)[0]
color: "#5D5D5D"
font.pixelSize: 16
font.family: "Roboto"
renderType: Text.NativeRendering
verticalAlignment: Qt.AlignVCenter
wrapMode: Text.WrapAnywhere
clip: true
anchors {
top: parent.top
left: parent.left
bottom: parent.bottom
right: btnFolder.left
rightMargin: 30
}
}
Button {
id: btnFolder
text: qsTr("Set Folder")
Material.background: Material.Orange
Material.foreground: "white"
anchors {
right: parent.right
bottom: parent.bottom
}
PageIndicator {
id: indicator
onClicked: {
count: view.count
currentIndex: view.currentIndex
folderDialog.open()
}
FolderDialog {
id: folderDialog
folder: StandardPaths.standardLocations(
StandardPaths.HomeLocation)[0]
onAccepted: {
txtPath.text = folderDialog.currentFolder + "/" + txtTitle.text
}
}
}
}
Button {
text: qsTr("Create")
Material.background: Material.Orange
Material.foreground: "white"
icon.source: "qrc:/assets/icons/icon_plus.svg"
icon.color: "white"
icon.width: 16
icon.height: 16
Layout.alignment: Qt.AlignHCenter
onClicked: {
}
}
anchors.bottom: parent.bottom
anchors.bottomMargin: 20
anchors.horizontalCenter: parent.horizontalCenter
}
MouseArea {
@ -200,7 +108,7 @@ Item {
color: "gray"
}
Timer {
id:timerBack
id: timerBack
interval: 800
onTriggered: utility.setNavigation("Create")
}

View File

@ -0,0 +1,5 @@
import QtQuick 2.0
Item {
}