Class QfBarcodeVideoModel
ClassList > QfBarcodeVideoModel
#include <qfbarcodevideomodel.h>
Inherits the following classes: QAbstractListModel
Classes
| Type | Name |
|---|---|
| struct | Barcode |
Public Types
| Type | Name |
|---|---|
| enum | Roles |
Public Functions
| Type | Name |
|---|---|
| QfBarcodeVideoModel (QObject * parent=nullptr) |
|
| Q_INVOKABLE void | clear () |
| QVariant | data (const QModelIndex & index, int role) override const |
| QHash< int, QByteArray > | roleNames () override const |
| int | rowCount (const QModelIndex & parent=QModelIndex()) override const |
| int | rowForText (const QString & text) const |
| void | updateBarcodes (const QList< Barcode > & barcodes) |
Detailed Description
A list model of the barcodes seen in a video feed.
Public Types Documentation
enum Roles
enum QfBarcodeVideoModel::Roles {
BarcodeText = Qt::UserRole + 1,
BarcodeBounds
};
Public Functions Documentation
function QfBarcodeVideoModel
explicit QfBarcodeVideoModel::QfBarcodeVideoModel (
QObject * parent=nullptr
)
function clear
Q_INVOKABLE void QfBarcodeVideoModel::clear ()
Removes all barcodes from the model.
function data
QVariant QfBarcodeVideoModel::data (
const QModelIndex & index,
int role
) override const
function roleNames
QHash< int, QByteArray > QfBarcodeVideoModel::roleNames () override const
function rowCount
int QfBarcodeVideoModel::rowCount (
const QModelIndex & parent=QModelIndex()
) override const
function rowForText
int QfBarcodeVideoModel::rowForText (
const QString & text
) const
Returns the row matching a given text. If the text is not found, the returned value will be -1.
function updateBarcodes
void QfBarcodeVideoModel::updateBarcodes (
const QList< Barcode > & barcodes
)
Updates the model with the barcodes found in a video frame.
The documentation for this class was generated from the following file src/core/qfbarcodevideomodel.h