Prison::ScanResult
#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 |
QRect | boundingRect () const |
QVariant | content () const |
Format::BarcodeFormat | format () const |
bool | hasBinaryData () const |
bool | hasContent () const |
bool | hasText () const |
ScanResult & | operator= (const ScanResult &) |
bool | operator== (const ScanResult &other) const |
QString | text () const |
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
Definition at line 30 of file scanresult.h.
Property Documentation
◆ binaryData
|
read |
Definition at line 40 of file scanresult.h.
◆ boundingRect
|
read |
Definition at line 43 of file scanresult.h.
◆ content
|
read |
Definition at line 34 of file scanresult.h.
◆ format
|
read |
Definition at line 42 of file scanresult.h.
◆ hasBinaryData
|
read |
Definition at line 39 of file scanresult.h.
◆ hasContent
|
read |
Definition at line 33 of file scanresult.h.
◆ hasText
|
read |
Definition at line 36 of file scanresult.h.
◆ text
|
read |
Definition at line 37 of file scanresult.h.
Constructor & Destructor Documentation
◆ ScanResult()
|
explicit |
Definition at line 17 of file scanresult.cpp.
Member Function Documentation
◆ binaryData()
QByteArray ScanResult::binaryData | ( | ) | const |
Returns the binary data content, if the content was binary data rather than text, otherwise returns an empty QByteArray.
Definition at line 56 of file scanresult.cpp.
◆ boundingRect()
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.
Definition at line 66 of file scanresult.cpp.
◆ content()
QVariant ScanResult::content | ( | ) | const |
The barcode content, either a QString or a QByteArray.
Definition at line 36 of file scanresult.cpp.
◆ format()
Format::BarcodeFormat ScanResult::format | ( | ) | const |
The format of the detected barcode.
Definition at line 61 of file scanresult.cpp.
◆ hasBinaryData()
bool ScanResult::hasBinaryData | ( | ) | const |
Returns true
if the found barcode contained a binary data payload.
Definition at line 51 of file scanresult.cpp.
◆ hasContent()
bool ScanResult::hasContent | ( | ) | const |
Returns true
if a barcode has been found.
Definition at line 31 of file scanresult.cpp.
◆ hasText()
bool ScanResult::hasText | ( | ) | const |
Returns true
if the found barcode contained a textual payload.
Definition at line 41 of file scanresult.cpp.
◆ operator==()
bool ScanResult::operator== | ( | const ScanResult & | other | ) | const |
Definition at line 26 of file scanresult.cpp.
◆ text()
QString ScanResult::text | ( | ) | const |
Returns the textual barcode content, if the content was text rather than binary data, otherwise returns an empty string.
Definition at line 46 of file scanresult.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:12:17 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.