diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2010-02-15 10:00:56 (GMT) |
---|---|---|
committer | Trond Kjernåsen <trond@trolltech.com> | 2010-02-15 10:00:56 (GMT) |
commit | 77715148d635c31d7042140c93013a1af77f2967 (patch) | |
tree | 32180f470d23c702d18ceb1a1353623ed308bd84 /src/gui/dialogs | |
parent | 4a47bf6a06a4f7ebbf2336cd643c50332ac76d6d (diff) | |
download | Qt-77715148d635c31d7042140c93013a1af77f2967.zip Qt-77715148d635c31d7042140c93013a1af77f2967.tar.gz Qt-77715148d635c31d7042140c93013a1af77f2967.tar.bz2 |
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/dialogs')
-rw-r--r-- | src/gui/dialogs/qprintdialog_qws.cpp | 6 | ||||
-rw-r--r-- | src/gui/dialogs/qprintdialog_unix.cpp | 6 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/dialogs/qprintdialog_qws.cpp b/src/gui/dialogs/qprintdialog_qws.cpp index 6b531a2..1336c04 100644 --- a/src/gui/dialogs/qprintdialog_qws.cpp +++ b/src/gui/dialogs/qprintdialog_qws.cpp @@ -163,7 +163,7 @@ void QPrintDialogPrivate::_q_okClicked() printer->setPaperSize(pageSize); printer->setPageOrder(pageOrder2); printer->setColorMode(colorMode2); - printer->setNumCopies(numCopies); + printer->setCopyCount(numCopies); switch ((rangeCombo->itemData(rangeCombo->currentIndex())).toInt()){ case (int)QPrintDialog::AllPages: @@ -479,8 +479,8 @@ void QPrintDialogPrivate::setPrinter(QPrinter *p, bool pickUpSettings) printGray->setChecked(true); // number of copies - copies->setValue(p->numCopies()); - _q_setNumCopies(p->numCopies()); + copies->setValue(p->copyCount()); + _q_setNumCopies(p->copyCount()); } if (p) { diff --git a/src/gui/dialogs/qprintdialog_unix.cpp b/src/gui/dialogs/qprintdialog_unix.cpp index 23f5831..2d169cf 100644 --- a/src/gui/dialogs/qprintdialog_unix.cpp +++ b/src/gui/dialogs/qprintdialog_unix.cpp @@ -72,8 +72,6 @@ QT_BEGIN_NAMESPACE -extern int qt_printerRealNumCopies(QPaintEngine *); - class QOptionTreeItem; class QPPDOptionsModel; @@ -439,7 +437,7 @@ void QPrintDialogPrivate::applyPrinterProperties(QPrinter *p) case QPrinter::DuplexShortSide: options.duplexShort->setChecked(true); break; } - options.copies->setValue(qt_printerRealNumCopies(p->paintEngine())); + options.copies->setValue(p->copyCount()); options.collate->setChecked(p->collateCopies()); options.reverse->setChecked(p->pageOrder() == QPrinter::LastPageFirst); top->d->applyPrinterProperties(p); @@ -510,7 +508,7 @@ void QPrintDialogPrivate::setupPrinter() } // copies - p->setNumCopies(options.copies->value()); + p->setCopyCount(options.copies->value()); p->setCollateCopies(options.collate->isChecked()); top->d->setupPrinter(); |