- Android port fixes for the Qt frontend
- Coded a small resource downloader in QML from the Qt frontend. It's completly useless for the moment and it's poorly integrated - Various tweaking in the Qt project file for Symbian and Android
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
import QtQuick 1.0
|
||||
|
||||
Rectangle {
|
||||
id: progressbar
|
||||
|
||||
property int minimum: 0
|
||||
property int maximum: 100
|
||||
property int value: 0
|
||||
|
||||
width: 150
|
||||
height: 80
|
||||
radius: 10
|
||||
gradient: Gradient {
|
||||
GradientStop { id: gradient1; position: 0.0; color: "red" }
|
||||
GradientStop { id: gradient2; position: 0.7; color: "blue" }
|
||||
}
|
||||
border.width: 2
|
||||
border.color: "blue"
|
||||
opacity: 0.7
|
||||
smooth: true
|
||||
clip: true
|
||||
|
||||
|
||||
Rectangle {
|
||||
id: highlight
|
||||
|
||||
property int widthDest: ((progressbar.width * (value - minimum)) / (maximum - minimum))
|
||||
|
||||
anchors { left: parent.left; top: parent.top; bottom: parent.bottom }
|
||||
width: highlight.widthDest
|
||||
radius: 10
|
||||
gradient: Gradient {
|
||||
GradientStop { id: gradient3; position: 0.0; color: "blue" }
|
||||
GradientStop { id: gradient4; position: 0.7; color: "red" }
|
||||
}
|
||||
smooth: true
|
||||
|
||||
Behavior on width { SmoothedAnimation { velocity: 1200 } }
|
||||
}
|
||||
|
||||
Text {
|
||||
anchors { centerIn: progressbar }
|
||||
color: "black"
|
||||
font.pixelSize: 12
|
||||
font.bold: true
|
||||
text: Math.floor((value - minimum) / (maximum - minimum) * 100) + '%'
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
import QtQuick 1.0
|
||||
|
||||
Rectangle {
|
||||
id: main
|
||||
width: 360
|
||||
height: 360
|
||||
scale: 1
|
||||
|
||||
Column{
|
||||
id: column1
|
||||
x: -48
|
||||
y: 0
|
||||
width: 457
|
||||
height: 374
|
||||
anchors.horizontalCenterOffset: 1
|
||||
scale: 1
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: 35
|
||||
Image {
|
||||
id: logo
|
||||
|
||||
fillMode: Image.PreserveAspectFit
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
source: "http://wololo.net/forum/styles/prosilver/imageset/site_logo.gif"
|
||||
}
|
||||
|
||||
Text {
|
||||
text: qsTr("Downloading resources")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
wrapMode: Text.WordWrap
|
||||
}
|
||||
|
||||
ProgressBar {
|
||||
id: progressbar
|
||||
value: fileDownloader.received
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user