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

Definition Class Reference

#include <definition.h>

Inheritance diagram for Definition:

List of all members.


Detailed Description

A label definition;.

Represents a label definition. The definition is either read from a SQL database or from a text file on the harddisk. This class supports also writing new label definitions. After you selected a definition, you can retrieve its measurements.

Author:
Dominik Seichter

Definition at line 42 of file definition.h.


Public Member Functions

 Definition (const QString &producer, const QString &type)
 Definition (const QString &label_def_id)
 Definition (int label_def_id)
int getId () const
MeasurementsgetMeasurements () const
const QString getProducer () const
const QString getType () const
void setId (int label_def_id)
void setId (const QString &label_def_id)

Static Public Member Functions

static int getClosest (const QString &producer, const QString &type)
static const QStringList getProducers ()
static const QStringList getTypes (QString producer)
static void updateProducer ()
static int write (Measurements *c, QString type, QString producer)

Private Types

enum  _dpixy { DpiX, DpiY }

Private Member Functions

void getFileMeasurements (const QString &label_def_id)
const QString getModeFromCaption (const QString &cap)
const QString getTypeFromCaption (const QString &cap)
void init (const QString &label_def_id)
double mmToPixel (double mm, const QPaintDevice *device, int mode=DpiX)
double pixelToMm (double pixel, const QPaintDevice *device, int mode=DpiX)
double pixelToPixelX (double unit, const QPaintDevice *src, const QPaintDevice *dest)
double pixelToPixelY (double unit, const QPaintDevice *src, const QPaintDevice *dest)

Static Private Member Functions

static QPixmap * drawString (const QString &t)
static QPixmap * drawString (const QString &t, int w, int h, double rot=0)
static bool openFile ()
static void renderString (QPainter *painter, const QString &t, int w, int h, double scalex, double scaley)
static bool showFileError ()
static QSize stringSize (const QString &t)
static int writeFile (Measurements *c, QString type, QString producer)
static int writeSQL (Measurements *c, QString type, QString producer)

Private Attributes

int id
bool locked
Measurementsm
QString producer
QString type

Static Private Attributes

static QByteArray * array = 0
static QFile * file = 0
static QStringList * listProducers = 0
static QMap< QString, QStringList > mapTypes
static bool nodefmsg = true

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

Generated by  Doxygen 1.6.0   Back to index