QPrintEngine Class
QPrintEngineクラスは、QPrinter 、与えられた印刷サブシステムとどのように相互作用するかのインターフェイスを定義します。詳細...
ヘッダー | #include <QPrintEngine> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS PrintSupport) target_link_libraries(mytarget PRIVATE Qt6::PrintSupport) |
qmake: | QT += printsupport |
- 継承メンバを含む全メンバ一覧
- QPrintEngineは、PrinterおよびPrinting APIに含まれています。
注意:このクラスの関数はすべてリエントラントです。
パブリック型
enum | PrintEnginePropertyKey { PPK_CollateCopies, PPK_ColorMode, PPK_Creator, PPK_Duplex, PPK_DocumentName, …, 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(QPrintEngine::PrintEnginePropertyKey key) const = 0 |
virtual void | setProperty(QPrintEngine::PrintEnginePropertyKey key, const QVariant &value) = 0 |
詳細説明
独自の印刷エンジンを作成する場合の一般的なケースは、QPaintEngine と QPrintEngine の両方から派生することです。印刷エンジンの様々なプロパティはproperty() で与えられ、setProperty() で設定されます。
QPaintEngineも参照してください 。
メンバ型ドキュメント
enum QPrintEngine::PrintEnginePropertyKey
こ の列挙は、 印刷エン ジ ン とQPrinter の間でプ ロ パテ ィ を伝達す る ために用い ら れます。プロパティは、指定されたプリントエンジンでサポートされている場合もあれば、サポートされていない場合もあります。
定数 | 値 | 説明 |
---|---|---|
QPrintEngine::PPK_CollateCopies | 0 | 印刷出力が照合 さ れる必要があ る か ど う かを示すブー リ アン値。 |
QPrintEngine::PPK_ColorMode | 1 | カラーまたはモノクロのQPrinter::ColorMode を指す。 |
QPrintEngine::PPK_Creator | 2 | 文書の作成者を表す文字列。 |
QPrintEngine::PPK_Duplex | 20 | 印刷時にプ リ ン タ 用紙の両面を使用す る か ど う か を示すブー リ アン値。 |
QPrintEngine::PPK_DocumentName | 3 | スプーラ内の文書名を表す文字列。 |
QPrintEngine::PPK_FontEmbedding | 19 | ドキュメントのフォントのデータを、プリンタに送られるデータに埋め込むかどうかを示すブーリアン値。 |
QPrintEngine::PPK_FullPage | 4 | プリンタがフルページであるかどうかを記述するブール値。 |
QPrintEngine::PPK_NumberOfCopies | 5 | 廃止された。部数を指定する整数。代わりに PPK_CopyCount を使用する。 |
QPrintEngine::PPK_Orientation | 6 | QPageLayout::Orientation 値を指定する。 |
QPrintEngine::PPK_OutputFileName | 7 | 文字列としての出力ファイル名。空のファイル名は、プリンタがファイルに印刷しないことを示す。 |
QPrintEngine::PPK_PageOrder | 8 | QPrinter::PageOrder 値を指定する。 |
QPrintEngine::PPK_PageRect | 9 | QRect ページ矩形を指定する。 |
QPrintEngine::PPK_PageSize | 10 | 廃止。代わりに PPK_PaperSize を使用。 |
QPrintEngine::PPK_PaperRect | 11 | QRect 用紙長方形を指定。 |
QPrintEngine::PPK_PaperSource | 12 | QPrinter::PaperSource 値を指定。 |
QPrintEngine::PPK_PaperSources | 21 | 複数のQPrinter::PaperSource 値を指定する。 |
QPrintEngine::PPK_PaperName | 26 | 用紙の名前を指定する文字列。 |
QPrintEngine::PPK_PaperSize | PPK_PageSize | QPrinter::PaperSize 値を指定します。 |
QPrintEngine::PPK_PrinterName | 13 | プリンタ名を指定する文字列。 |
QPrintEngine::PPK_PrinterProgram | 14 | 印刷に使用するプリンタプログラム名を指定する文字列、 |
QPrintEngine::PPK_Resolution | 15 | このプリンタのインチあたりのドットを表す整数。 |
QPrintEngine::PPK_SelectionOption | 16 | |
QPrintEngine::PPK_SupportedResolutions | 17 | プリンタがサポートしている解像度を表す整数QVariantsのリスト。 |
QPrintEngine::PPK_WindowsPageSize | 18 | WindowsのDM_PAPERエントリを指定する整数。 |
QPrintEngine::PPK_CustomPaperSize | 22 | QPrinter::Point 単位でカスタム用紙サイズを指定するQSizeF 。 |
QPrintEngine::PPK_PageMargins | 23 | QPrinter::Point 単位の左、上、右、下マージン値を含むQList<QVariant>。 |
QPrintEngine::PPK_CopyCount | 24 | 印刷部数を指定する整数。 |
QPrintEngine::PPK_SupportsMultipleCopies | 25 | プリンタが1ジョブで複数部数の印刷をサポートしているかどうかを示すブーリアン値。 |
QPrintEngine::PPK_QPageSize | 27 | QPageSize オブジェクトを使用してページサイズを設定する。 |
QPrintEngine::PPK_QPageMargins | 28 | QMarginsF とQPageLayout::Unit のQPair を使ってページの余白を設定する。 |
QPrintEngine::PPK_QPageLayout | 29 | QPageLayout オブジェクトを使用してページレイアウトを設定する。 |
QPrintEngine::PPK_CustomBase | 0xff00 | 拡張の基礎。 |
メンバ関数ドキュメント
[virtual noexcept]
QPrintEngine::~QPrintEngine()
プリントエンジンを破壊する。
[pure virtual]
bool QPrintEngine::abort()
印刷エンジンに印刷処理の中止を指示する。成功すれば真を返し、そうでなければfalse
を返す。
[pure virtual]
int QPrintEngine::metric(QPaintDevice::PaintDeviceMetric id) const
与えられたid のメトリックを返す。
[pure virtual]
bool QPrintEngine::newPage()
印刷エンジンに新しいページの開始を指示する。プリンタが新しいページを作成できた場合はtrue
を返し、そうでない場合はfalse
を返す。
[pure virtual]
QPrinter::PrinterState QPrintEngine::printerState() const
プリントエンジンが使用しているプリンタの現在の状態を返します。
[pure virtual]
QVariant QPrintEngine::property(QPrintEngine::PrintEnginePropertyKey key) const
key で指定した印刷エンジンのプロパティを返します。
setProperty()も参照 。
[pure virtual]
void QPrintEngine::setProperty(QPrintEngine::PrintEnginePropertyKey key, const QVariant &value)
key で指定 さ れた印刷エ ン ジ ンのプ ロパテ ィ を、 与えられたvalue に設定 し ます。
property()も参照 。
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.