Qt:Документация 4.3.2/qprintengine
Материал из Wiki.crossplatform.ru
![]() | Внимание: Актуальная версия перевода документации находится здесь |
__NOTOC__
Главная · Все классы · Основные классы · Классы по группам · Модули · Функции |
[править] QPrintEngine Class Reference
[модуль QtGui ]
The QPrintEngine class defines an interface for how QPrinter interacts with a given printing subsystem. Далее...
#include <QPrintEngine>
[править] Открытые типы
- enum PrintEnginePropertyKey { PPK_CollateCopies, PPK_ColorMode, PPK_Creator, PPK_Duplex, ..., PPK_CustomBase }
[править] Открытые функции
- virtual ~QPrintEngine ()
- virtual bool abort () = 0
- virtual int metric ( QPaintDevice::PaintDeviceMetric id ) const = 0
- virtual bool newPage () = 0
- virtual QPrinter::PrinterState printerState () const = 0
- virtual QVariant property ( PrintEnginePropertyKey key ) const = 0
- virtual void setProperty ( PrintEnginePropertyKey key, const QVariant & value ) = 0
[править] Подробное описание
The QPrintEngine class defines an interface for how QPrinter interacts with a given printing subsystem.
The common case when creating your own print engine is to derive from both QPaintEngine and QPrintEngine. Various properties of a print engine are given with property() and set with setProperty().
See also QPaintEngine.
[править] Описание типов
[править] enum QPrintEngine::PrintEnginePropertyKey
This enum is used to communicate properties between the print engine and QPrinter. A property may or may not be supported by a given print engine.
Константа | Значение | Описание |
---|---|---|
QPrintEngine::PPK_CollateCopies | 0 | A boolean value indicating whether the printout should be collated or not. |
QPrintEngine::PPK_ColorMode | 1 | Refers to QPrinter::ColorMode, either color or monochrome. |
QPrintEngine::PPK_Creator | 2 | A string describing the document's creator. |
QPrintEngine::PPK_Duplex | 21 | A boolean value indicating whether both sides of the printer paper should be used for the printout. |
QPrintEngine::PPK_DocumentName | 3 | A string describing the document name in the spooler. |
QPrintEngine::PPK_FontEmbedding | 19 | A boolean value indicating whether data for the document's fonts should be embedded in the data sent to the printer. |
QPrintEngine::PPK_FullPage | 4 | A boolean describing if the printer should be full page or not. |
QPrintEngine::PPK_NumberOfCopies | 5 | An integer specifying the number of copies |
QPrintEngine::PPK_Orientation | 6 | Specifies a QPrinter::Orientation value. |
QPrintEngine::PPK_OutputFileName | 7 | The output file name as a string. An empty file name indicates that the printer should not print to a file. |
QPrintEngine::PPK_PageOrder | 8 | Specifies a QPrinter::PageOrder value. |
QPrintEngine::PPK_PageRect | 9 | A QRect specifying the page rectangle |
QPrintEngine::PPK_PageSize | 10 | Specifies a QPrinter::PageSize value. |
QPrintEngine::PPK_PaperRect | 11 | A QRect specifying the paper rectangle. |
QPrintEngine::PPK_PaperSource | 12 | Specifies a QPrinter::PaperSource value. |
QPrintEngine::PPK_PaperSources | 22 | Specifies more than one QPrinter::PaperSource value. |
QPrintEngine::PPK_PrinterName | 13 | A string specifying the name of the printer. |
QPrintEngine::PPK_PrinterProgram | 14 | A string specifying the name of the printer program used for printing, |
QPrintEngine::PPK_Resolution | 15 | An integer describing the dots per inch for this printer. |
QPrintEngine::PPK_SelectionOption | 16 | |
QPrintEngine::PPK_SupportedResolutions | 17 | A list of integer QVariants describing the set of supported resolutions that the printer has. |
QPrintEngine::PPK_SuppressSystemPrintStatus | 20 | Suppress the built-in dialog for showing printing progress. As of 4.1 this only has effect on Mac OS X where, by default, a status dialog is shown. |
QPrintEngine::PPK_WindowsPageSize | 18 | An integer specifying a DM_PAPER entry on Windows. |
QPrintEngine::PPK_CustomBase | 0xff00 | Basis for extension. |
[править] Описание функций-членов
[править] QPrintEngine::~QPrintEngine () [virtual]
Destroys the print engine.
[править] bool QPrintEngine::abort () [pure virtual]
Instructs the print engine to abort the printing process. Возвращает true в случае успеха; при неудаче возвращается false.
[править] int QPrintEngine::metric ( QPaintDevice::PaintDeviceMetric id ) const [pure virtual]
Returns the metric for the given id.
[править] bool QPrintEngine::newPage () [pure virtual]
Instructs the print engine to start a new page. Returns true if the printer was able to create the new page; otherwise returns false.
[править] QPrinter::PrinterState QPrintEngine::printerState () const [pure virtual]
Returns the current state of the printer being used by the print engine.
[править] QVariant QPrintEngine::property ( PrintEnginePropertyKey key ) const [pure virtual]
Returns the print engine's property specified by key.
See also setProperty().
[править] void QPrintEngine::setProperty ( PrintEnginePropertyKey key, const QVariant & value ) [pure virtual]
Sets the print engine's property specified by key to the given value.
See also property().
Copyright © 2007 Trolltech | Trademarks | Qt 4.3.2
|