diff options
Diffstat (limited to 'src/printsupport/kernel')
-rw-r--r-- | src/printsupport/kernel/qprinter.cpp | 27 | ||||
-rw-r--r-- | src/printsupport/kernel/qprinter.h | 4 |
2 files changed, 7 insertions, 24 deletions
diff --git a/src/printsupport/kernel/qprinter.cpp b/src/printsupport/kernel/qprinter.cpp index ec5b868ea5..d320accad0 100644 --- a/src/printsupport/kernel/qprinter.cpp +++ b/src/printsupport/kernel/qprinter.cpp @@ -49,7 +49,6 @@ #include "qlist.h" #include <qcoreapplication.h> #include <qfileinfo.h> -#include <QtGui/qrangecollection.h> #include <private/qpagedpaintdevice_p.h> @@ -1393,12 +1392,12 @@ void QPrinter::setPrinterSelectionOption(const QString &option) \note If fromPage() and toPage() both return 0, this indicates that \e{the whole document will be printed}. - \sa setFromTo(), toPage(), rangeCollection() + \sa setFromTo(), toPage(), pageRanges() */ int QPrinter::fromPage() const { - return d->rangeCollection->firstPage(); + return d->pageRanges.firstPage(); } /*! @@ -1417,12 +1416,12 @@ int QPrinter::fromPage() const The programmer is responsible for reading this setting and printing accordingly. - \sa setFromTo(), fromPage(), rangeCollection() + \sa setFromTo(), fromPage(), pageRanges() */ int QPrinter::toPage() const { - return d->rangeCollection->lastPage(); + return d->pageRanges.lastPage(); } /*! @@ -1439,25 +1438,13 @@ int QPrinter::toPage() const This function is mostly used to set a default value that the user can override in the print dialog when you call setup(). - \sa fromPage(), toPage(), rangeCollection() + \sa fromPage(), toPage(), pageRanges() */ void QPrinter::setFromTo(int from, int to) { - d->rangeCollection->clear(); - d->rangeCollection->addRange(from, to); -} - -/*! - \since 6.0 - - Returns the range collection associated with this device. - - \sa QRangeCollection, fromPage(), toPage() -*/ -QRangeCollection *QPrinter::rangeCollection() -{ - return d->rangeCollection; + d->pageRanges.clear(); + d->pageRanges.addRange(from, to); } /*! diff --git a/src/printsupport/kernel/qprinter.h b/src/printsupport/kernel/qprinter.h index 62545f7807..253460ce72 100644 --- a/src/printsupport/kernel/qprinter.h +++ b/src/printsupport/kernel/qprinter.h @@ -44,7 +44,6 @@ #include <QtCore/qstring.h> #include <QtCore/qscopedpointer.h> #include <QtGui/qpagedpaintdevice.h> -#include <QtGui/qpagelayout.h> QT_BEGIN_NAMESPACE @@ -56,7 +55,6 @@ QT_BEGIN_NAMESPACE #endif class QPrinterPrivate; -class QRangeCollection; class QPaintEngine; class QPrintEngine; class QPrinterInfo; @@ -201,8 +199,6 @@ public: int fromPage() const; int toPage() const; - QRangeCollection *rangeCollection(); - void setPrintRange(PrintRange range); PrintRange printRange() const; |