barcode reader Qt4 widget. More...


Public Slots | |
| void | scanImage (const QImage &image) |
| scan for barcodes in a QImage. More... | |
| void | setVideoDevice (const QString &videoDevice) |
| open a new video device. More... | |
| void | setVideoEnabled (bool videoEnabled=true) |
| enable/disable video scanning. More... | |
Signals | |
| void | decoded (int type, const QString &data) |
| emitted when a barcode is decoded from an image. More... | |
| void | decodedText (const QString &text) |
| emitted when a barcode is decoded from an image. More... | |
| void | videoOpened (bool videoOpened) |
| emitted when when a video device is opened or closed. More... | |
Public Member Functions | |
| QZBar (QWidget *parent=NULL) | |
| constructs a barcode reader widget with the given parent More... | |
| ~QZBar () | |
| bool | isVideoEnabled () const |
| retrieve the current video enabled state. More... | |
| bool | isVideoOpened () const |
| retrieve the current video opened state. More... | |
| QString | videoDevice () const |
| retrieve the currently opened video device. More... | |
| QSize | sizeHint () const |
| int | heightForWidth (int) const |
| QPaintEngine * | paintEngine () const |
Properties | |
| QString | videoDevice |
| the currently opened video device. More... | |
| bool | videoEnabled |
| video device streaming state. More... | |
| bool | videoOpened |
| video device opened state. More... | |
Private Attributes | |
| bool | _attached |
| QString | _videoDevice |
| bool | _videoEnabled |
| QZBarThread * | thread |
| void | attach () |
| void | showEvent (QShowEvent *) |
| void | paintEvent (QPaintEvent *) |
| void | resizeEvent (QResizeEvent *) |
| void | changeEvent (QEvent *) |
| void | dragEnterEvent (QDragEnterEvent *) |
| void | dropEvent (QDropEvent *) |
| void | sizeChange () |
barcode reader Qt4 widget.
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
| QZBar::QZBar | ( | QWidget * | parent = NULL | ) |
constructs a barcode reader widget with the given parent
References _attached, zbar::Window::attach(), decoded(), decodedText(), sizeChange(), thread, videoOpened, and zbar::QZBarThread::window.

| QZBar::~QZBar | ( | ) |
References zbar::QZBarThread::Exit, zbar::QZBarThread::pushEvent(), and thread.

|
protected |
References _attached, _videoDevice, _videoEnabled, zbar::Window::attach(), zbar::QZBarThread::pushEvent(), thread, and zbar::QZBarThread::window.
Referenced by showEvent().


References zbar::Window::attach(), zbar::QZBarThread::mutex, thread, and zbar::QZBarThread::window.

|
signal |
emitted when a barcode is decoded from an image.
the symbol type and contained data are provided as separate parameters.
Referenced by QZBar().

|
signal |
emitted when a barcode is decoded from an image.
the symbol type name is prefixed to the data, separated by a colon
Referenced by QZBar().

|
protected |
|
protected |
| int QZBar::heightForWidth | ( | int | width | ) | const |
References zbar::QZBarThread::mutex, zbar::QZBarThread::reqHeight, zbar::QZBarThread::reqWidth, and thread.
| bool QZBar::isVideoEnabled | ( | ) | const |
retrieve the current video enabled state.
References _videoEnabled.
| bool QZBar::isVideoOpened | ( | ) | const |
retrieve the current video opened state.
References zbar::QZBarThread::_videoOpened, zbar::QZBarThread::mutex, and thread.
| QPaintEngine * QZBar::paintEngine | ( | ) | const |
|
protected |
References zbar::Window::redraw(), thread, and zbar::QZBarThread::window.

|
protected |
References zbar::Window::resize(), test_zbar::size, thread, and zbar::QZBarThread::window.

|
slot |
scan for barcodes in a QImage.
References zbar::QZBarThread::pushEvent(), and thread.
Referenced by dropEvent().


|
slot |
open a new video device.
use an empty string to close a currently opened device.
References _attached, _videoDevice, _videoEnabled, zbar::QZBarThread::pushEvent(), thread, and videoDevice().

|
slot |
enable/disable video scanning.
has no effect unless a video device is opened
References _videoEnabled, zbar::QZBarThread::pushEvent(), thread, and videoEnabled.

|
protected |
|
protectedslot |
| QSize QZBar::sizeHint | ( | ) | const |
References zbar::QZBarThread::mutex, zbar::QZBarThread::reqHeight, zbar::QZBarThread::reqWidth, and thread.
| QString zbar::QZBar::videoDevice | ( | ) | const |
retrieve the currently opened video device.
Referenced by paintEngine(), and setVideoDevice().

|
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
|
private |
Referenced by attach(), QZBar(), setVideoDevice(), and showEvent().
|
private |
Referenced by attach(), paintEngine(), and setVideoDevice().
|
private |
Referenced by attach(), isVideoEnabled(), setVideoDevice(), and setVideoEnabled().
|
private |
Referenced by attach(), changeEvent(), heightForWidth(), isVideoOpened(), paintEvent(), QZBar(), resizeEvent(), scanImage(), setVideoDevice(), setVideoEnabled(), showEvent(), sizeHint(), and ~QZBar().
|
readwrite |
the currently opened video device.
setting a new device opens it and automatically sets QZBar::videoEnabled
|
readwrite |
video device streaming state.
use to pause/resume video scanning.
Referenced by setVideoEnabled().
|
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
Referenced by QZBar().