QPrinterInfo 類

The QPrinterInfo class gives access to information about existing printers. 更多...

頭: #include <QPrinterInfo>
Since: Qt 4.4

公共函數

QPrinterInfo ()
QPrinterInfo (const QPrinterInfo & other )
QPrinterInfo (const QPrinter & printer )
~QPrinterInfo ()
bool isDefault () const
bool isNull () const
QString printerName () const
QList<QPrinter::PaperSize> supportedPaperSizes () const
QPrinterInfo & operator= (const QPrinterInfo & other )

靜態公共成員

QList<QPrinterInfo> availablePrinters ()
QPrinterInfo defaultPrinter ()

詳細描述

The QPrinterInfo class gives access to information about existing printers.

使用靜態函數以生成列錶為 QPrinterInfo 對象。每個 QPrinterInfo object in the list represents a single printer and can be queried for name, supported paper sizes, and whether or not it is the default printer.

成員函數文檔編製

QPrinterInfo:: QPrinterInfo ()

構造空的 QPrinterInfo 對象。

另請參閱 isNull ().

QPrinterInfo:: QPrinterInfo (const QPrinterInfo & other )

構造副本為 other .

該函數在 Qt 4.8 引入。

QPrinterInfo:: QPrinterInfo (const QPrinter & printer )

構造 QPrinterInfo 對象從 printer .

QPrinterInfo:: ~QPrinterInfo ()

銷毀 QPrinterInfo 對象。引用對象中的值變為無效。

[static] QList < QPrinterInfo > QPrinterInfo:: availablePrinters ()

Returns a list of available printers on the system.

[static] QPrinterInfo QPrinterInfo:: defaultPrinter ()

Returns the default printer on the system.

The return value should be checked using isNull () before being used, in case there is no default printer.

另請參閱 isNull ().

bool QPrinterInfo:: isDefault () const

Returns whether this printer is the default printer.

bool QPrinterInfo:: isNull () const

返迴是否此 QPrinterInfo object holds a printer definition.

QPrinterInfo object could result for example from calling defaultPrinter () when there are no printers on the system.

QString QPrinterInfo:: printerName () const

Returns the name of the printer.

另請參閱 QPrinter::setPrinterName ().

QList < QPrinter::PaperSize > QPrinterInfo:: supportedPaperSizes () const

Returns a list of supported paper sizes by the printer.

Not all printer drivers support this query, so the list may be empty. On Mac OS X 10.3, this function always returns an empty list.

該函數在 Qt 4.4 引入。

QPrinterInfo & QPrinterInfo:: operator= (const QPrinterInfo & other )

設置 QPrinterInfo 對象等於 other .

該函數在 Qt 4.8 引入。