![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The QPageRanges class represents a collection of page ranges. More...
#include <qpageranges.h>
Classes | |
| struct | Range |
| \inmodule QtGui More... | |
Public Member Functions | |
| QPageRanges () | |
| Constructs an empty QPageRanges object. | |
| ~QPageRanges () | |
| Destroys the page ranges. | |
| QPageRanges (const QPageRanges &other) noexcept | |
| Constructs a QPageRanges object by copying other. | |
| QPageRanges & | operator= (const QPageRanges &other) noexcept |
| Assigns other to this QPageRanges object. | |
| QPageRanges (QPageRanges &&other) noexcept=default | |
| Constructs a QPageRanges object by moving from other. | |
| void | swap (QPageRanges &other) noexcept |
| void | addPage (int pageNumber) |
| Adds the single page pageNumber to the ranges. | |
| void | addRange (int from, int to) |
| Adds the range specified with from and to to the ranges. | |
| QList< Range > | toRangeList () const |
| Returns a list with the values of the ranges. | |
| void | clear () |
| Removes all page ranges. | |
| QString | toString () const |
| Returns the string representation of the page ranges. | |
| bool | contains (int pageNumber) const |
Returns true if the ranges include the page pageNumber; otherwise returns false. | |
| bool | isEmpty () const |
Returns true if the ranges are empty; otherwise returns false. | |
| int | firstPage () const |
| Returns the index of the first page covered by the page ranges, or 0 if the page ranges are empty. | |
| int | lastPage () const |
| Returns the index of the last page covered by the page ranges, or 0 if the page ranges are empty. | |
| void | detach () |
Static Public Member Functions | |
| static QPageRanges | fromString (const QString &ranges) |
| Constructs and returns a QPageRanges object populated with the ranges from the string representation. | |
Friends | |
| bool | operator== (const QPageRanges &lhs, const QPageRanges &rhs) noexcept |
| bool | operator!= (const QPageRanges &lhs, const QPageRanges &rhs) noexcept |
Related Symbols | |
(Note that these are not member symbols.) | |
| QDataStream & | operator<< (QDataStream &stream, const QPageRanges &pageRanges) |
| Writes pageRanges to stream as a range string. | |
| QDataStream & | operator>> (QDataStream &stream, QPageRanges &pageRanges) |
| Reads a page ranges string from stream and stores it in pageRanges. | |
The QPageRanges class represents a collection of page ranges.
\inmodule QtGui
Use QPagedPaintDevice::pageRanges() to access the collection of page ranges associated with a paged device.
Definition at line 20 of file qpageranges.h.
|
default |
Constructs an empty QPageRanges object.
|
default |
Destroys the page ranges.
|
defaultnoexcept |
Constructs a QPageRanges object by copying other.
|
defaultnoexcept |
Constructs a QPageRanges object by moving from other.
| void QPageRanges::addPage | ( | int | pageNumber | ) |
Adds the single page pageNumber to the ranges.
Definition at line 91 of file qpageranges.cpp.
| void QPageRanges::addRange | ( | int | from, |
| int | to ) |
Adds the range specified with from and to to the ranges.
Definition at line 109 of file qpageranges.cpp.
| void QPageRanges::clear | ( | ) |
Removes all page ranges.
Definition at line 136 of file qpageranges.cpp.
| bool QPageRanges::contains | ( | int | pageNumber | ) | const |
Returns true if the ranges include the page pageNumber; otherwise returns false.
Definition at line 230 of file qpageranges.cpp.
| void QPageRanges::detach | ( | ) |
Definition at line 287 of file qpageranges.cpp.
| int QPageRanges::firstPage | ( | ) | const |
Returns the index of the first page covered by the page ranges, or 0 if the page ranges are empty.
Definition at line 254 of file qpageranges.cpp.
|
static |
Constructs and returns a QPageRanges object populated with the ranges from the string representation.
In case of parsing error, returns an empty QPageRanges object.
Definition at line 155 of file qpageranges.cpp.
| bool QPageRanges::isEmpty | ( | ) | const |
Returns true if the ranges are empty; otherwise returns false.
Definition at line 245 of file qpageranges.cpp.
| int QPageRanges::lastPage | ( | ) | const |
Returns the index of the last page covered by the page ranges, or 0 if the page ranges are empty.
Definition at line 265 of file qpageranges.cpp.
|
defaultnoexcept |
Assigns other to this QPageRanges object.
Moves other into this QPageRanges object.
|
inlinenoexcept |
Definition at line 31 of file qpageranges.h.
| QList< QPageRanges::Range > QPageRanges::toRangeList | ( | ) | const |
Returns a list with the values of the ranges.
Definition at line 126 of file qpageranges.cpp.
| QString QPageRanges::toString | ( | ) | const |
Returns the string representation of the page ranges.
Definition at line 205 of file qpageranges.cpp.
|
friend |
Definition at line 36 of file qpageranges.h.
|
Writes pageRanges to stream as a range string.
Definition at line 305 of file qpageranges.cpp.
|
friend |
Definition at line 34 of file qpageranges.h.
|
Reads a page ranges string from stream and stores it in pageRanges.
Definition at line 320 of file qpageranges.cpp.