Public Slots | |
void | setVideoDevice (const QString &videoDevice) |
open a new video device. | |
void | setVideoEnabled (bool videoEnabled=true) |
enable/disable video scanning. | |
void | scanImage (const QImage &image) |
scan for barcodes in a QImage. | |
Signals | |
void | videoOpened (bool videoOpened) |
emitted when when a video device is opened or closed. | |
void | decoded (int type, const QString &data) |
emitted when a barcode is decoded from an image. | |
void | decodedText (const QString &text) |
emitted when a barcode is decoded from an image. | |
Public Member Functions | |
QZBar (QWidget *parent=NULL) | |
constructs a barcode reader widget with the given parent | |
QString | videoDevice () const |
retrieve the currently opened video device. | |
bool | isVideoEnabled () const |
retrieve the current video enabled state. | |
bool | isVideoOpened () const |
retrieve the current video opened state. | |
Properties | |
QString | videoDevice |
the currently opened video device. | |
bool | videoEnabled |
video device streaming state. | |
bool | videoOpened |
video device opened state. | |
QSize | sizeHint () const |
int | heightForWidth (int) const |
QPaintEngine * | paintEngine () const |
void | attach () |
void | showEvent (QShowEvent *) |
void | paintEvent (QPaintEvent *) |
void | resizeEvent (QResizeEvent *) |
void | changeEvent (QEvent *) |
void | dragEnterEvent (QDragEnterEvent *) |
void | dropEvent (QDropEvent *) |
void | sizeChange () |
embeds a barcode reader directly into a Qt4 based GUI. the widget can process barcodes from a video source (using the QZBar::videoDevice and QZBar::videoEnabled properties) or from individual QImages supplied to the QZBar::scanImage() slot
QString zbar::QZBar::videoDevice | ( | ) | const |
retrieve the currently opened video device.
bool zbar::QZBar::isVideoEnabled | ( | ) | const |
retrieve the current video enabled state.
bool zbar::QZBar::isVideoOpened | ( | ) | const |
retrieve the current video opened state.
void zbar::QZBar::setVideoDevice | ( | const QString & | videoDevice | ) | [slot] |
open a new video device.
use an empty string to close a currently opened device.
void zbar::QZBar::setVideoEnabled | ( | bool | videoEnabled = true |
) | [slot] |
enable/disable video scanning.
has no effect unless a video device is opened
void zbar::QZBar::videoOpened | ( | bool | videoOpened | ) | [signal] |
emitted when when a video device is opened or closed.
(re)setting QZBar::videoDevice should eventually cause it to be opened or closed. any errors while streaming/scanning will also cause the device to be closed
void zbar::QZBar::decoded | ( | int | type, | |
const QString & | data | |||
) | [signal] |
emitted when a barcode is decoded from an image.
the symbol type and contained data are provided as separate parameters.
void zbar::QZBar::decodedText | ( | const QString & | text | ) | [signal] |
emitted when a barcode is decoded from an image.
the symbol type name is prefixed to the data, separated by a colon
QString zbar::QZBar::videoDevice [read, write] |
the currently opened video device.
setting a new device opens it and automatically sets QZBar::videoEnabled
bool zbar::QZBar::videoEnabled [read, write] |
video device streaming state.
use to pause/resume video scanning.
bool zbar::QZBar::videoOpened [read] |
video device opened state.
(re)setting QZBar::videoDevice should eventually cause it to be opened or closed. any errors while streaming/scanning will also cause the device to be closed
Copyright 2008-2010 (c) Jeff Brown
This documentation is part of the ZBar Barcode Reader; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.