Logo Search packages:      
Sourcecode: kbarcode version File versions  Download package

BarcodeCache Class Reference

#include <barcodecache.h>

Inheritance diagram for BarcodeCache:


List of all members.

Detailed Description

a application wide cache for barcodes.

This singleton is a application wide cache for Barcodes. The barcodes are saved to the harddisk as PNG files and can be read from the cache as QPixmaps. Generating barcodes is very slow. As a reason this cache greatly increases KBarcodes speed. Not only the PNG's are written to the harddisk, but also a XML index file.

Dominik Seichter

Definition at line 40 of file barcodecache.h.

Public Member Functions

void clear ()
unsigned int count () const
QPixmap * read (const barcodeData &b, int resolutionx, int resolutiony, const QString &value)
barcodeData readBarcode (QDomElement *tag, MyCanvasView *cv=0)
DefinitionreadDefinition (QDomElement *tag, QWidget *parent=0)
QColor readXMLColor (QDomElement *tag, const QString &prefix, QColor c)
QRect readXMLRect (QDomElement *tag, MyCanvasView *cv=0)
void setSize (unsigned int s)
unsigned int size () const
void write (const barcodeData &b, int resolutionx, int resolutiony, QPixmap *pix, const QString &value)
void writeBarcode (QDomElement *tag, const barcodeData *data, const CanvasBarcode *code=0, const MyCanvasView *cv=0, bool cache=false) const
void writeDefinition (QDomElement *tag, Definition *d) const
void writeXMLColor (QDomElement *tag, const QString &prefix, QColor c) const
void writeXMLRect (QDomElement *tag, QRect r, MyCanvasView *cv=0) const

Static Public Member Functions

static BarcodeCacheinstance ()

Private Slots

void flush ()

Private Member Functions

data fillStruct (const barcodeData &b, int resolutionx, int resolutiony)

Private Attributes

QValueList< data > m_data
QString m_dir
unsigned int m_size
QString m_xml

Static Private Attributes

static BarcodeCacheself = 0


struct  data

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

Generated by  Doxygen 1.6.0   Back to index