13 #ifndef MAGICSMOKE_LABELDLG_H
14 #define MAGICSMOKE_LABELDLG_H
35 static void configDialog(QWidget*parent=0);
59 QString printerName()
const;
64 bool configurePrinter(QPrinter&)
const;
72 bool selectPrinter(QPrinter&printer,
bool force=
false);
98 PrintAskMode printAskMode()
const;
101 PageAskMode pageAskMode()
const;
114 PrintMode printMode()
const;
118 static QString tr(
const char*,
const char*c=0);
121 void storePrinter(QPrinter&);
123 void storeAskModes(PrintAskMode,PageAskMode);
125 void storePrintMode(PrintMode);
127 QString cgroup()
const;
146 MLabelDialog(QWidget*parent,QPrinter*printer,
int numlabels,QSizeF labelsize);
151 QPointF labelOffset(
int n)
const;
153 bool labelNeedsPageTurn(
int n)
const;
155 bool oneLabelPerPage()
const;
177 void toggleColumn(
int);
189 QLineEdit *offx,*offy,*sizex,*sizey;
192 QComboBox *metric,*page;
193 QList<QCheckBox*>checks;
194 QList<QList<bool> >checked;
196 int numlabels,oldpage,maxrows,maxcols;
199 int findLabel(
int n,
int&row,
int&col)
const;
208 explicit MLabelPrintDialog(QPrinter*,QWidget* parent = 0, Qt::WindowFlags f = 0);
210 void setButtonLabel(
const QString&);
212 void printerChanged(
int);
213 void paperChanged(
int);
214 void unitChanged(
int);
219 QComboBox*mprnselect,*mresolution,*mpaper,*munit;
220 QDoubleSpinBox*mmargleft,*mmargright,*mmargtop,*mmargbottom;
221 QDoubleSpinBox*msizex,*msizey;
222 QLabel*mdescript,*mlocation,*mmakemodel;
Dialog that allows to configure details on how to print a label.
Definition: labeldlg.h:204
#define MAGICSMOKE_COMMON_EXPORT
Definition: commonexport.h:7
PrintAskMode
whether to ask for a printer when printing labels
Definition: labeldlg.h:75
dialog that allows to select which labels on a sheet of paper are used
Definition: labeldlg.h:141
PrintMode
how to send data to the printer
Definition: labeldlg.h:104
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...
Definition: labeldlg.h:163
PageAskMode
whether to ask for the page layout when printing labels
Definition: labeldlg.h:86
MAGICSMOKE_COMMON_EXPORT QDataStream & operator>>(QDataStream &in, MLabelConfig &myObj)
Definition: labeldlg.cpp:174
Q_DECLARE_METATYPE(MLabelConfig)
MLabelConfig(LabelType lt)
instantiates a configuration object for the given label type
Definition: labeldlg.h:49
MLabelConfig & operator=(const MLabelConfig &lc)
copies the config object
Definition: labeldlg.h:53
MLabelConfig(const MLabelConfig &lc)
copies the config object
Definition: labeldlg.h:51
bool selectPrinter(QPrinter &printer, bool force=false)
configures the printer for this particular label type; whether the dialog is shown depends on setting...
Definition: labeldlg.cpp:495
MLabelConfig()
instantiate an empty configuration object
Definition: labeldlg.h:47
access to the label specific configuration
Definition: labeldlg.h:31
MAGICSMOKE_COMMON_EXPORT QDataStream & operator<<(QDataStream &out, const MLabelConfig &myObj)
Definition: labeldlg.cpp:168
LabelType
the type of label whose configuration is being queried
Definition: labeldlg.h:38
LabelType labelType() const
returns the type represented by this config object
Definition: labeldlg.h:56