MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QML RatingIndicator Element

RatingIndicator indicates user specified ratings More...

This element was introduced in qt-components 4.7.

Properties

Detailed Description

Component to indicate user specified ratings.

A rating indicator is a component that shows the rating value within the maximum allowed range according to the user's specification. The user can also specify the display type to select the positive/negative visual. Optionally, the user can also specify a count value that will be displayed next to the images.

Note: When "count" is used, the height of the entire indicator is different than when it is not used. This is due to the font size being larger than the image size.

 // Rating indicator with vote count
 RatingIndicator {
     ratingValue: 3
     maximumValue: 5
     count: 3
 }

 // Rating indicator without vote count
 RatingIndicator {
     maximumValue: 5
     ratingValue: 3
 }

 // Rating indicator with inverted visual
 RatingIndicator {
     maximumValue: 5
     ratingValue: 3
     inverted: true
 }

Property Documentation

count : int

Property default is -1

A number to be displayed next to the rating images. It is usually used to count the number of votes cast. It is only displayed if a number larger or equal to 0 is specified.


inverted : string

Property default is false

Specify whether the visual for the rating indicator uses the inverted color. The value is false for use with a light background and true for use with a dark background.


maximumValue : double

Property default is 0

The maximum rating. The number should be larger or equal to 0.


ratingValue : double

Property default is 0

The rating value. The number should be larger or equal to 0.