diff options
Diffstat (limited to 'src/gui/painting/qprinter.cpp')
-rw-r--r-- | src/gui/painting/qprinter.cpp | 159 |
1 files changed, 0 insertions, 159 deletions
diff --git a/src/gui/painting/qprinter.cpp b/src/gui/painting/qprinter.cpp index f5ba8e76db..5f93a2c735 100644 --- a/src/gui/painting/qprinter.cpp +++ b/src/gui/painting/qprinter.cpp @@ -72,10 +72,6 @@ #include <qpicture.h> #include <private/qpaintengine_preview_p.h> -#if defined(QT3_SUPPORT) -# include "qprintdialog.h" -#endif // QT3_SUPPORT - QT_BEGIN_NAMESPACE #define ABORT_IF_ACTIVE(location) \ @@ -2085,161 +2081,6 @@ QPrinter::PrintRange QPrinter::printRange() const return PrintRange(d->printRange); } -#if defined(QT3_SUPPORT) - -void QPrinter::setOutputToFile(bool f) -{ - if (f) { - if (outputFileName().isEmpty()) - setOutputFileName(QLatin1String("untitled_printer_document")); - } else { - setOutputFileName(QString()); - } -} - -bool qt_compat_QPrinter_printSetup(QPrinter *printer, QPrinterPrivate *pd, QWidget *parent) -{ - Q_UNUSED(pd); - QPrintDialog dlg(printer, parent); - return dlg.exec() != 0; -} - - -#ifdef Q_WS_MAC -bool qt_compat_QPrinter_pageSetup(QPrinter *p, QWidget *parent) -{ - QPageSetupDialog psd(p, parent); - return psd.exec() != 0; -} - -/*! - Executes a page setup dialog so that the user can configure the type of - page used for printing. Returns true if the contents of the dialog are - accepted; returns false if the dialog is canceled. -*/ -bool QPrinter::pageSetup(QWidget *parent) -{ - return qt_compat_QPrinter_pageSetup(this, parent); -} - -/*! - Executes a print setup dialog so that the user can configure the printing - process. Returns true if the contents of the dialog are accepted; returns - false if the dialog is canceled. -*/ -bool QPrinter::printSetup(QWidget *parent) -{ - Q_D(QPrinter); - return qt_compat_QPrinter_printSetup(this, d, parent); -} -#endif // Q_WS_MAC - -/*! - Use QPrintDialog instead. - - \oldcode - if (printer->setup(parent)) - ... - \newcode - QPrintDialog dialog(printer, parent); - if (dialog.exec()) - ... - \endcode -*/ -bool QPrinter::setup(QWidget *parent) -{ - Q_D(QPrinter); - return qt_compat_QPrinter_printSetup(this, d, parent) -#ifdef Q_WS_MAC - && qt_compat_QPrinter_pageSetup(this, parent); -#endif - ; -} - -/*! - Use QPrintDialog::minPage() instead. -*/ -int QPrinter::minPage() const -{ - Q_D(const QPrinter); - return d->minPage; -} - -/*! - Use QPrintDialog::maxPage() instead. -*/ -int QPrinter::maxPage() const -{ - Q_D(const QPrinter); - return d->maxPage; -} - -/*! - Use QPrintDialog::setMinMax() instead. -*/ -void QPrinter::setMinMax( int minPage, int maxPage ) -{ - Q_D(QPrinter); - Q_ASSERT_X(minPage <= maxPage, "QPrinter::setMinMax", - "'min' must be less than or equal to 'max'"); - d->minPage = minPage; - d->maxPage = maxPage; - d->options |= QPrintDialog::PrintPageRange; -} - -/*! - Returns true if the printer is set up to collate copies of printed documents; - otherwise returns false. - - Use QPrintDialog::isOptionEnabled(QPrintDialog::PrintCollateCopies) - instead. - - \sa collateCopies() -*/ -bool QPrinter::collateCopiesEnabled() const -{ - Q_D(const QPrinter); - return (d->options & QPrintDialog::PrintCollateCopies); -} - -/*! - Use QPrintDialog::setOption(QPrintDialog::PrintCollateCopies) - or QPrintDialog::setOptions(QPrintDialog::options() - & ~QPrintDialog::PrintCollateCopies) instead, depending on \a - enable. -*/ -void QPrinter::setCollateCopiesEnabled(bool enable) -{ - Q_D(QPrinter); - - if (enable) - d->options |= QPrintDialog::PrintCollateCopies; - else - d->options &= ~QPrintDialog::PrintCollateCopies; -} - -/*! - Use QPrintDialog instead. -*/ -void QPrinter::setOptionEnabled( PrinterOption option, bool enable ) -{ - Q_D(QPrinter); - if (enable) - d->options |= QPrintDialog::PrintDialogOption(1 << option); - else - d->options &= ~QPrintDialog::PrintDialogOption(1 << option); -} - -/*! - Use QPrintDialog instead. -*/ -bool QPrinter::isOptionEnabled( PrinterOption option ) const -{ - Q_D(const QPrinter); - return (d->options & QPrintDialog::PrintDialogOption(option)); -} - -#endif // QT3_SUPPORT /*! \class QPrintEngine |