summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qmatrix.cpp36
-rw-r--r--src/gui/painting/qprinter.cpp159
-rw-r--r--src/gui/painting/qprinter.h54
-rw-r--r--src/gui/painting/qregion.cpp11
-rw-r--r--src/gui/painting/qregion.h6
5 files changed, 0 insertions, 266 deletions
diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp
index 38f78e1a46..a7523fd3cb 100644
--- a/src/gui/painting/qmatrix.cpp
+++ b/src/gui/painting/qmatrix.cpp
@@ -731,42 +731,6 @@ QPainterPath QMatrix::map(const QPainterPath &path) const
}
/*!
- \fn QRegion QMatrix::mapToRegion(const QRect &rectangle) const
-
- Returns the transformed rectangle \a rectangle as a QRegion
- object. A rectangle which has been rotated or sheared may result
- in a non-rectangular region being returned.
-
- Use the mapToPolygon() or map() function instead.
-*/
-#ifdef QT3_SUPPORT
-QRegion QMatrix::mapToRegion(const QRect &rect) const
-{
- QRegion result;
- if (isIdentity()) {
- result = rect;
- } else if (m12() == 0.0F && m21() == 0.0F) {
- int x = qRound(m11()*rect.x() + dx());
- int y = qRound(m22()*rect.y() + dy());
- int w = qRound(m11()*rect.width());
- int h = qRound(m22()*rect.height());
- if (w < 0) {
- w = -w;
- x -= w - 1;
- }
- if (h < 0) {
- h = -h;
- y -= h - 1;
- }
- result = QRect(x, y, w, h);
- } else {
- result = QRegion(mapToPolygon(rect));
- }
- return result;
-
-}
-#endif
-/*!
\fn QPolygon QMatrix::mapToPolygon(const QRect &rectangle) const
Creates and returns a QPolygon representation of the given \a
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
diff --git a/src/gui/painting/qprinter.h b/src/gui/painting/qprinter.h
index a2b7fcf4b1..8b4dcb3857 100644
--- a/src/gui/painting/qprinter.h
+++ b/src/gui/painting/qprinter.h
@@ -143,10 +143,6 @@ public:
DuplexShortSide
};
-#ifdef QT3_SUPPORT
- enum PrinterOption { PrintToFile, PrintSelection, PrintPageRange };
-#endif // QT3_SUPPORT
-
void setOutputFormat(OutputFormat format);
OutputFormat outputFormat() const;
@@ -259,33 +255,6 @@ public:
void setPageMargins(qreal left, qreal top, qreal right, qreal bottom, Unit unit);
void getPageMargins(qreal *left, qreal *top, qreal *right, qreal *bottom, Unit unit) const;
-#ifdef QT3_SUPPORT
-#ifdef Q_WS_MAC
- QT3_SUPPORT bool pageSetup(QWidget *parent = 0);
- QT3_SUPPORT bool printSetup(QWidget *parent = 0);
-#endif
-
- QT3_SUPPORT bool setup(QWidget *parent = 0);
-
- QT3_SUPPORT void setMinMax(int minPage, int maxPage);
- QT3_SUPPORT int minPage() const;
- QT3_SUPPORT int maxPage() const;
-
- QT3_SUPPORT void setCollateCopiesEnabled(bool);
- QT3_SUPPORT bool collateCopiesEnabled() const;
-
- QT3_SUPPORT void setOptionEnabled(PrinterOption, bool enable);
- QT3_SUPPORT bool isOptionEnabled(PrinterOption) const;
-
- inline QT3_SUPPORT QSize margins() const;
- inline QT3_SUPPORT void margins(uint *top, uint *left, uint *bottom, uint *right) const;
-
- inline QT3_SUPPORT bool aborted() { return printerState() == Aborted; }
-
- QT3_SUPPORT void setOutputToFile(bool);
- inline QT3_SUPPORT bool outputToFile() const { return !outputFileName().isEmpty(); }
-#endif
-
protected:
int metric(PaintDeviceMetric) const;
void setEngines(QPrintEngine *printEngine, QPaintEngine *paintEngine);
@@ -305,29 +274,6 @@ private:
friend class QPageSetupWidget;
};
-#ifdef QT3_SUPPORT
-inline QSize QPrinter::margins() const
-{
- QRect page = pageRect();
- QRect paper = paperRect();
- return QSize(page.left() - paper.left(), page.top() - paper.top());
-}
-
-inline void QPrinter::margins(uint *top, uint *left, uint *bottom, uint *right) const
-{
- QRect page = pageRect();
- QRect paper = paperRect();
- if (top)
- *top = page.top() - paper.top();
- if (left)
- *left = page.left() - paper.left();
- if (bottom)
- *bottom = paper.bottom() - page.bottom();
- if (right)
- *right = paper.right() - page.right();
-}
-#endif
-
#endif // QT_NO_PRINTER
QT_END_NAMESPACE
diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp
index d713346902..ae9dc63a8f 100644
--- a/src/gui/painting/qregion.cpp
+++ b/src/gui/painting/qregion.cpp
@@ -252,17 +252,6 @@ QRegion::QRegion(int x, int y, int w, int h, RegionType t)
d = tmp.d;
}
-#ifdef QT3_SUPPORT
-/*!
- Use the constructor tha takes a Qt::FillRule as the second
- argument instead.
-*/
-QRegion::QRegion(const QPolygon &pa, bool winding)
-{
- new (this) QRegion(pa, winding ? Qt::WindingFill : Qt::OddEvenFill);
-}
-#endif
-
/*!
\fn QRegion::~QRegion()
\internal
diff --git a/src/gui/painting/qregion.h b/src/gui/painting/qregion.h
index 1cd38d41b8..3093dc08c4 100644
--- a/src/gui/painting/qregion.h
+++ b/src/gui/painting/qregion.h
@@ -74,9 +74,6 @@ public:
QRegion(int x, int y, int w, int h, RegionType t = Rectangle);
QRegion(const QRect &r, RegionType t = Rectangle);
QRegion(const QPolygon &pa, Qt::FillRule fillRule = Qt::OddEvenFill);
-#ifdef QT3_SUPPORT
- QT3_SUPPORT_CONSTRUCTOR QRegion(const QPolygon &pa, bool winding);
-#endif
QRegion(const QRegion &region);
QRegion(const QBitmap &bitmap);
~QRegion();
@@ -86,9 +83,6 @@ public:
{ qSwap(d, other.d); return *this; }
#endif
inline void swap(QRegion &other) { qSwap(d, other.d); }
-#ifdef QT3_SUPPORT
- inline QT3_SUPPORT bool isNull() const { return isEmpty(); }
-#endif
bool isEmpty() const;
bool contains(const QPoint &p) const;