MagicSmoke  $VERSION$
code39.cpp File Reference
#include "code39.h"
#include <QMap>
#include <QPainter>

Functions

QImage code39 (QString str)
 Takes a string and converts it into a code-39 bar code. More...
 
static char code39mod (QString str)
 
static QMap< char, QString > initmap ()
 

Variables

static const QMap< char, QString > c39map =initmap()
 
static const QString c39mod ="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%"
 

Function Documentation

QImage code39 ( QString  )

Takes a string and converts it into a code-39 bar code.

Code-39 allows letters (case-insensitive), digits, spaces and the special chars "-.$/+%". The bar code pixmap will be 1 pixel high and 16 pixels wide for each character (plus start/stop character and checksum character) - it needs to be scaled up to fit the intended size.

References c39map, c39mod, and code39mod().

static char code39mod ( QString  str)
static

References c39mod.

Referenced by code39().

static QMap<char,QString> initmap ( )
static

Variable Documentation

const QMap<char,QString> c39map =initmap()
static

Referenced by code39().

const QString c39mod ="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%"
static

Referenced by code39(), and code39mod().