6#ifndef PRISON_SCANRESULT_H
7#define PRISON_SCANRESULT_H
10#include "prisonscanner_export.h"
12#include <QExplicitlySharedDataPointer>
20class ScanResultPrivate;
33 Q_PROPERTY(
bool hasContent READ hasContent)
34 Q_PROPERTY(QVariant content READ content)
36 Q_PROPERTY(
bool hasText READ hasText)
37 Q_PROPERTY(QString text READ text)
39 Q_PROPERTY(
bool hasBinaryData READ hasBinaryData)
40 Q_PROPERTY(QByteArray binaryData READ binaryData)
43 Q_PROPERTY(QRect boundingRect READ boundingRect)
51 bool operator==(
const ScanResult &other)
const;
84 friend class ScanResultPrivate;
85 QExplicitlySharedDataPointer<ScanResultPrivate> d;
Result of a barcode scan attempt.
Definition scanresult.h:31
Format::BarcodeFormat format() const
The format of the detected barcode.
QVariant content() const
The barcode content, either a QString or a QByteArray.
bool hasContent() const
Returns true if a barcode has been found.
QByteArray binaryData() const
Returns the binary data content, if the content was binary data rather than text, otherwise returns a...
bool hasBinaryData() const
Returns true if the found barcode contained a binary data payload.
bool hasText() const
Returns true if the found barcode contained a textual payload.
QRect boundingRect() const
The bounding rectangle of the detected barcode in source coordinates.
QString text() const
Returns the textual barcode content, if the content was text rather than binary data,...