|
QBarcode
|
Store data of a Barcode. More...

Public Member Functions | |
| Payload (const Payload &other) | |
| Payload & | operator= (const Payload &other) |
| Payload (Payload &&other) noexcept | |
| Payload & | operator= (Payload &&) noexcept |
| bool | isValid () const |
| Allow to verify if a payload is valid. | |
| PayloadType | getType () const |
| Get payload type. | |
| QByteArray | getData () const |
| Retrieve encoded data as bytes array. | |
| QString | getString () const |
| Retrieve encoded data as string. | |
| BarError | getLastError () const |
| Retrieve last error. | |
| void | clear () |
| Clear payload content. | |
Store data of a Barcode.
This class allow to share common properties/methods accross all kinds of payload types.
This is this class that is responsible to properly encode datas.
| bool qbar::Payload::isValid | ( | ) | const |
Allow to verify if a payload is valid.
A payload is considered valid if:
true if valid. | PayloadType qbar::Payload::getType | ( | ) | const |
Get payload type.
Useful to properly cast a Payload instance to its "real" type.
| QByteArray qbar::Payload::getData | ( | ) | const |
| QString qbar::Payload::getString | ( | ) | const |
| BarError qbar::Payload::getLastError | ( | ) | const |
Retrieve last error.
Can be useful if after setting a payload, it becomes invalid, this method allow to retrieve the associated error.
| void qbar::Payload::clear | ( | ) |
Clear payload content.
Payload data content will be cleared, latest error will be preserved.