ZBar Bar Code Reader Library  version 0.10
zbar::QZBarImage Class Reference

wrap a QImage and convert into a format suitable for scanning. More...

Inheritance diagram for zbar::QZBarImage:
Collaboration diagram for zbar::QZBarImage:

Public Member Functions

 QZBarImage (const QImage &qimg)
 construct a zbar library image based on an existing QImage. More...
 
Image convert (unsigned long format) const
 image format conversion. More...
 
Image convert (unsigned long format, unsigned width, unsigned height) const
 image format conversion with crop/pad. More...
 
const voidget_data () const
 return the image sample data. More...
 
unsigned long get_data_length () const
 return the size of the image sample data. More...
 
unsigned long get_format () const
 retrieve the image format. More...
 
unsigned get_height () const
 retrieve the height of the image. More...
 
unsigned get_sequence () const
 retrieve a "sequence" (page/frame) number associated with this image. More...
 
const SymbolSet get_symbols () const
 
unsigned get_width () const
 retrieve the width of the image. More...
 
 operator const zbar_image_t * () const
 cast to C image object More...
 
 operator zbar_image_t * ()
 cast to C image object More...
 
void set_data (const void *data, unsigned long length)
 specify image sample data. More...
 
void set_format (unsigned long format)
 specify the fourcc image format code for image sample data. More...
 
void set_format (const std::string &format)
 specify the fourcc image format code for image sample data. More...
 
void set_sequence (unsigned sequence_num)
 associate a "sequence" (page/frame) number with this image. More...
 
void set_size (unsigned width, unsigned height)
 specify the pixel size of the image. More...
 
void set_symbols (const SymbolSet &syms)
 
SymbolIterator symbol_begin () const
 create a new SymbolIterator over decoded results. More...
 
SymbolIterator symbol_end () const
 return a SymbolIterator suitable for ending iteration. More...
 

Static Protected Member Functions

static void _cleanup (zbar_image_t *img)
 default data cleanup (noop) More...
 

Private Attributes

QImage qimg
 

Detailed Description

wrap a QImage and convert into a format suitable for scanning.

Constructor & Destructor Documentation

zbar::QZBarImage::QZBarImage ( const QImage &  qimg)
inline

construct a zbar library image based on an existing QImage.

References scan_image::height, zbar::Image::set_data(), zbar::Image::set_format(), zbar::Image::set_size(), and scan_image::width.

Here is the call graph for this function:

Member Function Documentation

static void zbar::Image::_cleanup ( zbar_image_t img)
inlinestaticprotectedinherited

default data cleanup (noop)

References zbar::zbar_image_get_userdata().

Referenced by zbar::Image::set_data().

Here is the call graph for this function:

Here is the caller graph for this function:

Image zbar::Image::convert ( unsigned long  format) const
inlineinherited

image format conversion.

see zbar_image_convert()

References zbar::Image::_img, zbar::Image::Image(), and zbar::zbar_image_convert().

Referenced by zbar::QZBarThread::processImage().

Here is the call graph for this function:

Here is the caller graph for this function:

Image zbar::Image::convert ( unsigned long  format,
unsigned  width,
unsigned  height 
) const
inlineinherited

image format conversion with crop/pad.

see zbar_image_convert_resize()

Since
0.4

References zbar::Image::_img, zbar::Image::Image(), and zbar::zbar_image_convert_resize().

Here is the call graph for this function:

const void* zbar::Image::get_data ( ) const
inlineinherited

return the image sample data.

see zbar_image_get_data()

References zbar::Image::_img, and zbar::zbar_image_get_data().

Here is the call graph for this function:

unsigned long zbar::Image::get_data_length ( ) const
inlineinherited

return the size of the image sample data.

see zbar_image_get_data_length()

Since
0.6

References zbar::Image::_img, and zbar::zbar_image_get_data_length().

Here is the call graph for this function:

unsigned long zbar::Image::get_format ( ) const
inlineinherited

retrieve the image format.

see zbar_image_get_format()

References zbar::Image::_img, and zbar::zbar_image_get_format().

Here is the call graph for this function:

unsigned zbar::Image::get_height ( ) const
inlineinherited

retrieve the height of the image.

see zbar_image_get_height()

References zbar::Image::_img, and zbar::zbar_image_get_height().

Here is the call graph for this function:

unsigned zbar::Image::get_sequence ( ) const
inlineinherited

retrieve a "sequence" (page/frame) number associated with this image.

see zbar_image_get_sequence()

Since
0.6

References zbar::Image::_img, and zbar::zbar_image_get_sequence().

Here is the call graph for this function:

const SymbolSet zbar::Image::get_symbols ( ) const
inlineinherited

References zbar::Image::_img, and zbar::zbar_image_get_symbols().

Referenced by zbar::QZBarThread::processImage(), and zbar::Image::symbol_begin().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned zbar::Image::get_width ( ) const
inlineinherited

retrieve the width of the image.

see zbar_image_get_width()

References zbar::Image::_img, and zbar::zbar_image_get_width().

Here is the call graph for this function:

zbar::Image::operator const zbar_image_t * ( ) const
inlineinherited

cast to C image object

References zbar::Image::_img.

zbar::Image::operator zbar_image_t * ( )
inlineinherited

cast to C image object

References zbar::Image::_img.

void zbar::Image::set_data ( const void data,
unsigned long  length 
)
inlineinherited

specify image sample data.

see zbar_image_set_data()

References zbar::Image::_cleanup(), zbar::Image::_img, and zbar::zbar_image_set_data().

Referenced by zbar::Image::Image(), main(), and QZBarImage().

Here is the call graph for this function:

Here is the caller graph for this function:

void zbar::Image::set_format ( unsigned long  format)
inlineinherited

specify the fourcc image format code for image sample data.

see zbar_image_set_format()

References zbar::Image::_img, and zbar::zbar_image_set_format().

Referenced by zbar::Image::Image(), and QZBarImage().

Here is the call graph for this function:

Here is the caller graph for this function:

void zbar::Image::set_format ( const std::string &  format)
inlineinherited

specify the fourcc image format code for image sample data.

see zbar_image_set_format()

References zbar::Image::_img, fourcc, and zbar::zbar_image_set_format().

Here is the call graph for this function:

void zbar::Image::set_sequence ( unsigned  sequence_num)
inlineinherited

associate a "sequence" (page/frame) number with this image.

see zbar_image_set_sequence()

Since
0.6

References zbar::Image::_img, and zbar::zbar_image_set_sequence().

Here is the call graph for this function:

void zbar::Image::set_size ( unsigned  width,
unsigned  height 
)
inlineinherited

specify the pixel size of the image.

see zbar_image_set_size()

References zbar::Image::_img, and zbar::zbar_image_set_size().

Referenced by zbar::Image::Image(), and QZBarImage().

Here is the call graph for this function:

Here is the caller graph for this function:

void zbar::Image::set_symbols ( const SymbolSet syms)
inlineinherited

References zbar::Image::_img, and zbar::zbar_image_set_symbols().

Referenced by zbar::QZBarThread::processImage().

Here is the call graph for this function:

Here is the caller graph for this function:

SymbolIterator zbar::Image::symbol_begin ( ) const
inlineinherited

create a new SymbolIterator over decoded results.

References zbar::Image::get_symbols().

Referenced by zbar::QZBarThread::image_callback(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

SymbolIterator zbar::Image::symbol_end ( ) const
inlineinherited

return a SymbolIterator suitable for ending iteration.

Referenced by zbar::QZBarThread::image_callback(), and main().

Here is the caller graph for this function:

Member Data Documentation

QImage zbar::QZBarImage::qimg
private

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