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.

Property Documentation

◆ binaryData

QByteArray Prison::ScanResult::binaryData
read

Definition at line 40 of file scanresult.h.

◆ boundingRect

QRect Prison::ScanResult::boundingRect
read

Definition at line 43 of file scanresult.h.

◆ content

QVariant Prison::ScanResult::content
read

Definition at line 34 of file scanresult.h.

◆ format

Prison::Format::BarcodeFormat Prison::ScanResult::format
read

Definition at line 42 of file scanresult.h.

◆ hasBinaryData

bool Prison::ScanResult::hasBinaryData
read

Definition at line 39 of file scanresult.h.

◆ hasContent

bool Prison::ScanResult::hasContent
read

Definition at line 33 of file scanresult.h.

◆ hasText

bool Prison::ScanResult::hasText
read

Definition at line 36 of file scanresult.h.

◆ text

QString Prison::ScanResult::text
read

Definition at line 37 of file scanresult.h.

Constructor & Destructor Documentation

◆ ScanResult()

ScanResult::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:
This file is part of the KDE documentation.
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.