Ignore:
Timestamp:
May 5, 2011, 5:36:53 AM (14 years ago)
Author:
Dmitry A. Kuminov
Message:

trunk: Merged in qt 4.7.2 sources from branches/vendor/nokia/qt.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/gui/dialogs/qprintdialog_unix.cpp

    r769 r846  
    11/****************************************************************************
    22**
    3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     3** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
    44** All rights reserved.
    55** Contact: Nokia Corporation (qt-info@nokia.com)
     
    7373QT_BEGIN_NAMESPACE
    7474
    75 extern int qt_printerRealNumCopies(QPaintEngine *);
    76 
    7775class QOptionTreeItem;
    7876class QPPDOptionsModel;
     
    443441        options.duplexShort->setChecked(true); break;
    444442    }
    445     options.copies->setValue(qt_printerRealNumCopies(p->paintEngine()));
     443    options.copies->setValue(p->copyCount());
    446444    options.collate->setChecked(p->collateCopies());
    447445    options.reverse->setChecked(p->pageOrder() == QPrinter::LastPageFirst);
     
    508506        p->setPrintRange(QPrinter::Selection);
    509507        p->setFromTo(0,0);
     508    } else if (options.printCurrentPage->isChecked()) {
     509        p->setPrintRange(QPrinter::CurrentPage);
     510        p->setFromTo(0,0);
    510511    } else if (options.printRange->isChecked()) {
    511512        p->setPrintRange(QPrinter::PageRange);
     
    514515
    515516    // copies
    516     p->setNumCopies(options.copies->value());
     517    p->setCopyCount(options.copies->value());
    517518    p->setCollateCopies(options.collate->isChecked());
    518519
     
    524525    Q_Q(QPrintDialog);
    525526    options.gbPrintRange->setVisible(q->isOptionEnabled(QPrintDialog::PrintPageRange) ||
    526                                 q->isOptionEnabled(QPrintDialog::PrintSelection));
     527                                     q->isOptionEnabled(QPrintDialog::PrintSelection) ||
     528                                     q->isOptionEnabled(QPrintDialog::PrintCurrentPage));
    527529
    528530    options.printRange->setEnabled(q->isOptionEnabled(QPrintDialog::PrintPageRange));
    529531    options.printSelection->setVisible(q->isOptionEnabled(QPrintDialog::PrintSelection));
     532    options.printCurrentPage->setVisible(q->isOptionEnabled(QPrintDialog::PrintCurrentPage));
    530533    options.collate->setVisible(q->isOptionEnabled(QPrintDialog::PrintCollateCopies));
    531534
     
    540543        options.printRange->setChecked(true);
    541544        break;
     545    case QPrintDialog::CurrentPage:
     546        if (q->isOptionEnabled(QPrintDialog::PrintCurrentPage))
     547            options.printCurrentPage->setChecked(true);
     548        break;
    542549    default:
    543550        break;
     
    699706#endif
    700707
    701 #ifndef QT_NO_FILESYSTEMMODEL
     708#if !defined(QT_NO_FILESYSTEMMODEL) && !defined(QT_NO_COMPLETER)
    702709    QFileSystemModel *fsm = new QFileSystemModel(widget.filename);
    703710    fsm->setRootPath(QDir::homePath());
    704 #if !defined(QT_NO_FSCOMPLETER) && !defined(QT_NO_FILEDIALOG)
    705     widget.filename->setCompleter(new QFSCompleter(fsm, widget.filename));
    706 #endif
     711    widget.filename->setCompleter(new QCompleter(fsm, widget.filename));
    707712#endif
    708713    _q_printerChanged(currentPrinterIndex);
Note: See TracChangeset for help on using the changeset viewer.