PrisonScanner 5.109.0
Properties | Public Member Functions | List of all members
Prison::ScanResult

Result of a barcode scan attempt. More...

#include <scanresult.h>

Properties

QByteArray binaryData
 
QRect boundingRect
 
QVariant content
 
Prison::Format::BarcodeFormat format
 
bool hasBinaryData
 
bool hasContent
 
bool hasText
 
QString text
 

Public Member Functions

 ScanResult (const ScanResult &)
 
QByteArray binaryData () const
 Returns the binary data content, if the content was binary data rather than text, otherwise returns an empty QByteArray.
 
QRect boundingRect () const
 The bounding rectangle of the detected barcode in source coordinates.
 
QVariant content () const
 The barcode content, either a QString or a QByteArray.
 
Format::BarcodeFormat format () const
 The format of the detected barcode.
 
bool hasBinaryData () const
 Returns true if the found barcode contained a binary data payload.
 
bool hasContent () const
 Returns true if a barcode has been found.
 
bool hasText () const
 Returns true if the found barcode contained a textual payload.
 
ScanResultoperator= (const ScanResult &)
 
bool operator== (const ScanResult &other) const
 
QString text () const
 Returns the textual barcode content, if the content was text rather than binary data, otherwise returns an empty string.
 

Detailed Description

Result of a barcode scan attempt.

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.

Since
5.94

Member Function Documentation

◆ binaryData()

QByteArray Prison::ScanResult::binaryData ( ) const

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

◆ boundingRect()

QRect Prison::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.

◆ content()

QVariant Prison::ScanResult::content ( ) const

The barcode content, either a QString or a QByteArray.

◆ format()

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

The format of the detected barcode.

◆ hasBinaryData()

bool Prison::ScanResult::hasBinaryData ( ) const

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

◆ hasContent()

bool Prison::ScanResult::hasContent ( ) const

Returns true if a barcode has been found.

◆ hasText()

bool Prison::ScanResult::hasText ( ) const

Returns true if the found barcode contained a textual payload.

◆ text()

QString Prison::ScanResult::text ( ) const

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