A horizontal level indicator More...
The HorizontalLevelIndicator type provides a horizontal component that can be styled with a background image and an overlay image. The component is used to show a single data point value between a min and a max value.
Here is a simple HorizontalLevelIndicator:
import QtQuick 1.1 import "components" HorizontalLevelIndicator { id: level_indicator___horizontal1 width: 200 height: 20 minValue: 0 maxValue: 50 value: 0 increment: 4 startPosition: "left" imageBase: "images/tank.png" imageOverlay: "images/tank_overlay.png" showHint: true hintFontFamily: "Arial" hintFontPixelSize: 14 hintFontColor: "#000000" onValueChanged: { console.debug(value); } }
The source for the components overlay image. This image will be transposed over the base image in increments.
The increment in pixels the overlay image is to cover the base image is determined by the value and the min and max values. In the above example, the base image is 190 pixels in width. The min value is 0 and the max value is 10. That will provide an increment of 19 pixels per unit of value.