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

Measurements Class Reference

#include <measurements.h>

List of all members.

Detailed Description

This class keeps all measurements required to correctly draw a label. The measurements are available in pixels, milimeter and inch. This class allows also for transformations from inch to mm or pixels (and the other way round). Internally, everything is handled in mm.

Dominik Seichter

Definition at line 33 of file measurements.h.

Public Types

enum  { DpiX, DpiY }
enum  { Metric = KLocale::Metric, Imperial = KLocale::Imperial, None }

Public Member Functions

double gapH (const QPaintDevice *device) const
double gapH () const
double gapHMM () const
double gapLeft (const QPaintDevice *device) const
double gapLeft () const
double gapLeftMM () const
double gapTop (const QPaintDevice *device) const
double gapTop () const
double gapTopMM () const
double gapV (const QPaintDevice *device) const
double gapV () const
double gapVMM () const
double height (const QPaintDevice *device) const
double height () const
double heightMM () const
int numH () const
int numV () const
void operator= (const Measurements *m)
void setGapH (double d)
void setGapHMM (double d)
void setGapLeft (double d)
void setGapLeftMM (double d)
void setGapTop (double d)
void setGapTopMM (double d)
void setGapV (double d)
void setGapVMM (double d)
void setHeight (double d)
void setHeightMM (double d)
void setNumH (int n)
void setNumV (int n)
void setWidth (double d)
void setWidthMM (double d)
double width (const QPaintDevice *device) const
double width () const
double widthMM () const

Static Public Member Functions

static int measurementSystem ()
static const QString & system ()

Private Member Functions

void defaultMeasurements ()
double mmToPixel (double mm, const QPaintDevice *device, int mode=DpiX) const

Static Private Member Functions

static void init ()

Private Attributes

double gap_h
double gap_left
double gap_top
double gap_v
double m_height
double m_width
int num_h
int num_v

Static Private Attributes

static QString m_string = QString::null
static int m_system = None

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

Generated by  Doxygen 1.6.0   Back to index