summaryrefslogtreecommitdiff
path: root/src/widgets/ProgressBar.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/ProgressBar.qml')
-rw-r--r--src/widgets/ProgressBar.qml31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/widgets/ProgressBar.qml b/src/widgets/ProgressBar.qml
new file mode 100644
index 00000000..bf29bcac
--- /dev/null
+++ b/src/widgets/ProgressBar.qml
@@ -0,0 +1,31 @@
+import QtQuick 1.0
+import "../../../components" as Components
+import "../plugin"
+
+Components.ProgressBar {
+ id:progressbar
+
+ // Align with button
+ property int buttonHeight: buttonitem.sizeFromContents(100, 15).height
+ QStyleItem { id:buttonitem; elementType:"button" }
+ height: buttonHeight
+
+ background: QStyleBackground{
+ anchors.fill:parent
+ style: QStyleItem {
+ elementType:"progressbar"
+
+ // XXX: since desktop uses int instead of real, the progressbar
+ // range [0..1] must be stretched to a good precision
+ property int factor : 1000000
+
+ value: progressbar.value * factor
+ minimum: indeterminate ? 0 : progressbar.minimumValue * factor
+ maximum: indeterminate ? 0 : progressbar.maximumValue * factor
+ enabled: progressbar.enabled
+ }
+ }
+ indeterminateProgress:null
+ progress: null
+}
+