• PySide 模块
  • PySide.QtGui
  • 内容表

    上一话题

    QDialog

    下一话题

    QPrintDialog

    QAbstractPrintDialog

    继承者: QPrintDialog

    概要

    函数

    详细描述

    PySide.QtGui.QAbstractPrintDialog 类为用于配置打印机的打印对话框提供基实现。

    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 ] )
    参数:

    构造抽象打印对话框为 printer with parent 作为父级 Widget。

    PySide.QtGui.QAbstractPrintDialog. PrintRange

    用于指定打印范围选定选项。

    常量 描述
    QAbstractPrintDialog.AllPages 应打印所有页面。
    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.)

    另请参阅

    QPrinter.PrintRange

    PySide.QtGui.QAbstractPrintDialog. PrintDialogOption

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

    常量 描述
    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.)

    该值从 Qt 4.5 起已过时且什么都不做:

    常量 描述
    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() 代替。
    PySide.QtGui.QAbstractPrintDialog. addEnabledOption ( option )
    参数: option PySide.QtGui.QAbstractPrintDialog.PrintDialogOption

    使用 QPrintDialog::setOption( option , true) 代替。

    PySide.QtGui.QAbstractPrintDialog. enabledOptions ( )
    返回类型: PySide.QtGui.QAbstractPrintDialog.PrintDialogOptions

    使用 QPrintDialog.options() 代替。

    PySide.QtGui.QAbstractPrintDialog. fromPage ( )
    返回类型: PySide.QtCore.int

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

    PySide.QtGui.QAbstractPrintDialog. isOptionEnabled ( option )
    参数: option PySide.QtGui.QAbstractPrintDialog.PrintDialogOption
    返回类型: PySide.QtCore.bool

    使用 QPrintDialog::testOption( option ) 取而代之。

    PySide.QtGui.QAbstractPrintDialog. maxPage ( )
    返回类型: 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 ( )
    返回类型: PySide.QtCore.int

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

    PySide.QtGui.QAbstractPrintDialog. printRange ( )
    返回类型: PySide.QtGui.QAbstractPrintDialog.PrintRange

    返回打印范围。

    PySide.QtGui.QAbstractPrintDialog. printer ( )
    返回类型: PySide.QtGui.QPrinter

    Returns the printer that this printer dialog operates on.

    PySide.QtGui.QAbstractPrintDialog. setEnabledOptions ( options )
    参数: options PySide.QtGui.QAbstractPrintDialog.PrintDialogOptions
    PySide.QtGui.QAbstractPrintDialog. setFromTo ( fromPage , toPage )
    参数:
    • fromPage PySide.QtCore.int
    • toPage PySide.QtCore.int

    将打印对话框中的范围设为从 from to to .

    PySide.QtGui.QAbstractPrintDialog. setMinMax ( min , max )
    参数:
    • min PySide.QtCore.int
    • max PySide.QtCore.int

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

    PySide.QtGui.QAbstractPrintDialog. setOptionTabs ( tabs )
    参数: tabs
    PySide.QtGui.QAbstractPrintDialog. setPrintRange ( range )
    参数: range PySide.QtGui.QAbstractPrintDialog.PrintRange

    Sets the print range option in to be range .

    PySide.QtGui.QAbstractPrintDialog. toPage ( )
    返回类型: PySide.QtCore.int

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