bncs_bargraph

Description

This is a simple bargraph control. It can be used to display analogue values e.g. signal levels, or to select a value in a range. It's not particularly accurate for this on a touchscreen because of the "roll off" effect of removing your finger from the display.

bargraph
or with warning/peak level indicators:
bargraph

Orientation is automatic - depending upon longest side.

Internally values are always type double.

Commands

Default values are shown bold

Name | Use
colour.bar=#ff0000 | colour of the bar - this can be any Qt colour or a colour code no bar shown if progress is 0%, nothing but the bar shown if progress is 100%
colour.barPercentage2=50 | The percentage at which the second colour should be shown, if set to 0 only the first colour will be shown
color.bar2=#ffff00 | 2nd colour bar can to turned on by setting the barPercentage2 field. This shows a different colour to the first bar from the point specified
colour.barPercentage3=75 | Same as barPercentage2 but shown a 3rd colour when the percentage is reached
color.bar3=#ff0000 | 3rd colour bar can to turned on by setting the barPercentage3 field. This shows a different colour to the first bar from the point specified
colour.background=#c0c0c0 | colour of the control that isn't the bar
colour.border=#ffffff | colour of the 1 pixel line around the control
gradient=true | Turns the gradient on the control On or Off, the control uses more CPU with it on but looks nicer.
left=0* top=0 | These parameter names are entirely equivalent - only left is persisted
right=100 bottom=100 | These parameter names are entirely equivalent - only right is persisted left can be greater or less than right (and indeed top less or greater than bottom)
value= | Set the current value - this should be a value between left / right. The "progress" between left/right values is calculated and shown appropriately
progress= | Set the current position. This is a percentage value 0-100
notify.progresss=true notify.value=false | Whether notifications (detailed below) are sent out
local=false | Whether this control updates itself when you press it (true) or only when you explicitly set the value i.e. just echo the current value locally or only update it when the value on the device says it's changed

Notifications

Name | Use
progress=<value> | value between 0 and 100 of the current position. Left is always 0 for horizontal bargraphs Bottom is always 0 for vertical bargraphs
value=<value> | current value as determined by the selected position

Stylesheets

Not currently used

Version Control

Version | Date | Author | Comments
1.0 | 27/02/2017 | David Yates | Conversion to markdown
Build: master 3798 615debad Atos © 2018