Table Of Contents

Previous topic

QDialog

Next topic

QPrintDialog

QAbstractPrintDialog

Inherited by: QPrintDialog

Synopsis

Functions

Detailed Description

The PySide.QtGui.QAbstractPrintDialog class provides a base implementation for print dialogs used to configure printers.

This class implements getter and setter functions that are used to customize settings shown in print dialogs, but it is not used directly. Use PySide.QtGui.QPrintDialog to display a print dialog in your application.

In Symbian, there is no support for printing. Hence, this dialog should not be used in Symbian.

class PySide.QtGui.QAbstractPrintDialog(printer[, parent=None])
Parameters:

Constructs an abstract print dialog for printer with parent as parent widget.

PySide.QtGui.QAbstractPrintDialog.PrintRange

Used to specify the print range selection option.

Constant Description
QAbstractPrintDialog.AllPages All pages should be printed.
QAbstractPrintDialog.Selection Only the selection should be printed.
QAbstractPrintDialog.PageRange The specified page range should be printed.
QAbstractPrintDialog.CurrentPage Only the currently visible page should be printed. (This value was introduced in 4.7.)

See also

QPrinter.PrintRange

PySide.QtGui.QAbstractPrintDialog.PrintDialogOption

Used to specify which parts of the print dialog should be visible.

Constant Description
QAbstractPrintDialog.None None of the options are enabled.
QAbstractPrintDialog.PrintToFile The print to file option is enabled.
QAbstractPrintDialog.PrintSelection The print selection option is enabled.
QAbstractPrintDialog.PrintPageRange The page range selection option is enabled.
QAbstractPrintDialog.PrintShowPageSize Show the page size + margins page only if this is enabled.
QAbstractPrintDialog.PrintCollateCopies The collate copies option is enabled
QAbstractPrintDialog.PrintCurrentPage The print current page option is enabled (This value was introduced in 4.7.)

This value is obsolete and does nothing since Qt 4.5:

Constant Description
QAbstractPrintDialog.DontUseSheet In previous versions of Qt, exec() the print dialog would create a sheet by default the dialog was given a parent. This is no longer supported in Qt 4.5. If you want to use sheets, use QPrintDialog.open() instead.
PySide.QtGui.QAbstractPrintDialog.addEnabledOption(option)
Parameters:optionPySide.QtGui.QAbstractPrintDialog.PrintDialogOption

Use QPrintDialog::setOption(option , true) instead.

PySide.QtGui.QAbstractPrintDialog.enabledOptions()
Return type:PySide.QtGui.QAbstractPrintDialog.PrintDialogOptions

Use QPrintDialog.options() instead.

PySide.QtGui.QAbstractPrintDialog.fromPage()
Return type:PySide.QtCore.int

Returns the first page to be printed By default, this value is set to 0.

PySide.QtGui.QAbstractPrintDialog.isOptionEnabled(option)
Parameters:optionPySide.QtGui.QAbstractPrintDialog.PrintDialogOption
Return type:PySide.QtCore.bool

Use QPrintDialog::testOption(option ) instead.

PySide.QtGui.QAbstractPrintDialog.maxPage()
Return type:PySide.QtCore.int

Returns the maximum page in the page range. As of Qt 4.4, this function returns INT_MAX by default. Previous versions returned 1 by default.

PySide.QtGui.QAbstractPrintDialog.minPage()
Return type:PySide.QtCore.int

Returns the minimum page in the page range. By default, this value is set to 1.

PySide.QtGui.QAbstractPrintDialog.printRange()
Return type:PySide.QtGui.QAbstractPrintDialog.PrintRange

Returns the print range.

PySide.QtGui.QAbstractPrintDialog.printer()
Return type:PySide.QtGui.QPrinter

Returns the printer that this printer dialog operates on.

PySide.QtGui.QAbstractPrintDialog.setEnabledOptions(options)
Parameters:optionsPySide.QtGui.QAbstractPrintDialog.PrintDialogOptions
PySide.QtGui.QAbstractPrintDialog.setFromTo(fromPage, toPage)
Parameters:
  • fromPagePySide.QtCore.int
  • toPagePySide.QtCore.int

Sets the range in the print dialog to be from from to to .

PySide.QtGui.QAbstractPrintDialog.setMinMax(min, max)
Parameters:
  • minPySide.QtCore.int
  • maxPySide.QtCore.int

Sets the page range in this dialog to be from min to max . This also enables the PrintPageRange option.

PySide.QtGui.QAbstractPrintDialog.setOptionTabs(tabs)
Parameters:tabs
PySide.QtGui.QAbstractPrintDialog.setPrintRange(range)
Parameters:rangePySide.QtGui.QAbstractPrintDialog.PrintRange

Sets the print range option in to be range .

PySide.QtGui.QAbstractPrintDialog.toPage()
Return type:PySide.QtCore.int

Returns the last page to be printed. By default, this value is set to 0.