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は、「描画クラス」、「プリンタおよび印刷API」、および「暗黙的に共有されるクラス」の一部です。
パブリック型
| 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オブジェクトを作成します。
[constexpr noexcept default] 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も参照してください 。
© 2026 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.