Obsolete Members for QPrinter

以下成员源于类 QPrinter 已过时。 提供它们是为使旧源代码能继续工作。强烈建议不要在新代码中使用它们。

公共类型

(obsolete) enum PageSize { A0, A1, A2, A3, ..., Custom }

公共函数

(obsolete) int actualNumCopies () const
(obsolete) int numCopies () const
(obsolete) PageSize pageSize () const
(obsolete) void setNumCopies (int numCopies )
(obsolete) void setPageSize (PageSize newPageSize )

成员类型文档编制

enum QPrinter:: PageSize

使用 QPrinter::PaperSize 代替。

常量 描述
QPrinter::A0 5 841 x 1189 mm
QPrinter::A1 6 594 x 841 mm
QPrinter::A2 7 420 x 594 mm
QPrinter::A3 8 297 x 420 mm
QPrinter::A4 0 210 x 297 mm, 8.26 x 11.69 inches
QPrinter::A5 9 148 x 210 mm
QPrinter::A6 10 105 x 148 mm
QPrinter::A7 11 74 x 105 mm
QPrinter::A8 12 52 x 74 mm
QPrinter::A9 13 37 x 52 mm
QPrinter::B0 14 1030 x 1456 mm
QPrinter::B1 15 728 x 1030 mm
QPrinter::B10 16 32 x 45 mm
QPrinter::B2 17 515 x 728 mm
QPrinter::B3 18 364 x 515 mm
QPrinter::B4 19 257 x 364 mm
QPrinter::B5 1 182 x 257 mm, 7.17 x 10.13 inches
QPrinter::B6 20 128 x 182 mm
QPrinter::B7 21 91 x 128 mm
QPrinter::B8 22 64 x 91 mm
QPrinter::B9 23 45 x 64 mm
QPrinter::C5E 24 163 x 229 mm
QPrinter::Comm10E 25 105 x 241 mm, U.S. Common 10 Envelope
QPrinter::DLE 26 110 x 220 mm
QPrinter::Executive 4 7.5 x 10 inches, 191 x 254 mm
QPrinter::Folio 27 210 x 330 mm
QPrinter::Ledger 28 432 x 279 mm
QPrinter::Legal 3 8.5 x 14 inches, 216 x 356 mm
QPrinter::Letter 2 8.5 x 11 inches, 216 x 279 mm
QPrinter::Tabloid 29 279 x 432 mm
QPrinter::Custom 30 Unknown, or a user defined size.

成员函数文档编制

int QPrinter:: actualNumCopies () const

Returns the number of copies that will be printed. The default value is 1.

This function always returns the actual value specified in the print dialog or using setNumCopies ().

使用 copyCount () 代替。

该函数在 Qt 4.6 引入。

另请参阅 setNumCopies () 和 numCopies ().

int QPrinter:: numCopies () const

Returns the number of copies to be printed. The default value is 1.

On Windows, Mac OS X and X11 systems that support CUPS, this will always return 1 as these operating systems can internally handle the number of copies.

On X11, this value will return the number of times the application is required to print in order to match the number specified in the printer setup dialog. This has been done since some printer drivers are not capable of buffering up the copies and in those cases the application must make an explicit call to the print code for each copy.

使用 copyCount () in conjunction with supportsMultipleCopies () 代替。

另请参阅 setNumCopies () 和 actualNumCopies ().

PageSize QPrinter:: pageSize () const

Returns the printer page size. The default value is driver-dependent.

使用 paperSize () 代替。

另请参阅 setPageSize ().

void QPrinter:: setNumCopies ( int numCopies )

Sets the number of copies to be printed to numCopies .

The printer driver reads this setting and prints the specified number of copies.

使用 setCopyCount () 代替。

另请参阅 numCopies ().

void QPrinter:: setPageSize ( PageSize newPageSize )

Sets the printer page size based on newPageSize .

使用 setPaperSize () 代替。

另请参阅 pageSize ().