summaryrefslogtreecommitdiffstats
path: root/src/printsupport/kernel/qprintengine_win_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/printsupport/kernel/qprintengine_win_p.h')
-rw-r--r--src/printsupport/kernel/qprintengine_win_p.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/src/printsupport/kernel/qprintengine_win_p.h b/src/printsupport/kernel/qprintengine_win_p.h
index a749d9be42..61bf63346b 100644
--- a/src/printsupport/kernel/qprintengine_win_p.h
+++ b/src/printsupport/kernel/qprintengine_win_p.h
@@ -58,10 +58,11 @@
#ifndef QT_NO_PRINTER
#include <QtGui/qpaintengine.h>
+#include <QtGui/qpagelayout.h>
#include <QtPrintSupport/QPrintEngine>
#include <QtPrintSupport/QPrinter>
-#include <QtPrintSupport/QPrinterInfo>
#include <private/qpaintengine_alpha_p.h>
+#include <private/qprintdevice_p.h>
#include <QtCore/qt_windows.h>
QT_BEGIN_NAMESPACE
@@ -105,7 +106,10 @@ public:
HDC getDC() const;
void releaseDC(HDC) const;
- static void queryDefaultPrinter(QString &name);
+ /* Used by print/page setup dialogs */
+ void setGlobalDevMode(HGLOBAL globalDevNames, HGLOBAL globalDevMode);
+ HGLOBAL *createGlobalDevNames();
+ HGLOBAL globalDevMode();
private:
friend class QPrintDialog;
@@ -137,10 +141,6 @@ public:
~QWin32PrintEnginePrivate();
- /* Reads the default printer name and its driver (printerProgram) into
- the engines private data. */
- void queryDefault();
-
/* Initializes the printer data based on the current printer name. This
function creates a DEVMODE struct, HDC and a printer handle. If these
structures are already in use, they are freed using release
@@ -155,10 +155,6 @@ public:
etc and resets the corresponding members to 0. */
void release();
- /* Queries the resolutions for the current printer, and returns them
- in a list. */
- QList<QVariant> queryResolutions() const;
-
/* Resets the DC with changes in devmode. If the printer is active
this function only sets the reinit variable to true so it
is handled in the next begin or newpage. */
@@ -176,12 +172,14 @@ public:
void fillPath_dev(const QPainterPath &path, const QColor &color);
void strokePath_dev(const QPainterPath &path, const QColor &color, qreal width);
+ void setPageSize(const QPageSize &pageSize);
+ void updatePageSize();
+
void updateOrigin();
void initDevRects();
void setPageMargins(int margin_left, int margin_top, int margin_right, int margin_bottom);
QRect getPageMargins() const;
- void updateCustomPaperSize();
// Windows GDI printer references.
HANDLE hPrinter;
@@ -195,8 +193,8 @@ public:
QPrinter::PrinterMode mode;
- // Printer info
- QString name;
+ // Print Device
+ QPrintDevice m_printDevice;
// Document info
QString docName;
@@ -206,6 +204,9 @@ public:
QPrinter::PrinterState state;
int resolution;
+ // Page Layout
+ QPageSize m_pageSize;
+
// This QRect is used to store the exact values
// entered into the PageSetup Dialog because those are
// entered in mm but are since converted to device coordinates.
@@ -243,7 +244,7 @@ public:
QColor brush_color;
QPen pen;
QColor pen_color;
- QSizeF paper_size;
+ QSizeF paper_size; // In points
QTransform painterMatrix;
QTransform matrix;