X-Git-Url: http://git.maemo.org/git/?p=mardrone;a=blobdiff_plain;f=mardrone%2FBarGauge.qml;h=d28594bbb8c4ee68932b5cfe13bf14c1442a445c;hp=7b7ce668ca47b379a3c9a1361b407a1df1a39590;hb=8f3f629260d50245d19c50ebfb07c766b8937c30;hpb=5c7bd9dd6553426975ff21d029f59e0134f25394 diff --git a/mardrone/BarGauge.qml b/mardrone/BarGauge.qml index 7b7ce66..d28594b 100644 --- a/mardrone/BarGauge.qml +++ b/mardrone/BarGauge.qml @@ -1,16 +1,18 @@ -import Qt 4.7 +import QtQuick 1.0 Rectangle { color:"#00000000" border.color: "black" width: 20 height: 100 - property int val:0 - property int max:100 + property bool horiz:false + property real val:0 + property real max:100 Rectangle { color:"green" + anchors.left: parent.left anchors.bottom: parent.bottom - height:parent.height*val/max - width: parent.width + height:parent.height*(!horiz?val/max:1) + width: parent.width*(horiz?val/max:1) } }