diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2010-02-15 11:00:56 +0100 |
---|---|---|
committer | Trond Kjernåsen <trond@trolltech.com> | 2010-02-15 11:00:56 +0100 |
commit | 77715148d635c31d7042140c93013a1af77f2967 (patch) | |
tree | 32180f470d23c702d18ceb1a1353623ed308bd84 /src/gui/painting/qpdf.cpp | |
parent | 4a47bf6a06a4f7ebbf2336cd643c50332ac76d6d (diff) | |
download | qt4-tools-77715148d635c31d7042140c93013a1af77f2967.tar.gz |
Replaced the numCopies()/setNumCopies() and actualNumCopies() API.
Obsoleted the numCopies()/setNumCopies()/actualNumCopies() with
copyCount()/setCopyCount() and supportsMultipleCopies(). The
old numCopies() was confusing since it returned the number
of times a job had to be printed to get the copies you wanted.
Now copyCount() and setCopyCount() are symmetric, and always returns
the number of copies the user want to print.
Task-number: QTBUG-5605
Reviewed-by: Kim
Diffstat (limited to 'src/gui/painting/qpdf.cpp')
-rw-r--r-- | src/gui/painting/qpdf.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp index dd516b1535..dcf745ff13 100644 --- a/src/gui/painting/qpdf.cpp +++ b/src/gui/painting/qpdf.cpp @@ -1415,6 +1415,7 @@ void QPdfBaseEngine::setProperty(PrintEnginePropertyKey key, const QVariant &val case PPK_FullPage: d->fullPage = value.toBool(); break; + case PPK_CopyCount: // fallthrough case PPK_NumberOfCopies: d->copies = value.toInt(); break; @@ -1504,6 +1505,17 @@ QVariant QPdfBaseEngine::property(PrintEnginePropertyKey key) const case PPK_FullPage: ret = d->fullPage; break; + case PPK_CopyCount: + ret = d->copies; + break; + case PPK_SupportsMultipleCopies: +#if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) + if (QCUPSSupport::isAvailable()) + ret = true; + else +#endif + ret = false; + break; case PPK_NumberOfCopies: #if !defined(QT_NO_CUPS) && !defined(QT_NO_LIBRARY) if (QCUPSSupport::isAvailable()) |