QNX Community Resources
PtGauge
Common resources for gauge-type widgets
Class hierarchy:
PtWidget --> PtBasic --> PtGauge
For more information, see the diagram of the widget hierarchy.
PhAB icon:
None - not normally instantiated.
Public header:
<photon/PtGauge.h>
Description:
The PtGauge superclass provides common resources for gauge-like widgets, which are capable of displaying a range of values.
New resources:
| Resource | C type | Pt type | Default |
|---|---|---|---|
| Pt_ARG_GAUGE_FLAGS | short int | Flag | 0 |
| Pt_ARG_GAUGE_FONT | char * | String | "helv12" |
| Pt_ARG_GAUGE_H_ALIGN | unsigned char | Scalar | Pt_CENTER |
| Pt_ARG_GAUGE_MAXIMUM | long | Scalar | 100 |
| Pt_ARG_GAUGE_MINIMUM | long | Scalar | 0 |
| Pt_ARG_GAUGE_ORIENTATION | char | Scalar | Pt_HORIZONTAL |
| Pt_ARG_GAUGE_V_ALIGN | unsigned char | Scalar | Pt_CENTER |
| Pt_ARG_GAUGE_VALUE | long | Scalar | 0 |
| Pt_ARG_GAUGE_VALUE_PREFIX | char * | String | NULL |
| Pt_ARG_GAUGE_VALUE_SUFFIX | char * | String | NULL |
Pt_ARG_GAUGE_FLAGS
| C type | Pt type | Default |
|---|---|---|
| short int | Flag | 0 |
Possible values:
- Pt_SHOW_VALUE
- Indicates whether or not the value of the gauge will be displayed.
- Pt_VALUE_XOR
- XOR the value display with the background (i.e. invert the fill of the type face).
- Pt_GAUGE_MAX_ON_TOP
Pt_GAUGE_MAX_ON_RIGHT
Pt_GAUGE_MAX_ON_LEFT
Pt_GAUGE_MAX_ON_BOTTOM - The position of the maximum value.
The default setting for this resource is 0; that is, no flags have been set.
Pt_ARG_GAUGE_FONT
| C type | Pt type | Default |
|---|---|---|
| char * | String | "helv12" |
The font used for displaying the value, title, and any other text.
Pt_ARG_GAUGE_H_ALIGN
| C type | Pt type | Default |
|---|---|---|
| unsigned char | Scalar | Pt_CENTER |
Controls horizontal alignment. Possible values are:
- Pt_LEFT
- Draw the value aligned to the left edge.
- Pt_RIGHT
- Draw the value aligned to the right edge.
- Pt_CENTER
- Draw the value centered.
Pt_ARG_GAUGE_MAXIMUM
| C type | Pt type | Default |
|---|---|---|
| long | Scalar | 100 |
The maximum value of the gauge.
Pt_ARG_GAUGE_MINIMUM
| C type | Pt type | Default |
|---|---|---|
| long | Scalar | 0 |
The minimum value of the gauge.
Pt_ARG_GAUGE_ORIENTATION
| C type | Pt type | Default |
|---|---|---|
| char | Scalar | Pt_HORIZONTAL |
Indicates whether the gauge will be drawn vertically or horizontally. Possible values:
- Pt_HORIZONTAL
- Pt_VERTICAL
Pt_ARG_GAUGE_V_ALIGN
| C type | Pt type | Default |
|---|---|---|
| unsigned char | Scalar | Pt_CENTER |
Controls vertical alignment. Possible values are:
- Pt_TOP
- Draw the value aligned with the top edge.
- Pt_BOTTOM
- Draw the value aligned with the bottom edge.
- Pt_CENTER
- Draw the value centered.
Pt_ARG_GAUGE_VALUE
| C type | Pt type | Default |
|---|---|---|
| long | Scalar | 0 |
The gauge's current value.
Pt_ARG_GAUGE_VALUE_PREFIX
| C type | Pt type | Default |
|---|---|---|
| char * | String | NULL |
Text prefixed to the value displayed. For example, Red: would result in Red:35.
Pt_ARG_GAUGE_VALUE_SUFFIX
| C type | Pt type | Default |
|---|---|---|
| char * | String | NULL |
Text appended to the value displayed. For example, % would result in 35%.
Inherited resources:
If the widget modifies an inherited resource, the "Default override" column indicates the new value. This modification affects any subclasses of the widget.

