Qt 4.8
qprintdialog_qws.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #include "qplatformdefs.h"
43 
44 #include <private/qabstractprintdialog_p.h>
45 #include "qprintdialog.h"
46 
47 #ifndef QT_NO_PRINTDIALOG
48 
49 #include "qapplication.h"
50 #include "qbuttongroup.h"
51 #include "qradiobutton.h"
52 #include "qcombobox.h"
53 #include "qspinbox.h"
54 #include "qprinter.h"
55 #include "qlineedit.h"
56 #include "qdir.h"
57 #include "qmessagebox.h"
58 #include "qinputdialog.h"
59 #include "qlayout.h"
60 #include "qlabel.h"
61 
62 #include "qlibrary.h"
63 
64 #ifndef QT_NO_NIS
65 
66 #ifndef BOOL_DEFINED
67 #define BOOL_DEFINED
68 #endif
69 
70 #include <rpcsvc/ypclnt.h>
71 #include <rpcsvc/yp_prot.h>
72 
73 #endif //QT_NO_NIS
74 
75 #include <ctype.h>
76 #include <stdlib.h>
77 
78 #include <qdebug.h>
79 
81 
82 typedef void (*QPrintDialogCreator)(QPrintDialog *parent);
84 
86 {
88 public:
94 
99 
103 
107 
111 
114 
116 
117  void init();
118 
119  void _q_okClicked();
121  void _q_paperSizeSelected(int);
122  void _q_orientSelected(int);
123  void _q_pageOrderSelected(int);
125  void _q_setNumCopies(int);
126  void _q_printRangeSelected(int);
127  void _q_setFirstPage(int);
128  void _q_setLastPage(int);
129  void _q_fileNameEditChanged(const QString &text);
130 
131  void setupDestination();
132  void setupPrinterSettings();
133  void setupPaper();
134  void setupOptions();
135 
136  void setPrinter(QPrinter *p, bool pickUpSettings);
137 };
138 
139 static void isc(QPrintDialogPrivate *d, const QString & text,
141 
143 {
144  Q_Q(QPrintDialog);
145 #ifndef QT_NO_MESSAGEBOX
146  if (outputToFile && fileName->isModified() && QFileInfo(fileName->text()).exists()) {
147  int confirm = QMessageBox::warning(
148  q, QPrintDialog::tr("File exists"),
149  QPrintDialog::tr("<qt>Do you want to overwrite it?</qt>"),
151  if (confirm == QMessageBox::No)
152  return;
153  }
154 #endif // QT_NO_MESSAGEBOX
155 
159  if (outputToFile) {
161  }
167 
168  switch ((rangeCombo->itemData(rangeCombo->currentIndex())).toInt()){
169  case (int)QPrintDialog::AllPages:
170  q->setPrintRange(QPrintDialog::AllPages);
171  q->setFromTo(0, 0);
172  break;
173  case (int)QPrintDialog::Selection:
174  q->setPrintRange(QPrintDialog::Selection);
175  q->setFromTo(0, 0);
176  break;
177  case (int)QPrintDialog::PageRange:
178  q->setPrintRange(QPrintDialog::PageRange);
179  q->setFromTo(firstPage->value(), lastPage->value());
180  break;
181  case (int)QPrintDialog::CurrentPage:
182  q->setPrintRange(QPrintDialog::CurrentPage);
183  q->setFromTo(0, 0);
184  break;
185  }
186  q->accept();
187 }
188 
190 {
192  if (outputToFile) {
194  if (!fileName->isModified() && fileName->text().isEmpty()) {
195  QString file = "print.tiff";
196  fileName->setText(file);
198  fileName->selectAll();
199  fileName->setModified(true); // confirm overwrite when OK clicked
200 
201  }
202  fileName->setEnabled(true);
203  fileName->setFocus();
204  } else {
206  if (fileName->isEnabled())
207  fileName->setEnabled(false);
208  }
209 }
210 
212 {
213  if (id < QPrinter::NPaperSize)
215 }
216 
218 {
220 }
221 
223 {
225 }
226 
228 {
230 }
231 
233 {
234  numCopies = copies;
235 }
236 
238 {
239  bool enable = (rangeCombo->itemData(id).toInt() == (int)QPrintDialog::PageRange);
240  firstPage->setEnabled(enable);
241  lastPage->setEnabled(enable);
242 }
243 
245 {
246  Q_Q(QPrintDialog);
247  if (printer) {
248  lastPage->setMinimum(fp);
249  lastPage->setMaximum(qMax(fp, q->maxPage()));
250  }
251 }
252 
254 {
255  Q_Q(QPrintDialog);
256  if (printer) {
257  firstPage->setMinimum(qMin(lp, q->minPage()));
258  firstPage->setMaximum(lp);
259  }
260 }
261 
263 {
264  Q_UNUSED(text);
265 }
266 
268 {
269  Q_Q(QPrintDialog);
270 
271  // print destinations
272  printerOrFile = new QButtonGroup(q);
275 
276  printToPrinterButton = q->findChild<QRadioButton *>("printToPrinterButton");
278  printToFileButton = q->findChild<QRadioButton *>("printToFileButton");
280 
281  // file name
282  fileName = q->findChild<QLineEdit *>("fileName");
283  QObject::connect(fileName, SIGNAL(textChanged(QString)),
285 
286  outputToFile = false;
287 }
288 
290 {
291  Q_Q(QPrintDialog);
292 
293  // color mode
294  colorMode = new QButtonGroup(q);
297 
298  printColor = q->findChild<QRadioButton *>("printColor");
300  printGray = q->findChild<QRadioButton *>("printGray");
302 }
303 
305 {
306  if (ptr && !text.isEmpty() && ps < QPrinter::NPaperSize) {
307  ptr->sizeCombo->addItem(text);
308  int index = ptr->sizeCombo->count()-1;
309  if (index >= 0 && index < QPrinter::NPaperSize)
310  ptr->indexToPaperSize[index] = ps;
311  }
312 }
313 
315 {
316  Q_Q(QPrintDialog);
317 
319 
320  // paper orientation
321  orientationCombo = q->findChild<QComboBox *>("orientationCombo");
323  QObject::connect(orientationCombo, SIGNAL(activated(int)),
324  q, SLOT(_q_orientSelected(int)));
325 
326  // paper size
327  sizeCombo = q->findChild<QComboBox *>("sizeCombo");
328 
329  int n;
330  for(n=0; n<QPrinter::NPaperSize; n++)
332 
333  isc(this, QPrintDialog::tr("A0 (841 x 1189 mm)"), QPrinter::A0);
334  isc(this, QPrintDialog::tr("A1 (594 x 841 mm)"), QPrinter::A1);
335  isc(this, QPrintDialog::tr("A2 (420 x 594 mm)"), QPrinter::A2);
336  isc(this, QPrintDialog::tr("A3 (297 x 420 mm)"), QPrinter::A3);
337  isc(this, QPrintDialog::tr("A4 (210 x 297 mm, 8.26 x 11.7 inches)"), QPrinter::A4);
338  isc(this, QPrintDialog::tr("A5 (148 x 210 mm)"), QPrinter::A5);
339  isc(this, QPrintDialog::tr("A6 (105 x 148 mm)"), QPrinter::A6);
340  isc(this, QPrintDialog::tr("A7 (74 x 105 mm)"), QPrinter::A7);
341  isc(this, QPrintDialog::tr("A8 (52 x 74 mm)"), QPrinter::A8);
342  isc(this, QPrintDialog::tr("A9 (37 x 52 mm)"), QPrinter::A9);
343  isc(this, QPrintDialog::tr("B0 (1000 x 1414 mm)"), QPrinter::B0);
344  isc(this, QPrintDialog::tr("B1 (707 x 1000 mm)"), QPrinter::B1);
345  isc(this, QPrintDialog::tr("B2 (500 x 707 mm)"), QPrinter::B2);
346  isc(this, QPrintDialog::tr("B3 (353 x 500 mm)"), QPrinter::B3);
347  isc(this, QPrintDialog::tr("B4 (250 x 353 mm)"), QPrinter::B4);
348  isc(this, QPrintDialog::tr("B5 (176 x 250 mm, 6.93 x 9.84 inches)"), QPrinter::B5);
349  isc(this, QPrintDialog::tr("B6 (125 x 176 mm)"), QPrinter::B6);
350  isc(this, QPrintDialog::tr("B7 (88 x 125 mm)"), QPrinter::B7);
351  isc(this, QPrintDialog::tr("B8 (62 x 88 mm)"), QPrinter::B8);
352  isc(this, QPrintDialog::tr("B9 (44 x 62 mm)"), QPrinter::B9);
353  isc(this, QPrintDialog::tr("B10 (31 x 44 mm)"), QPrinter::B10);
354  isc(this, QPrintDialog::tr("C5E (163 x 229 mm)"), QPrinter::C5E);
355  isc(this, QPrintDialog::tr("DLE (110 x 220 mm)"), QPrinter::DLE);
356  isc(this, QPrintDialog::tr("Executive (7.5 x 10 inches, 191 x 254 mm)"), QPrinter::Executive);
357  isc(this, QPrintDialog::tr("Folio (210 x 330 mm)"), QPrinter::Folio);
358  isc(this, QPrintDialog::tr("Ledger (432 x 279 mm)"), QPrinter::Ledger);
359  isc(this, QPrintDialog::tr("Legal (8.5 x 14 inches, 216 x 356 mm)"), QPrinter::Legal);
360  isc(this, QPrintDialog::tr("Letter (8.5 x 11 inches, 216 x 279 mm)"), QPrinter::Letter);
361  isc(this, QPrintDialog::tr("Tabloid (279 x 432 mm)"), QPrinter::Tabloid);
362  isc(this, QPrintDialog::tr("US Common #10 Envelope (105 x 241 mm)"), QPrinter::Comm10E);
363 
364  QObject::connect(sizeCombo, SIGNAL(activated(int)),
365  q, SLOT(_q_paperSizeSelected(int)));
366 }
367 
369 {
370  Q_Q(QPrintDialog);
371 
372  // no. of copies
373  copies = q->findChild<QSpinBox *>("copies");
374  QObject::connect(copies, SIGNAL(valueChanged(int)),
375  q, SLOT(_q_setNumCopies(int)));
376 
377  // print range
378  rangeCombo = q->findChild<QComboBox *>("rangeCombo");
383  QObject::connect(rangeCombo, SIGNAL(activated(int)),
384  q, SLOT(_q_printRangeSelected(int)));
385 
386  // page range
387  firstPage = q->findChild<QSpinBox *>("firstPage");
388  firstPage->setRange(1, 9999);
389  firstPage->setValue(1);
390  QObject::connect(firstPage, SIGNAL(valueChanged(int)),
391  q, SLOT(_q_setFirstPage(int)));
392 
393  lastPage = q->findChild<QSpinBox *>("lastPage");
394  lastPage->setRange(1, 9999);
395  lastPage->setValue(1);
396  QObject::connect(lastPage, SIGNAL(valueChanged(int)),
397  q, SLOT(_q_setLastPage(int)));
398 
399  // print order
400  pageOrderCombo = q->findChild<QComboBox *>("pageOrderCombo");
401  QObject::connect(pageOrderCombo, SIGNAL(activated(int)),
402  q, SLOT(_q_pageOrderSelected(int)));
403 }
404 
406 {
407  Q_UNUSED(o);
408 
409  Q_D(QPrintDialog);
410  switch (e->type()){
411  case QEvent::KeyPress:
412  switch (static_cast<QKeyEvent*>(e)->key()) {
413  case Qt::Key_Back:
414  d->_q_okClicked();
415  return true;
416  }
417  break;
418  default:
419  break;
420  }
421  return false;
422 }
423 
425  : QAbstractPrintDialog(*(new QPrintDialogPrivate), printer, parent)
426 {
427  d_func()->init();
428 }
429 
431  : QAbstractPrintDialog(*(new QPrintDialogPrivate), 0, parent)
432 {
433  d_func()->init();
434 }
435 
437 {
438 }
439 
440 void QPrintDialogPrivate::setPrinter(QPrinter *p, bool pickUpSettings)
441 {
442  Q_Q(QPrintDialog);
443  printer = p;
444 
445  if (p && pickUpSettings) {
446  // top to bottom in the old dialog.
447  // printer or file
448  outputToFile = !p->outputFileName().isEmpty() && q->isOptionEnabled(QPrintDialog::PrintToFile);
449  if (outputToFile)
451  else
454 
455  // file name
456  if (q->isOptionEnabled(QPrintDialog::PrintToFile)) {
459  } else {
461  }
462 
463  // orientation
466 
467  // page size
468  int n = 0;
469  while (n < QPrinter::NPaperSize &&
470  indexToPaperSize[n] != p->pageSize())
471  n++;
474 
475  // page order
476  pageOrder2 = p->pageOrder();
478 
479  // color mode
480  colorMode2 = p->colorMode();
482  printColor->setChecked(true);
483  else
484  printGray->setChecked(true);
485 
486  // number of copies
487  copies->setValue(p->copyCount());
489  }
490 
491  if (p) {
492  if (!q->isOptionEnabled(QPrintDialog::PrintSelection)
495  if (!q->isOptionEnabled(QPrintDialog::PrintPageRange)
498  if (!q->isOptionEnabled(QPrintDialog::PrintCurrentPage)
501 
502  switch (q->printRange()) {
505  break;
508  break;
511  break;
514  break;
515  }
516  }
517 
518  if (p && q->maxPage()) {
519  int from = q->minPage();
520  int to = q->maxPage();
521  if (q->printRange() == QPrintDialog::PageRange) {
522  from = q->fromPage();
523  to = q->toPage();
524  }
525  firstPage->setRange(q->minPage(), to);
526  lastPage->setRange(from, q->maxPage());
527  firstPage->setValue(from);
528  lastPage->setValue(to);
529  }
530 }
531 
532 int QPrintDialog::exec()
533 {
534  Q_D(QPrintDialog);
535  d->setPrinter(d->printer, true);
536  return QDialog::exec();
537 }
538 
540 {
541  Q_Q(QPrintDialog);
542  numCopies = 1;
543 
545  (*_qt_print_dialog_creator)(q);
546 
549  setupPaper();
550  setupOptions();
551 
552  setPrinter(printer, true);
553 
554  q->installEventFilter(q);
555 }
556 
557 void QPrintDialog::setVisible(bool visible)
558 {
560 }
561 
563 
564 #include "moc_qprintdialog.cpp"
565 #include "qrc_qprintdialog.cpp"
566 
567 #endif // QT_NO_PRINTDIALOG
The QAbstractButton class is the abstract base class of button widgets, providing functionality commo...
QPrinter::ColorMode colorMode2
void setPageOrder(PageOrder)
Sets the page order to pageOrder.
Definition: qprinter.cpp:1271
double d
Definition: qnumeric_p.h:62
int findData(const QVariant &data, int role=Qt::UserRole, Qt::MatchFlags flags=static_cast< Qt::MatchFlags >(Qt::MatchExactly|Qt::MatchCaseSensitive)) const
Returns the index of the item containing the given data for the given role; otherwise returns -1...
Definition: qcombobox.cpp:1572
void _q_colorModeSelected(QAbstractButton *)
Q_DECL_CONSTEXPR const T & qMin(const T &a, const T &b)
Definition: qglobal.h:1215
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
static void isc(QPrintDialogPrivate *d, const QString &text, QPrinter::PaperSize ps)
bool isModified() const
Definition: qlineedit.cpp:968
int exec()
Shows the dialog as a modal dialog, blocking until the user closes it.
Definition: qdialog.cpp:524
#define Q_GUI_EXPORT
Definition: qglobal.h:1450
int length() const
Returns the number of characters in this string.
Definition: qstring.h:696
#define SLOT(a)
Definition: qobjectdefs.h:226
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
Orientation
This enum type (not to be confused with Orientation) is used to specify each page&#39;s orientation...
Definition: qprinter.h:78
QButtonGroup * printerOrFile
void interpretText()
This function interprets the text of the spin box.
void(* QPrintDialogCreator)(QPrintDialog *parent)
QPrinter::Orientation orientation
static QString tr(const char *sourceText, const char *comment=0, int n=-1)
void setValue(int val)
Definition: qspinbox.cpp:268
void setCurrentIndex(int index)
Definition: qcombobox.cpp:2102
void addButton(QAbstractButton *)
Adds the given button to the end of the group&#39;s internal list of buttons.
void setPaperSize(PaperSize)
Sets the printer paper size to newPaperSize if that size is supported.
Definition: qprinter.cpp:1163
The QString class provides a Unicode character string.
Definition: qstring.h:83
QPrinter::PageOrder pageOrder2
QString outputFileName() const
Returns the name of the output file.
Definition: qprinter.cpp:950
The QObject class is the base class of all Qt objects.
Definition: qobject.h:111
void addItem(const QString &text, const QVariant &userData=QVariant())
Adds an item to the combobox with the given text, and containing the specified userData (stored in th...
Definition: qcombobox.h:323
#define Q_D(Class)
Definition: qglobal.h:2482
void setRange(int min, int max)
Convenience function to set the minimum, and maximum values with a single function call...
Definition: qspinbox.cpp:474
static StandardButton warning(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton)
Opens a warning message box with the given title and text in front of the specified parent widget...
QPrinter::PaperSize indexToPaperSize[QPrinter::NPaperSize]
PageSize pageSize() const
Returns the printer page size.
Definition: qprinter.cpp:1187
void setOrientation(Orientation)
Sets the print orientation to orientation.
Definition: qprinter.cpp:1122
Q_DECL_CONSTEXPR const T & qMax(const T &a, const T &b)
Definition: qglobal.h:1217
QRadioButton * printColor
QVariant itemData(int index, int role=Qt::UserRole) const
Returns the data for the given role in the given index in the combobox, or QVariant::Invalid if there...
Definition: qcombobox.cpp:2182
#define Q_Q(Class)
Definition: qglobal.h:2483
void setCopyCount(int)
Sets the number of copies to be printed to count.
Definition: qprinter.cpp:1411
int toInt(bool *ok=0) const
Returns the variant as an int if the variant has type() Int , Bool , ByteArray , Char ...
Definition: qvariant.cpp:2625
~QPrintDialog()
Destroys the print dialog.
#define SIGNAL(a)
Definition: qobjectdefs.h:227
The QPrintDialog class provides a dialog for specifying the printer&#39;s configuration.
Definition: qprintdialog.h:81
The QRadioButton widget provides a radio button with a text label.
Definition: qradiobutton.h:56
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
void setModified(bool)
Definition: qlineedit.cpp:974
QRadioButton * printToPrinterButton
Orientation orientation() const
Returns the orientation setting.
Definition: qprinter.cpp:1098
static bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
Creates a connection of the given type from the signal in the sender object to the method in the rece...
Definition: qobject.cpp:2580
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
Definition: qstring.h:704
void _q_printerOrFileSelected(QAbstractButton *b)
QString text
the line edit&#39;s text
Definition: qlineedit.h:72
QPrinter::PaperSize pageSize
The QPrinter class is a paint device that paints on a printer.
Definition: qprinter.h:66
The QComboBox widget is a combined button and popup list.
Definition: qcombobox.h:62
T findChild(const QString &aName=QString()) const
Returns the child of this object that can be cast into type T and that is called name, or 0 if there is no such object.
Definition: qobject.h:158
const T * ptr(const T &t)
int exec()
Reimplemented Function
ColorMode colorMode() const
Returns the current color mode.
Definition: qprinter.cpp:1314
void setColorMode(ColorMode)
Sets the printer&#39;s color mode to newColorMode, which can be either Color or GrayScale.
Definition: qprinter.cpp:1300
QRadioButton * printGray
void setEnabled(bool)
Definition: qwidget.cpp:3447
bool isEnabled() const
Definition: qwidget.h:948
void setText(const QString &)
Definition: qlineedit.cpp:401
void _q_fileNameEditChanged(const QString &text)
int value
the value of the spin box
Definition: qspinbox.h:66
void setFocus()
Gives the keyboard input focus to this widget (or its focus proxy) if this widget or one of its paren...
Definition: qwidget.h:432
The QAbstractPrintDialog class provides a base implementation for print dialogs used to configure pri...
#define Q_DECLARE_PUBLIC(Class)
Definition: qglobal.h:2477
void setPrinter(QPrinter *p, bool pickUpSettings)
void removeItem(int index)
Removes the item at the given index from the combobox.
Definition: qcombobox.cpp:2337
PaperSize
This enum type specifies what paper size QPrinter should use.
Definition: qprinter.h:91
bool eventFilter(QObject *, QEvent *)
Reimplemented Function
Definition: qdialog.cpp:656
ColorMode
This enum type is used to indicate whether QPrinter should print in color or not. ...
Definition: qprinter.h:100
The QSpinBox class provides a spin box widget.
Definition: qspinbox.h:56
The QLineEdit widget is a one-line text editor.
Definition: qlineedit.h:66
quint16 index
PageOrder
This enum type is used by QPrinter to tell the application program how to print.
Definition: qprinter.h:97
QObject * parent
Definition: qobject.h:92
int copyCount() const
Returns the number of copies that will be printed.
Definition: qprinter.cpp:1430
int count
the number of items in the combobox
Definition: qcombobox.h:69
void setVisible(bool visible)
Reimplemented Function
int currentIndex
the index of the current item in the combobox.
Definition: qcombobox.h:71
QRadioButton * printToFileButton
QButtonGroup * colorMode
void setCursorPosition(int)
Definition: qlineedit.cpp:758
void selectAll()
Selects all the text (i.e.
Definition: qlineedit.cpp:1405
Q_GUI_EXPORT QPrintDialogCreator _qt_print_dialog_creator
The QFileInfo class provides system-independent file information.
Definition: qfileinfo.h:60
void setMinimum(int min)
Definition: qspinbox.cpp:425
The QEvent class is the base class of all event classes.
Definition: qcoreevent.h:56
Type type() const
Returns the event type.
Definition: qcoreevent.h:303
void setVisible(bool visible)
Reimplemented Function
Definition: qdialog.cpp:756
The QButtonGroup class provides a container to organize groups of button widgets. ...
Definition: qbuttongroup.h:59
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
void setMaximum(int max)
Definition: qspinbox.cpp:456
QPrintDialog(QPrinter *printer, QWidget *parent=0)
Constructs a new modal printer dialog for the given printer with the given parent.
PageOrder pageOrder() const
Returns the current page order.
Definition: qprinter.cpp:1286
#define text
Definition: qobjectdefs.h:80
void setOutputFileName(const QString &)
Sets the name of the output file to fileName.
Definition: qprinter.cpp:976