ZBar Bar Code Reader Library  version 0.10
zbar::QZBarThread Class Reference
Inheritance diagram for zbar::QZBarThread:
Collaboration diagram for zbar::QZBarThread:

Classes

class  ScanImageEvent
 
class  VideoDeviceEvent
 
class  VideoEnabledEvent
 

Public Types

enum  EventType {
  VideoDevice,
  VideoEnabled,
  ScanImage,
  Exit
}
 

Signals

void decoded (int type, const QString &data)
 
void decodedText (const QString &data)
 
void update ()
 
void videoOpened (bool opened)
 

Public Member Functions

 QZBarThread ()
 
 operator zbar_image_data_handler_t * () const
 cast this handler to the C handler More...
 
void pushEvent (QEvent *e)
 

Public Attributes

bool _videoOpened
 
QMutex mutex
 
QWaitCondition newEvent
 
QList< QEvent * > queue
 
unsigned reqHeight
 
unsigned reqWidth
 
Window window
 

Protected Member Functions

void clear ()
 
void enableVideo (bool enable)
 
virtual bool event (QEvent *e)
 
virtual void image_callback (Image &image)
 invoked by library when Image should be processed More...
 
void openVideo (const QString &device)
 
void processImage (Image &image)
 
void run ()
 
virtual void scanImageEvent (ScanImageEvent *event)
 
virtual void videoDeviceEvent (VideoDeviceEvent *event)
 
virtual void videoEnabledEvent (VideoEnabledEvent *event)
 

Private Attributes

QZBarImageimage
 
bool running
 
ImageScanner scanner
 
Videovideo
 
bool videoEnabled
 
bool videoRunning
 

Member Enumeration Documentation

Enumerator
VideoDevice 
VideoEnabled 
ScanImage 
Exit 

Constructor & Destructor Documentation

QZBarThread::QZBarThread ( )

References scanner, and zbar::ImageScanner::set_handler().

Here is the call graph for this function:

Member Function Documentation

void zbar::QZBarThread::clear ( )
inlineprotected

References zbar::Window::clear(), event(), image, image_callback(), scanImageEvent(), videoDeviceEvent(), and videoEnabledEvent().

Referenced by enableVideo(), openVideo(), run(), and scanImageEvent().

Here is the caller graph for this function:

void zbar::QZBarThread::decoded ( int  type,
const QString &  data 
)
signal

Referenced by image_callback(), and pushEvent().

Here is the caller graph for this function:

void zbar::QZBarThread::decodedText ( const QString &  data)
signal

Referenced by image_callback(), and pushEvent().

Here is the caller graph for this function:

void QZBarThread::enableVideo ( bool  enable)
protected
bool QZBarThread::event ( QEvent e)
protectedvirtual

References enableVideo(), Exit, running, ScanImage, scanImageEvent(), VideoDevice, videoDeviceEvent(), VideoEnabled, videoEnabledEvent(), and videoRunning.

Referenced by clear(), and run().

Here is the call graph for this function:

Here is the caller graph for this function:

void QZBarThread::image_callback ( Image image)
protectedvirtual

invoked by library when Image should be processed

Implements zbar::Image::Handler.

References test_zbar::data, decoded(), decodedText(), zbar::Image::symbol_begin(), zbar::Image::symbol_end(), and textFormat().

Referenced by clear().

Here is the call graph for this function:

Here is the caller graph for this function:

void QZBarThread::openVideo ( const QString &  device)
protected
zbar::Image::Handler::operator zbar_image_data_handler_t * ( ) const
inlineinherited

cast this handler to the C handler

References zbar::Image::Handler::_cb().

Here is the call graph for this function:

void QZBarThread::processImage ( Image image)
protected
void zbar::QZBarThread::pushEvent ( QEvent e)
inline
void QZBarThread::run ( )
protected

References clear(), enableVideo(), event(), image, mutex, newEvent, zbar::Video::next_image(), openVideo(), processImage(), queue, running, video, videoEnabled, and videoRunning.

Referenced by pushEvent().

Here is the caller graph for this function:

void QZBarThread::scanImageEvent ( ScanImageEvent event)
protectedvirtual

References clear(), enableVideo(), zbar::QZBarThread::ScanImageEvent::image, image, processImage(), and videoRunning.

Referenced by clear(), and event().

Here is the call graph for this function:

Here is the caller graph for this function:

void zbar::QZBarThread::update ( )
signal

Referenced by enableVideo(), openVideo(), processImage(), and pushEvent().

Here is the caller graph for this function:

void QZBarThread::videoDeviceEvent ( VideoDeviceEvent event)
protectedvirtual

References zbar::QZBarThread::VideoDeviceEvent::device, and openVideo().

Referenced by clear(), and event().

Here is the call graph for this function:

Here is the caller graph for this function:

void QZBarThread::videoEnabledEvent ( VideoEnabledEvent event)
protectedvirtual

References zbar::QZBarThread::VideoEnabledEvent::enabled, enableVideo(), videoEnabled, and videoRunning.

Referenced by clear(), and event().

Here is the call graph for this function:

Here is the caller graph for this function:

void zbar::QZBarThread::videoOpened ( bool  opened)
signal

Referenced by openVideo(), and pushEvent().

Here is the caller graph for this function:

Member Data Documentation

bool zbar::QZBarThread::_videoOpened
QZBarImage* zbar::QZBarThread::image
private
QWaitCondition zbar::QZBarThread::newEvent

Referenced by run().

QList<QEvent*> zbar::QZBarThread::queue

Referenced by run().

unsigned zbar::QZBarThread::reqHeight
unsigned zbar::QZBarThread::reqWidth
bool zbar::QZBarThread::running
private

Referenced by event(), and run().

ImageScanner zbar::QZBarThread::scanner
private
Video* zbar::QZBarThread::video
private

Referenced by enableVideo(), openVideo(), and run().

bool zbar::QZBarThread::videoEnabled
private
bool zbar::QZBarThread::videoRunning
private

The documentation for this class was generated from the following files: