It can display a number in just about any size. It can display decimal, hexadecimal, octal or binary numbers. It is easy to connect to data sources using the display() slot, which is overloaded to take any of five argument types.
.PP
There are also slots to change the base with setMode() and the decimal point with setSmallDecimalPoint().
TQLCDNumber emits the overflow() signal when it is asked to display something beyond its range. The range is set by setNumDigits(), but setSmallDecimalPoint() also influences it. If the display is set to hexadecimal, octal or binary, the integer equivalent of the value is displayed.
These digits and other symbols can be shown: 0/O, 1, 2, 3, 4, 5/S, 6, 7, 8, 9/g, minus, decimal point, A, B, C, D, E, F, h, H, L, o, P, r, u, U, Y, colon, degree sign (which is specified as single quote in the string) and space. TQLCDNumber substitutes spaces for illegal characters.
It is not possible to retrieve the contents of a TQLCDNumber object, although you can retrieve the numeric value with value(). If you really need the text, we recommend that you connect the signals that feed the display() slot to another slot as well and store the value there.
Constructs an LCD number, sets the number of digits to 5, the base to decimal, the decimal point mode to 'small' and the frame style to a raised box. The segmentStyle() is set to Outline.
Constructs an LCD number, sets the number of digits to \fInumDigits\fR, the base to decimal, the decimal point mode to 'small' and the frame style to a raised box. The segmentStyle() is set to Outline.
These digits and other symbols can be shown: 0/O, 1, 2, 3, 4, 5/S, 6, 7, 8, 9/g, minus, decimal point, A, B, C, D, E, F, h, H, L, o, P, r, u, U, Y, colon, degree sign (which is specified as single quote in the string) and space. TQLCDNumber substitutes spaces for illegal characters.
Returns the displayed value. See the "value" property for details.
.SS "Property Documentation"
.SH "int intValue"
This property holds the displayed value rounded to the nearest integer.
.PP
This property corresponds to the nearest integer to the current value displayed by the LCDNumber. This is the value used for hexadecimal, octal and binary modes.
.PP
If the displayed value is not a number, the property has a value of 0.
.PP
Set this property's value with display() and get this property's value with intValue().
.SH "Mode mode"
This property holds the current display mode (number base).
.PP
Corresponds to the current display mode, which is one of BIN, OCT, DEC (the default) and HEX. DEC mode can display floating point values, the other modes display the integer equivalent.
.PP
See also smallDecimalPoint, setHexMode(), setDecMode(), setOctMode(), and setBinMode().
.PP
Set this property's value with setMode() and get this property's value with mode().
.SH "int numDigits"
This property holds the current number of digits displayed.
Set this property's value with setNumDigits() and get this property's value with numDigits().
.SH "SegmentStyle segmentStyle"
This property holds the style of the LCDNumber.
.PP
<center>.nf
.TS
l - l. Style Result Outline Produces raised segments filled with the background color (this is the default). Filled Produces raised segments filled with the foreground color. Flat
Set this property's value with setSegmentStyle() and get this property's value with segmentStyle().
.SH "bool smallDecimalPoint"
This property holds the style of the decimal point.
.PP
If TRUE the decimal point is drawn between two digit positions. Otherwise it occupies a digit position of its own, i.e. is drawn in a digit position. The default is FALSE.
.PP
The inter-digit space is made slightly wider when the decimal point is drawn between the digits.
.PP
See also mode.
.PP
Set this property's value with setSmallDecimalPoint() and get this property's value with smallDecimalPoint().
.SH "double value"
This property holds the displayed value.
.PP
This property corresponds to the current value displayed by the LCDNumber.
.PP
If the displayed value is not a number, the property has a value of 0.
.PP
Set this property's value with display() and get this property's value with value().