Prison::ScanResult

Search for usage in LXR

Prison::ScanResult Class Reference

#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
 
ScanResultoperator= (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.

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.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sat Sep 30 2023 04:06:04 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.