|
|
| length () |
| | Constructs a zero length.
|
| |
| | length (qreal l, unit u) |
| | Constructs length of given value and unit.
|
| |
| | length (QString lstring, bool *ok=0) |
| | Constructs length from a string.
|
| |
| qreal | get (unit u) const |
| | Returns length in given unit.
|
| |
| void | set (qreal l, unit u) |
| | Sets length.
|
| |
| bool | set (QString lstring) |
| | Constructs length from a string.
|
| |
| bool | isNonPositive () const |
| | Check if length is positive.
|
| |
| | operator QString () const |
| | Convert to human-readable string.
|
| |
| bool | operator== (const length other) const |
| | Checks for equality.
|
| |
| const length | operator+ (const length rhs) const |
| | Sum of the lengths.
|
| |
| const length | operator- (const length rhs) const |
| | Difference of two lengths.
|
| |
| const length | operator/ (const qreal div) const |
| | Divide a length by a number.
|
| |
The length stores a length and converts between units.
This is a trivial class that helps with length storage and conversions. Lengthes are stored intenally in 1/360mm, which allows conversions between units without rounding error.
The class "length" is known to the QMetaType systen and can be used as a custom type in QVariant.
Definition at line 37 of file length.h.