QPagedPaintDeviceclass represents a paint device that supports multiple pages. 更多 …
继承者: QPrinter
def
devicePageLayout
()
def
margins
()
def
pageLayout
()
def
pageSize
()
def
pageSizeMM
()
def
setPageLayout
(pageLayout)
def
setPageMargins
(margins)
def
setPageMargins
(margins, units)
def
setPageOrientation
(orientation)
def
setPageSize
(pageSize)
def
newPage
()
def
setMargins
(margins)
def
setPageSize
(size)
def
setPageSizeMM
(size)
Paged paint devices are used to generate output for printing or for formats like PDF.
QPdfWriterandQPrinterinherit from it.
QPagedPaintDevice
¶
注意
This constructor is deprecated.
构造新的分页描绘设备。
PySide2.QtGui.QPagedPaintDevice.
PageSize
¶
This enum type lists the available page sizes as defined in the Postscript PPD standard. These values are duplicated in
QPageSize
and
QPrinter
.
定义尺寸:
|
常量 |
描述 |
|---|---|
|
QPagedPaintDevice.A0 |
841 x 1189 mm |
|
QPagedPaintDevice.A1 |
594 x 841 mm |
|
QPagedPaintDevice.A2 |
420 x 594 mm |
|
QPagedPaintDevice.A3 |
297 x 420 mm |
|
QPagedPaintDevice.A4 |
210 x 297 mm, 8.26 x 11.69 inches |
|
QPagedPaintDevice.A5 |
148 x 210 mm |
|
QPagedPaintDevice.A6 |
105 x 148 mm |
|
QPagedPaintDevice.A7 |
74 x 105 mm |
|
QPagedPaintDevice.A8 |
52 x 74 mm |
|
QPagedPaintDevice.A9 |
37 x 52 mm |
|
QPagedPaintDevice.B0 |
1000 x 1414 mm |
|
QPagedPaintDevice.B1 |
707 x 1000 mm |
|
QPagedPaintDevice.B2 |
500 x 707 mm |
|
QPagedPaintDevice.B3 |
353 x 500 mm |
|
QPagedPaintDevice.B4 |
250 x 353 mm |
|
QPagedPaintDevice.B5 |
176 x 250 mm, 6.93 x 9.84 inches |
|
QPagedPaintDevice.B6 |
125 x 176 mm |
|
QPagedPaintDevice.B7 |
88 x 125 mm |
|
QPagedPaintDevice.B8 |
62 x 88 mm |
|
QPagedPaintDevice.B9 |
33 x 62 mm |
|
QPagedPaintDevice.B10 |
31 x 44 mm |
|
QPagedPaintDevice.C5E |
163 x 229 mm |
|
QPagedPaintDevice.Comm10E |
105 x 241 mm, U.S. Common 10 Envelope |
|
QPagedPaintDevice.DLE |
110 x 220 mm |
|
QPagedPaintDevice.Executive |
7.5 x 10 inches, 190.5 x 254 mm |
|
QPagedPaintDevice.Folio |
210 x 330 mm |
|
QPagedPaintDevice.Ledger |
431.8 x 279.4 mm |
|
QPagedPaintDevice.Legal |
8.5 x 14 inches, 215.9 x 355.6 mm |
|
QPagedPaintDevice.Letter |
8.5 x 11 inches, 215.9 x 279.4 mm |
|
QPagedPaintDevice.Tabloid |
279.4 x 431.8 mm |
|
QPagedPaintDevice.Custom |
Unknown, or a user defined size. |
|
QPagedPaintDevice.A10 |
|
|
QPagedPaintDevice.A3Extra |
|
|
QPagedPaintDevice.A4Extra |
|
|
QPagedPaintDevice.A4Plus |
|
|
QPagedPaintDevice.A4Small |
|
|
QPagedPaintDevice.A5Extra |
|
|
QPagedPaintDevice.B5Extra |
|
|
QPagedPaintDevice.JisB0 |
|
|
QPagedPaintDevice.JisB1 |
|
|
QPagedPaintDevice.JisB2 |
|
|
QPagedPaintDevice.JisB3 |
|
|
QPagedPaintDevice.JisB4 |
|
|
QPagedPaintDevice.JisB5 |
|
|
QPagedPaintDevice.JisB6 |
, |
|
QPagedPaintDevice.JisB7 |
|
|
QPagedPaintDevice.JisB8 |
|
|
QPagedPaintDevice.JisB9 |
|
|
QPagedPaintDevice.JisB10 |
|
|
QPagedPaintDevice.AnsiA |
= Letter |
|
QPagedPaintDevice.AnsiB |
= Ledger |
|
QPagedPaintDevice.AnsiC |
|
|
QPagedPaintDevice.AnsiD |
|
|
QPagedPaintDevice.AnsiE |
|
|
QPagedPaintDevice.LegalExtra |
|
|
QPagedPaintDevice.LetterExtra |
|
|
QPagedPaintDevice.LetterPlus |
|
|
QPagedPaintDevice.LetterSmall |
|
|
QPagedPaintDevice.TabloidExtra |
|
|
QPagedPaintDevice.ArchA |
|
|
QPagedPaintDevice.ArchB |
|
|
QPagedPaintDevice.ArchC |
|
|
QPagedPaintDevice.ArchD |
|
|
QPagedPaintDevice.ArchE |
|
|
QPagedPaintDevice.Imperial7x9 |
|
|
QPagedPaintDevice.Imperial8x10 |
|
|
QPagedPaintDevice.Imperial9x11 |
|
|
QPagedPaintDevice.Imperial9x12 |
|
|
QPagedPaintDevice.Imperial10x11 |
|
|
QPagedPaintDevice.Imperial10x13 |
|
|
QPagedPaintDevice.Imperial10x14 |
|
|
QPagedPaintDevice.Imperial12x11 |
|
|
QPagedPaintDevice.Imperial15x11 |
|
|
QPagedPaintDevice.ExecutiveStandard |
|
|
QPagedPaintDevice.Note |
|
|
QPagedPaintDevice.Quarto |
|
|
QPagedPaintDevice.Statement |
|
|
QPagedPaintDevice.SuperA |
|
|
QPagedPaintDevice.SuperB |
|
|
QPagedPaintDevice.Postcard |
|
|
QPagedPaintDevice.DoublePostcard |
|
|
QPagedPaintDevice.Prc16K |
|
|
QPagedPaintDevice.Prc32K |
|
|
QPagedPaintDevice.Prc32KBig |
|
|
QPagedPaintDevice.FanFoldUS |
|
|
QPagedPaintDevice.FanFoldGerman |
|
|
QPagedPaintDevice.FanFoldGermanLegal |
|
|
QPagedPaintDevice.EnvelopeB4 |
|
|
QPagedPaintDevice.EnvelopeB5 |
|
|
QPagedPaintDevice.EnvelopeB6 |
|
|
QPagedPaintDevice.EnvelopeC0 |
|
|
QPagedPaintDevice.EnvelopeC1 |
|
|
QPagedPaintDevice.EnvelopeC2 |
|
|
QPagedPaintDevice.EnvelopeC3 |
|
|
QPagedPaintDevice.EnvelopeC4 |
|
|
QPagedPaintDevice.EnvelopeC5 |
= C5E |
|
QPagedPaintDevice.EnvelopeC6 |
|
|
QPagedPaintDevice.EnvelopeC65 |
|
|
QPagedPaintDevice.EnvelopeC7 |
|
|
QPagedPaintDevice.EnvelopeDL |
= DLE |
|
QPagedPaintDevice.Envelope9 |
|
|
QPagedPaintDevice.Envelope10 |
= |
|
QPagedPaintDevice.Envelope11 |
|
|
QPagedPaintDevice.Envelope12 |
|
|
QPagedPaintDevice.Envelope14 |
|
|
QPagedPaintDevice.EnvelopeMonarch |
|
|
QPagedPaintDevice.EnvelopePersonal |
|
|
QPagedPaintDevice.EnvelopeChou3 |
|
|
QPagedPaintDevice.EnvelopeChou4 |
|
|
QPagedPaintDevice.EnvelopeInvite |
|
|
QPagedPaintDevice.EnvelopeItalian |
|
|
QPagedPaintDevice.EnvelopeKaku2 |
|
|
QPagedPaintDevice.EnvelopeKaku3 |
|
|
QPagedPaintDevice.EnvelopePrc1 |
|
|
QPagedPaintDevice.EnvelopePrc2 |
|
|
QPagedPaintDevice.EnvelopePrc3 |
|
|
QPagedPaintDevice.EnvelopePrc4 |
|
|
QPagedPaintDevice.EnvelopePrc5 |
|
|
QPagedPaintDevice.EnvelopePrc6 |
|
|
QPagedPaintDevice.EnvelopePrc7 |
|
|
QPagedPaintDevice.EnvelopePrc8 |
|
|
QPagedPaintDevice.EnvelopePrc9 |
|
|
QPagedPaintDevice.EnvelopePrc10 |
|
|
QPagedPaintDevice.EnvelopeYou4 |
|
|
QPagedPaintDevice.LastPageSize |
= |
Due to historic reasons
Executive
is not the same as the standard Postscript and Windows Executive size, use
ExecutiveStandard
代替。
The Postscript standard size
Folio
is different to the Windows DMPAPER_FOLIO size, use the Postscript standard size
FanFoldGermanLegal
if needed.
PySide2.QtGui.QPagedPaintDevice.
PdfVersion
¶
The enum describes the version of the PDF file that is produced by
QPrinter
or
QPdfWriter
.
|
常量 |
描述 |
|---|---|
|
QPagedPaintDevice.PdfVersion_1_4 |
A PDF 1.4 compatible document is produced. |
|
QPagedPaintDevice.PdfVersion_A1b |
A PDF/A-1b compatible document is produced. |
|
QPagedPaintDevice.PdfVersion_1_6 |
A PDF 1.6 compatible document is produced. This value was added in Qt 5.12. |
New in version 5.10.
PySide2.QtGui.QPagedPaintDevice.
devicePageLayout
(
)
¶
注意
此函数被弃用。
Returns the internal device page layout.
PySide2.QtGui.QPagedPaintDevice.
margins
(
)
¶
Returns the current margins of the paint device. The default is 0.
边距以毫米为单位指定。
另请参阅
PySide2.QtGui.QPagedPaintDevice.
newPage
(
)
¶
bool
Starts a new page. Returns
true
当成功时。
PySide2.QtGui.QPagedPaintDevice.
pageLayout
(
)
¶
返回当前页面的布局。使用此方法以访问当前
QPageSize
,
取向
,
QMarginsF
,fullRect() 和 paintRect()。
注意:不可以在返回对象上使用 setter,必须单独调用
QPagedPaintDevice
setters or use
setPageLayout()
.
PySide2.QtGui.QPagedPaintDevice.
pageSize
(
)
¶
Returns the currently used page size.
另请参阅
PySide2.QtGui.QPagedPaintDevice.
pageSizeMM
(
)
¶
QSizeF
返回页面尺寸 (以毫米为单位)。
另请参阅
PySide2.QtGui.QPagedPaintDevice.
setMargins
(
margins
)
¶
margins
–
Margins
Sets the margins to be used to
margins
.
边距以毫米为单位指定。
The margins are purely a hint to the drawing method. They don’t affect the coordinate system or clipping.
另请参阅
PySide2.QtGui.QPagedPaintDevice.
setPageLayout
(
pageLayout
)
¶
pageLayout
–
QPageLayout
bool
Sets the page layout to
newPageLayout
.
应先调用这当调用
begin()
, or immediately before calling
newPage()
to apply the new page layout to a new page. You should not call any painting methods between a call to and
newPage()
as the wrong paint metrics may be used.
返回 true 若页面布局被成功设为
newPageLayout
.
另请参阅
PySide2.QtGui.QPagedPaintDevice.
setPageMargins
(
margins
)
¶
margins
–
QMarginsF
bool
Set the page
margins
在当前页面布局单位。
应先调用这当调用
begin()
, or immediately before calling
newPage()
to apply the new margins to a new page. You should not call any painting methods between a call to and
newPage()
as the wrong paint metrics may be used.
要获取当前页面边距,使用
pageLayout()
.pageMargins().
返回 true 若页面边距被成功设为
margins
.
另请参阅
PySide2.QtGui.QPagedPaintDevice.
setPageMargins
(
margins
,
units
)
¶
margins
–
QMarginsF
units
–
Unit
bool
Set the page
margins
定义以给定
units
.
应先调用这当调用
begin()
, or immediately before calling
newPage()
to apply the new margins to a new page. You should not call any painting methods between a call to
setPageMargins()
and
newPage()
as the wrong paint metrics may be used.
要获取当前页面边距,使用
pageLayout()
.pageMargins().
返回 true 若页面边距被成功设为
margins
.
另请参阅
PySide2.QtGui.QPagedPaintDevice.
setPageOrientation
(
orientation
)
¶
orientation
–
取向
bool
Sets the page
orientation
.
页面取向用于定义页面大小的取向,当获取页面矩形时。
应先调用这当调用
begin()
, or immediately before calling
newPage()
to apply the new orientation to a new page. You should not call any painting methods between a call to and
newPage()
as the wrong paint metrics may be used.
要获取当前
取向
use
pageLayout()
.pageOrientation().
返回 true 若页面取向被成功设为
orientation
.
另请参阅
PySide2.QtGui.QPagedPaintDevice.
setPageSize
(
size
)
¶
size
–
PageSize
Sets the size of the a page to
size
.
另请参阅
PySide2.QtGui.QPagedPaintDevice.
setPageSizeMM
(
size
)
¶
size
–
QSizeF
Sets the page size to
size
.
size
is specified in millimeters.
If the size matches a standard
PageSize
then that page size will be used, otherwise
自定义
will be set.
另请参阅