Qt Creator Documentation 2.8.0

Contents

QML VerticalLevelIndicator Element

A vertical level indicator More...

Properties

Detailed Description

The VerticalLevelIndicator type provides a vertical 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 VerticalLevelIndicator:

 import QtQuick 1.1
 import "components"

 VerticalLevelIndicator {
     id: level_indicator___vertical1
     width: 28
     height: 161
     value: 0
     minValue: 0
     maxValue: 18
     increment: 9
     imageBase: "images/level.png"
     imageOverlay: "images/level_overlay.png"
     startPosition: "bottom"
     showHint: true
     hintFontFamily: "Arial"
     hintFontPixelSize: 14
     hintFontColor: "#000000"

     onValueChanged: {
         console.debug(value);
     }
 }

Property Documentation

height : int

The height of the component, usually the base image.


hintFontBold : bool

Determines if the text of the value shuld be bold.


hintFontColor : string

The font color to use for text of the value.


hintFontFamily : string

The font family to use for the text of the value.


hintFontItalic : bool

Determines if the text of the value shuld be italic.


hintFontPixelSize : string

The font pixel size to use for text of the value.


hintFontPointSize : string

The font point size to use for text of the value.


hintFontStrikeout : bool

Determines if the text of the value shuld be strike out.


hintFontUnderLine : bool

Determines if the text of the value shuld be underlined.


imageBase : url

The source for the components background image.


imageOverlay : url

The source for the components overlay image. This image will be transposed over the base image in increments.


increment : int

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.


maxValue : int

The maximum value for the component.


minValue : int

The minimum value for the component.


showHint : bool

Determines if current value is visible to the user in the center of the control.


startPosition : string

Determines if the animation is to start from the 'left' or the 'right'.


value : int

The current value for the component.


width : int

The width of the component, usually the base image.