7#include <QtGui/qtguiglobal.h>
8#include <QtCore/qstring.h>
9#include <QtCore/qlist.h>
10#include <QtCore/qshareddata.h>
11#include <QtCore/qmetatype.h>
17class QPageRangesPrivate;
18QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT(QPageRangesPrivate, Q_GUI_EXPORT)
26 QPageRanges(
const QPageRanges &other)
noexcept;
27 QPageRanges &operator=(
const QPageRanges &other)
noexcept;
29 QPageRanges(QPageRanges &&other)
noexcept =
default;
30 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QPageRanges)
31 void swap(QPageRanges &other)
noexcept
34 friend bool operator==(
const QPageRanges &lhs,
const QPageRanges &rhs)
noexcept
35 {
return lhs.isEqual(rhs); }
36 friend bool operator!=(
const QPageRanges &lhs,
const QPageRanges &rhs)
noexcept
37 {
return !lhs.isEqual(rhs); }
42 bool contains(
int pageNumber)
const noexcept
43 {
return from <= pageNumber && to >= pageNumber; }
44 friend bool operator==(Range lhs, Range rhs)
noexcept
45 {
return lhs.from == rhs.from && lhs.to == rhs.to; }
46 friend bool operator!=(Range lhs, Range rhs)
noexcept
47 {
return !(lhs == rhs); }
48 friend bool operator<(Range lhs, Range rhs)
noexcept
49 {
return lhs.from < rhs.from || (!(rhs.from < lhs.from) && lhs.to < rhs.to); }
52 void addPage(
int pageNumber);
53 void addRange(
int from,
int to);
54 QList<Range> toRangeList()
const;
57 QString toString()
const;
58 static QPageRanges fromString(
const QString &ranges);
60 bool contains(
int pageNumber)
const;
62 int firstPage()
const;
68 bool isEqual(
const QPageRanges &other)
const noexcept;
70 QExplicitlySharedDataPointer<QPageRangesPrivate> d;
73#ifndef QT_NO_DATASTREAM
74Q_GUI_EXPORT
QDataStream &operator<<(QDataStream &,
const QPageRanges &);
75Q_GUI_EXPORT
QDataStream &operator>>(QDataStream &, QPageRanges &);
78#ifndef QT_NO_DEBUG_STREAM
79Q_GUI_EXPORT
QDebug operator<<(QDebug dbg,
const QPageRanges &pageRanges);
83Q_DECLARE_TYPEINFO(QPageRanges::Range, Q_RELOCATABLE_TYPE);
87QT_DECL_METATYPE_EXTERN(QPageRanges, Q_GUI_EXPORT)
\inmodule QtCore\reentrant
QDataStream & operator>>(QDataStream &s, QKeyCombination &combination)
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)