Prison::ScanResult Class

class Prison::ScanResult

Result of a barcode scan attempt. More...

Header: #include <Prison/ScanResult>
Since: 5.94
In QML: scanResult

Properties

Public Functions

ScanResult()
QByteArray binaryData() const
QRect boundingRect() const
QVariant content() const
Prison::Format::BarcodeFormat format() const
bool hasBinaryData() const
bool hasContent() const
bool hasText() const
QString text() const
bool operator==(const Prison::ScanResult &other) const

Detailed Description

A scan result consists of the barcode content (which can be text or binary data), the barcode format and the position in the video frame the barcode was detected.

Property Documentation

[read-only] binaryData : const QByteArray

Access functions:

QByteArray binaryData() const

[read-only] boundingRect : const QRect

Access functions:

QRect boundingRect() const

[read-only] content : const QVariant

Access functions:

QVariant content() const

[read-only] format : const Prison::Format::BarcodeFormat

Access functions:

Prison::Format::BarcodeFormat format() const

[read-only] hasBinaryData : const bool

Access functions:

bool hasBinaryData() const

[read-only] hasContent : const bool

Access functions:

bool hasContent() const

[read-only] hasText : const bool

Access functions:

bool hasText() const

[read-only] text : const QString

Access functions:

QString text() const

Member Function Documentation

[explicit] ScanResult::ScanResult()

QByteArray ScanResult::binaryData() const

Returns the binary data content, if the content was binary data rather than text, otherwise returns an empty QByteArray.

Note: Getter function for property binaryData.

QRect ScanResult::boundingRect() const

The bounding rectangle of the detected barcode in source coordinates.

Note: When using this to display an overlay in a view finder, this needs to be mapped to item coordinates.

Note: Getter function for property boundingRect.

QVariant ScanResult::content() const

The barcode content, either a QString or a QByteArray.

Note: Getter function for property content.

Prison::Format::BarcodeFormat ScanResult::format() const

The format of the detected barcode.

Note: Getter function for property format.

bool ScanResult::hasBinaryData() const

Returns true if the found barcode contained a binary data payload.

Note: Getter function for property hasBinaryData.

bool ScanResult::hasContent() const

Returns true if a barcode has been found.

Note: Getter function for property hasContent.

bool ScanResult::hasText() const

Returns true if the found barcode contained a textual payload.

Note: Getter function for property hasText.

QString ScanResult::text() const

Returns the textual barcode content, if the content was text rather than binary data, otherwise returns an empty string.

Note: Getter function for property text.

bool ScanResult::operator==(const Prison::ScanResult &other) const