The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.
enum | PrinterOption { PrintToFile, PrintSelection, PrintPageRange } |
bool | aborted () |
bool | collateCopiesEnabled () const |
bool | isOptionEnabled ( PrinterOption option ) const |
void | margins ( uint * top, uint * left, uint * bottom, uint * right ) const |
QSize | margins () const |
int | maxPage () const |
int | minPage () const |
bool | outputToFile () const |
bool | pageSetup ( QWidget * parent = 0 ) |
bool | printSetup ( QWidget * parent = 0 ) |
void | setCollateCopiesEnabled ( bool enable ) |
void | setMinMax ( int minPage, int maxPage ) |
void | setOptionEnabled ( PrinterOption option, bool enable ) |
void | setOutputToFile ( bool enable ) |
bool | setup ( QWidget * parent = 0 ) |
Use QAbstractPrintDialog::PrintDialogOption instead.
Constant | Value |
---|---|
QPrinter::PrintToFile | 0 |
QPrinter::PrintSelection | 1 |
QPrinter::PrintPageRange | 2 |
Use printerState() == QPrinter::Aborted instead.
Returns true if the printer is set up to collate copies of printed documents; otherwise returns false.
Use QPrintDialog::isOptionEnabled(QPrintDialog::PrintCollateCopies) instead.
See also setCollateCopiesEnabled() and collateCopies().
Use QPrintDialog instead.
Sets *top, *left, *bottom, *right to be the top, left, bottom, and right margins.
This function has been superseded by paperRect() and pageRect(). Use paperRect().top() - pageRect().top() for the top margin, paperRect().left() - pageRect().left() for the left margin, paperRect().bottom() - pageRect().bottom() for the bottom margin, and papaerRect().right() - pageRect().right() for the right margin.
For example, if you have code like
uint rightMargin; uint bottomMargin; printer->margins(0, 0, &bottomMargin, &rightMargin);
you can rewrite it as
int rightMargin = printer->paperRect().right() - printer->pageRect().right(); int bottomMargin = printer->paperRect().bottom() - printer->pageRect().bottom();
This is an overloaded function.
Returns a QSize containing the left margin and the top margin.
This function has been superseded by paperRect() and pageRect(). Use paperRect().left() - pageRect().left() for the left margin, and paperRect().top() - pageRect().top() for the top margin.
For example, if you have code like
QSize margins = printer->margins(); int leftMargin = margins.width(); int topMargin = margins.height();
you can rewrite it as
int leftMargin = printer->paperRect().left() - printer->pageRect().left(); int topMargin = printer->paperRect().top() - printer->pageRect().top();
Use QPrintDialog::maxPage() instead.
Use QPrintDialog::minPage() instead.
Returns true if the output should be written to a file, or false if the output should be sent directly to the printer. The default setting is false.
See also setOutputToFile() and setOutputFileName().
Executes a page setup dialog so that the user can configure the type of page used for printing. Returns true if the contents of the dialog are accepted; returns false if the dialog is canceled.
Executes a print setup dialog so that the user can configure the printing process. Returns true if the contents of the dialog are accepted; returns false if the dialog is canceled.
Use QPrintDialog::setOption(QPrintDialog::PrintCollateCopies) or QPrintDialog::setOptions(QPrintDialog::options() & ~QPrintDialog::PrintCollateCopies) instead, depending on enable.
See also collateCopiesEnabled().
Use QPrintDialog::setMinMax() instead.
Use QPrintDialog instead.
See also isOptionEnabled().
Specifies whether the output should be written to a file or sent directly to the printer.
Will output to a file if enable is true, or will output directly to the printer if enable is false.
See also outputToFile() and setOutputFileName().
Use QPrintDialog instead.
For example, if you have code like
if (printer->setup(parent)) ...
you can rewrite it as
QPrintDialog dialog(printer, parent); if (dialog.exec()) ...
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.