Commit be9a3c94 authored by Alessandro Portale's avatar Alessandro Portale

Remove 0.5 MB of obsolete welcome screen

parent ac85594b
import Qt 4.7
Rectangle {
property variant label: "Button"
signal clicked
width: 75
height: 20
radius: 10
color: "grey"
Rectangle {
anchors.fill: parent;
anchors.leftMargin: 1;
anchors.rightMargin: 1;
anchors.topMargin: 1;
anchors.bottomMargin: 1;
color: "#2c2c2c";
radius: 9
Rectangle {
id: buttonGradientRectangle
anchors.fill: parent;
anchors.leftMargin: 1;
anchors.rightMargin: 1;
anchors.topMargin: 1;
anchors.bottomMargin: 1;
color: "black";
gradient: normalGradient
radius: 8;
Gradient {
id: pressedGradient
GradientStop { position: 0.0; color: "#686868" }
GradientStop { position: 1.0; color: "#8a8a8a" }
}
Gradient {
id: normalGradient
GradientStop { position: 0.0; color: "#8a8a8a" }
GradientStop { position: 1.0; color: "#686868" }
}
}
}
Text {
color: "white"
text: parent.label
style: "Raised";
anchors.left: parent.left
anchors.top: parent.top
anchors.right: parent.right
anchors.bottom: parent.bottom
horizontalAlignment: "AlignHCenter";
verticalAlignment: "AlignVCenter";
}
MouseArea {
id: mouseArea
anchors.fill: parent
onReleased: { parent.clicked.emit(); }
}
states: [
State {
name: "released"
when: !mouseArea.pressed
PropertyChanges {
target: buttonGradientRectangle
gradient: normalGradient
}
},
State {
name: "pressed"
when: mouseArea.pressed
PropertyChanges {
target: buttonGradientRectangle
gradient: pressedGradient
}
}
]
}
import Qt 4.7
Image {
id: screen
property variant selectedFile
signal openFile
source: "gradient.png"
width: 1045
height: 680
Image {
source: "welcome-card.png"
anchors.verticalCenter: parent.verticalCenter
anchors.horizontalCenter: parent.horizontalCenter
transformOrigin: "Center"
smooth: true
scale: 0
//Animation
SequentialAnimation on scale {
running: true
NumberAnimation {
to: 1
duration: 400
easing: "easeOutCirc"
}
}
Text {
text: "Recent files"
style: "Sunken"
color: "white"
font.pointSize: 14
x: 70
y: 160
}
Text {
text: "New file"
style: "Sunken"
color: "white"
font.pointSize: 14
x: 380
y: 160
opacity: 0.8
}
Item {
id: leftSide
width: 300
anchors.top: parent.top
anchors.bottom: parent.bottom
ListView {
id: recentFilesListView
width: 280
height: 320
x: 60
y: 200
overShoot: false
model: recentFiles
delegate: fileDelegate
}
}
Item {
id: rightSide
x: 300
width: 300
anchors.top: parent.top
anchors.bottom: parent.bottom
ListView {
id: templatesListView
width: 280
height: 320
x: 80
y: 200
overShoot: false
model: templatesList
delegate: fileDelegate
}
}
Button {
id: chooseButton
label: " Choose"
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.bottomMargin: 13
anchors.rightMargin: 40
}
}
Component {
id: fileDelegate
Item {
width: parent.width
height: fileDelegateText.height
Text {
id: fileDelegateText
anchors.left: parent.left
color: "white"
text: name
}
MouseArea {
anchors.top: fileDelegateText.top
anchors.left: fileDelegateText.left
anchors.right: fileDelegateText.right
anchors.bottom: fileDelegateText.bottom
onClicked: {
screen.selectedFile = fileName;
screen.openFile();
}
}
}
}
/*
ListModel {
id: recentFiles
ListElement {
fileName: "file1.qml"
}
ListElement {
fileName: "file2.qml"
}
ListElement {
fileName: "file3.qml"
}
}
*/
ListModel {
id: templatesList
ListElement {
fileName: ":/qmldesigner/templates/General/Empty Fx"
name: "Fx Rectangle (640x480)"
}
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment