MagicSmoke
$VERSION$
|
access to the label specific configuration More...
#include <labeldlg.h>
Public Types | |
enum | LabelType { Invalid =0, Ticket =1, Voucher =2 } |
the type of label whose configuration is being queried More... | |
enum | PageAskMode { PageAskAlways =0, PageAskIfNeeded =1, PageAskNever =2 } |
whether to ask for the page layout when printing labels More... | |
enum | PrintAskMode { PrintAskAlways =0, PrintAskIfUnknown =1, PrintAskNever =2 } |
whether to ask for a printer when printing labels More... | |
enum | PrintMode { PrintDirect =0, PrintPixmap =1 } |
how to send data to the printer More... | |
Public Member Functions | |
MLabelConfig () | |
instantiate an empty configuration object More... | |
MLabelConfig (LabelType lt) | |
instantiates a configuration object for the given label type More... | |
MLabelConfig (const MLabelConfig &lc) | |
copies the config object More... | |
bool | configurePrinter (QPrinter &) const |
configures the QPrinter object to the printer set for this label type; use selectPrinter if you want to fall back to a selection dialog More... | |
LabelType | labelType () const |
returns the type represented by this config object More... | |
MLabelConfig & | operator= (const MLabelConfig &lc) |
copies the config object More... | |
PageAskMode | pageAskMode () const |
returns the policy for asking for page layout More... | |
PrintAskMode | printAskMode () const |
returns the policy for asking for a printer More... | |
QString | printerName () const |
returns the configured printer name (even if not available on the local system) More... | |
PrintMode | printMode () const |
returns how to send data to the printer More... | |
bool | selectPrinter (QPrinter &printer, bool force=false) |
configures the printer for this particular label type; whether the dialog is shown depends on settings and printer availability; if the dialog is shown the function remembers the new printer settings More... | |
Static Public Member Functions | |
static void | configDialog (QWidget *parent=0) |
shows the configuration dialog More... | |
Friends | |
QDataStream & | operator<< (QDataStream &, const MLabelConfig &) |
QDataStream & | operator>> (QDataStream &, MLabelConfig &) |
access to the label specific configuration
|
inline |
instantiate an empty configuration object
|
inline |
instantiates a configuration object for the given label type
|
inline |
copies the config object
|
static |
shows the configuration dialog
References configurePrinter(), PageAskAlways, PageAskIfNeeded, pageAskMode(), PageAskNever, PrintAskAlways, PrintAskIfUnknown, printAskMode(), PrintAskNever, printerName(), printMode(), MLabelPrintDialog::setButtonLabel(), Ticket, and Voucher.
bool MLabelConfig::configurePrinter | ( | QPrinter & | prn | ) | const |
configures the QPrinter object to the printer set for this label type; use selectPrinter if you want to fall back to a selection dialog
References dumpPrn().
Referenced by configDialog(), and selectPrinter().
|
inline |
returns the type represented by this config object
|
inline |
copies the config object
MLabelConfig::PageAskMode MLabelConfig::pageAskMode | ( | ) | const |
returns the policy for asking for page layout
References PageAskIfNeeded.
Referenced by configDialog().
MLabelConfig::PrintAskMode MLabelConfig::printAskMode | ( | ) | const |
returns the policy for asking for a printer
References PrintAskIfUnknown.
Referenced by configDialog(), and selectPrinter().
QString MLabelConfig::printerName | ( | ) | const |
returns the configured printer name (even if not available on the local system)
Referenced by configDialog().
MLabelConfig::PrintMode MLabelConfig::printMode | ( | ) | const |
bool MLabelConfig::selectPrinter | ( | QPrinter & | printer, |
bool | force = false |
||
) |
configures the printer for this particular label type; whether the dialog is shown depends on settings and printer availability; if the dialog is shown the function remembers the new printer settings
printer | pointer to the QPrinter object to be configured |
force | if true: force showing the printer dialog |
References configurePrinter(), PrintAskAlways, PrintAskIfUnknown, printAskMode(), and PrintAskNever.
Referenced by MLabelDialog::selectPrinter().
|
friend |
|
friend |