MagicSmoke  $VERSION$
MLabelDialog Class Reference

dialog that allows to select which labels on a sheet of paper are used More...

#include <labeldlg.h>

Inheritance diagram for MLabelDialog:

Public Slots

bool conditionalExec (MLabelConfig::LabelType)
 shows the dialog if necessary - this depends on the local configuration for this label type if not shown it returns true (presuming the user would have wanted to print) if shown it returns true if the user clicked "Ok" and false otherwise More...
 

Public Member Functions

 MLabelDialog (QWidget *parent, QPrinter *printer, int numlabels, QSizeF labelsize)
 creates a label dialog More...
 
 ~MLabelDialog ()
 deletes the label dialog and stores its current settings More...
 
bool labelNeedsPageTurn (int n) const
 returns whether this label is on a new page More...
 
QPointF labelOffset (int n) const
 returns the offset of label number n; relative to the coordinate system of the given paint device; starts at the bottom left of the page More...
 
bool oneLabelPerPage () const
 returns whether there is only one label per page More...
 

Static Public Member Functions

static bool selectPrinter (MLabelConfig::LabelType type, QPrinter &printer, bool force=false)
 configures the printer for this particular label type whether the dialog is shown depends on settings and printer availability More...
 

Detailed Description

dialog that allows to select which labels on a sheet of paper are used

Constructor & Destructor Documentation

MLabelDialog::MLabelDialog ( QWidget *  parent,
QPrinter *  printer,
int  numlabels,
QSizeF  labelsize 
)

creates a label dialog

References COLS, and ROWS.

MLabelDialog::~MLabelDialog ( )

deletes the label dialog and stores its current settings

Member Function Documentation

bool MLabelDialog::conditionalExec ( MLabelConfig::LabelType  lt)
slot

shows the dialog if necessary - this depends on the local configuration for this label type if not shown it returns true (presuming the user would have wanted to print) if shown it returns true if the user clicked "Ok" and false otherwise

References oneLabelPerPage(), MLabelConfig::PageAskAlways, MLabelConfig::PageAskIfNeeded, and MLabelConfig::PageAskNever.

bool MLabelDialog::labelNeedsPageTurn ( int  n) const

returns whether this label is on a new page

References COLS.

QPointF MLabelDialog::labelOffset ( int  n) const

returns the offset of label number n; relative to the coordinate system of the given paint device; starts at the bottom left of the page

bool MLabelDialog::oneLabelPerPage ( ) const

returns whether there is only one label per page

Referenced by conditionalExec().

static bool MLabelDialog::selectPrinter ( MLabelConfig::LabelType  type,
QPrinter &  printer,
bool  force = false 
)
inlinestatic

configures the printer for this particular label type whether the dialog is shown depends on settings and printer availability

Parameters
typetype of label
printerpointer to the QPrinter object to be configured
forceif true: force showing the printer dialog
Returns
true if the selection was successful

References MLabelConfig::selectPrinter().


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