|
| double | nullPosition () const |
| | Return position (in degrees) of minimum value. More...
|
| |
| void | setNullPosition (double position) |
| | Defines position of minimum value. More...
|
| |
| void | setBarStyle (BarStyle style) |
| | Sets visual style of the widget. More...
|
| |
| BarStyle | barStyle () const |
| | Returns current progree bar style. More...
|
| |
| void | setOutlinePenWidth (double penWidth) |
| | Sets width of the outline circle pen. More...
|
| |
|
double | outlinePenWidth () const |
| | Returns width of the outline circle pen.
|
| |
| void | setDataPenWidth (double penWidth) |
| | Sets width of the data circle pen. More...
|
| |
|
double | dataPenWidth () const |
| | Returns width of the data circle pen.
|
| |
| void | setDataColors (const QGradientStops &stopPoints) |
| | Sets colors of the visible data and makes gradient brush from them. Gradient colors can be set for Donut and Pie styles (see setBarStyle() function). More...
|
| |
| void | setFormat (const QString &format) |
| | Defines the string used to generate the current text. If no format is set, no text will be shown. More...
|
| |
|
void | resetFormat () |
| | Sets format string to empty string. No text will be shown therefore. See setFormat() for more information.
|
| |
|
QString | format () const |
| | Returns the string used to generate the current text.
|
| |
| void | setDecimals (int count) |
| | Sets number of decimals to show after the comma (default is 1). More...
|
| |
| int | decimals () const |
| | Returns number of decimals to show after the comma (default is 1). More...
|
| |
| double | value () const |
| | Returns current value shown on the widget. More...
|
| |
| double | minimum () const |
| | Returns minimum of the allowed value range. More...
|
| |
| double | maximum () const |
| | Returns maximum of the allowed value range. More...
|
| |
The QRoundProgressBar class represents a circular progress bar and maintains its API similar to the QProgressBar.
Styles
QRoundProgressBar currently supports Donut, Pie and Line styles. See setBarStyle() for more details.
Colors
Generally QRoundProgressBar uses its palette and font attributes to define how it will look.
The following QPalette members are considered:
- QPalette::Window background of the whole widget (normally should be set to Qt::NoBrush)
- QPalette::Base background of the non-filled progress bar area (should be set to Qt::NoBrush to make it transparent)
- QPalette::AlternateBase background of the central circle where the text is shown (for Donut style)
- QPalette::Shadow foreground of the non-filled progress bar area (i.e. border color)
- QPalette::Highlight background of the filled progress bar area
- QPalette::Text color of the text shown in the center
Create a QPalette with given attributes and apply it via setPalette().
Color gradient
Donut and Pie styles allow to use color gradient for currernt value area instead of plain brush fill. See setDataColors() for more details.
Value text
Value text is generally drawn inside the QRoundProgressBar using its font() and QPalette::Text role from its palette().
To define pattern of the text, use setFormat() function (see Qt's QProgressBar for more details).
To define number of decimals to be shown, use setDecimals() function.
Font
To use own font for value text, apply it via setFont().
By default, font size will be adjusted automatically to fit the inner circle of the widget.