QPageRanges Class
QPageRanges クラスは、ページ範囲のコレクションを表します。詳細...
ヘッダー | #include <QPageRanges> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::Gui) |
qmake: | QT += gui |
以来: | Qt 6.0 |
- 継承メンバを含むすべてのメンバの一覧
- QPageRanges は、Painting Classes、Printer and Printing API、Implicitly Shared Classes に含まれます。
パブリック型
struct | Range |
パブリック関数
QPageRanges() | |
QPageRanges(const QPageRanges &other) | |
QPageRanges(QPageRanges &&other) | |
~QPageRanges() | |
void | addPage(int pageNumber) |
void | addRange(int from, int to) |
void | clear() |
bool | contains(int pageNumber) const |
int | firstPage() const |
bool | isEmpty() const |
int | lastPage() const |
QList<QPageRanges::Range> | toRangeList() const |
QString | toString() const |
QPageRanges & | operator=(QPageRanges &&other) |
QPageRanges & | operator=(const QPageRanges &other) |
静的パブリック・メンバー
QPageRanges | fromString(const QString &ranges) |
関連する非メンバー
QDataStream & | operator<<(QDataStream &stream, const QPageRanges &pageRanges) |
QDataStream & | operator>>(QDataStream &stream, QPageRanges &pageRanges) |
詳細説明
ページングされたデバイスに関連付けられたページ範囲のコレクションにアクセスするにはQPagedPaintDevice::pageRanges() を使用します。
メンバ関数ドキュメント
QPageRanges::QPageRanges()
空の QPageRanges オブジェクトを構築します。
[noexcept]
QPageRanges::QPageRanges(const QPageRanges &other)
other をコピーして QPageRanges オブジェクトを構築する。
[noexcept]
QPageRanges::QPageRanges(QPageRanges &&other)
other から移動して QPageRanges オブジェクトを構築する。
[noexcept]
QPageRanges::~QPageRanges()
ページ範囲を破棄する。
void QPageRanges::addPage(int pageNumber)
シングルページpageNumber を範囲に追加します。
注: ページ番号は1から始まります。1より小さいページ番号を追加しようとすると、警告とともに無視されます。
void QPageRanges::addRange(int from, int to)
from とto で指定された範囲を範囲に追加する。
注意: ページ番号は 1 から始まります。1 より小さいページ番号を追加しようとすると、警告とともに無視されます。
void QPageRanges::clear()
すべてのページ範囲を削除する。
bool QPageRanges::contains(int pageNumber) const
範囲にページpageNumber が含まれていればtrue
を返し、そうでなければfalse
を返す。
int QPageRanges::firstPage() const
ページ範囲によってカバーされる最初のページのインデックス、またはページ範囲が空の場合は0を返します。
[static]
QPageRanges QPageRanges::fromString(const QString &ranges)
文字列表現からranges を入力したQPageRanges オブジェクトを構築して返す。
QPrinter printer; QPageRanges ranges = QPageRanges::fromString("1-3,6-7"); printer.setPageRanges(ranges);
パースエラーの場合は、空のQPageRanges オブジェクトを返します。
isEmpty()も参照 。
bool QPageRanges::isEmpty() const
範囲が空の場合はtrue
を返し、そうでない場合はfalse
を返す。
int QPageRanges::lastPage() const
ページ範囲でカバーされている最後のページのインデックス、またはページ範囲が空の場合は0を返します。
QList<QPageRanges::Range> QPageRanges::toRangeList() const
範囲の値を含むリストを返す。
QString QPageRanges::toString() const
ページ範囲の文字列表現を返します。
[noexcept]
QPageRanges &QPageRanges::operator=(QPageRanges &&other)
other をこのQPageRanges オブジェクトに移動する。
[noexcept]
QPageRanges &QPageRanges::operator=(const QPageRanges &other)
このQPageRanges オブジェクトにother を割り当てる。
関連する非会員
QDataStream &operator<<(QDataStream &stream, const QPageRanges &pageRanges)
pageRanges からstream を範囲文字列として書き込む。
QPageRanges::toStringも参照のこと 。
QDataStream &operator>>(QDataStream &stream, QPageRanges &pageRanges)
ページ範囲の文字列をstream から読み込み、pageRanges に格納する。
QPageRanges::fromStringも参照のこと 。
© 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.