Search for usage in LXR

Prison::VideoScanner Class Reference

#include <videoscanner.h>

Inherits QAbstractVideoFilter.


Prison::Format::BarcodeFormats formats
Prison::ScanResult result


void formatsChanged ()
void resultChanged (const Prison::ScanResult &scanResult)
void resultContentChanged (const Prison::ScanResult &scanResult)
void videoSinkChanged ()

Public Member Functions

 VideoScanner (QObject *parent=nullptr)
Format::BarcodeFormats formats () const
ScanResult result () const
void setFormats (Format::BarcodeFormats formats)

Detailed Description

Scans a live video feed for barcodes.

In Qt5 this can be added as a video filter to a VideoOutput element. In Qt6 this can be connected to a QVideoSink object.


Definition at line 29 of file videoscanner.h.

Member Function Documentation

◆ formats()

Format::BarcodeFormats Prison::VideoScanner::formats ( ) const

The barcode formats the scanner should look for.

By default all supported formats are enabled.

◆ result()

ScanResult Prison::VideoScanner::result ( ) const

The latest result of the barcode scan.

◆ resultChanged

void Prison::VideoScanner::resultChanged ( const Prison::ScanResult scanResult)

Emitted whenever we get a new scan result, as long as any property of the result changes.

On a live video feed this can be very frequently due to the changes of the position of the detected barcode. This is therefore useful e.g. for marking the position of the detected barcode.

See also

◆ resultContentChanged

void Prison::VideoScanner::resultContentChanged ( const Prison::ScanResult scanResult)

Emitted when a barcode with a new content has been detected, but not when merely the position of a barcode changes in the video stream.

This is useful e.g. for continuously scanning multiple codes in one go.

See also

◆ setFormats()

void VideoScanner::setFormats ( Format::BarcodeFormats  formats)

Sets the barcode formats to detect.

formatscan be OR'ed values from Format::BarcodeFormats.

Definition at line 131 of file videoscanner.cpp.

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 Thu Nov 30 2023 04:08:23 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.