Prison::VideoScanner Class
class Prison::VideoScannerScans a live video feed for barcodes. More...
Header: | #include <Prison/VideoScanner> |
Since: | 5.94 |
In QML: | VideoScanner |
Inherits: | QObject |
Properties
Public Functions
VideoScanner(QObject *parent = nullptr) | |
Prison::Format::BarcodeFormats | formats() const |
Prison::ScanResult | result() const |
void | setFormats(Prison::Format::BarcodeFormats formats) |
void | setVideoSink(QVideoSink *sink) |
QVideoSink * | videoSink() const |
Signals
void | formatsChanged() |
void | resultChanged(const Prison::ScanResult &scanResult) |
void | resultContentChanged(const Prison::ScanResult &scanResult) |
void | videoSinkChanged() |
Detailed Description
In Qt5 this can be added as a video filter to a VideoOutput element. In Qt6 this can be connected to a QVideoSink object.
Property Documentation
formats : Prison::Format::BarcodeFormats
Access functions:
Prison::Format::BarcodeFormats | formats() const |
void | setFormats(Prison::Format::BarcodeFormats formats) |
Notifier signal:
void | formatsChanged() |
[read-only]
result : const Prison::ScanResult
Access functions:
Prison::ScanResult | result() const |
Notifier signal:
void | resultChanged(const Prison::ScanResult &scanResult) |
videoSink : QVideoSink*
Access functions:
QVideoSink * | videoSink() const |
void | setVideoSink(QVideoSink *sink) |
Notifier signal:
void | videoSinkChanged() |
Member Function Documentation
[explicit]
VideoScanner::VideoScanner(QObject *parent = nullptr)
Prison::Format::BarcodeFormats VideoScanner::formats() const
The barcode formats the scanner should look for. By default all supported formats are enabled.
Note: Getter function for property formats.
See also setFormats().
[signal]
void VideoScanner::formatsChanged()
Note: Notifier signal for property formats.
Prison::ScanResult VideoScanner::result() const
The latest result of the barcode scan.
Note: Getter function for property result.
[signal]
void 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.
Note: Notifier signal for property result.
See also resultContentChanged.
[signal]
void 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 resultChanged.
void VideoScanner::setFormats(Prison::Format::BarcodeFormats formats)
Sets the barcode formats to detect.
formats can be OR'ed values from Format::BarcodeFormats.
Note: Setter function for property formats.
See also formats().
void VideoScanner::setVideoSink(QVideoSink *sink)
Sets the video sink to scan for barcodes.
Note: Setter function for property videoSink.
See also videoSink().
QVideoSink *VideoScanner::videoSink() const
The video sink being scanned for barcodes.
Note: Getter function for property videoSink.
See also setVideoSink().
[signal]
void VideoScanner::videoSinkChanged()
Note: Notifier signal for property videoSink.