Qt 4.8
qprinter_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QPRINTER_P_H
43 #define QPRINTER_P_H
44 
45 //
46 // W A R N I N G
47 // -------------
48 //
49 // This file is not part of the Qt API. It exists purely as an
50 // implementation detail. This header file may change from version to
51 // version without notice, or even be removed.
52 //
53 // We mean it.
54 //
55 
56 
57 #include "QtCore/qglobal.h"
58 
59 #ifndef QT_NO_PRINTER
60 
61 #include "QtGui/qprinter.h"
62 #include "QtGui/qprintengine.h"
63 #include "QtGui/qprintdialog.h"
64 #include "QtCore/qpointer.h"
65 
66 #include <limits.h>
67 
69 
70 class QPrintEngine;
72 class QPicture;
73 
75 {
77 public:
79  : printEngine(0)
80  , paintEngine(0)
81  , q_ptr(printer)
82  , options(QAbstractPrintDialog::PrintToFile | QAbstractPrintDialog::PrintPageRange |
83  QAbstractPrintDialog::PrintCollateCopies | QAbstractPrintDialog::PrintShowPageSize)
84  , printRange(QAbstractPrintDialog::AllPages)
85  , minPage(1)
86  , maxPage(INT_MAX)
87  , fromPage(0)
88  , toPage(0)
89  , use_default_engine(true)
90  , validPrinter(false)
91  , hasCustomPageMargins(false)
92  , hasUserSetPageSize(false)
93  {
94  }
95 
97 
98  }
99 
100  void createDefaultEngines();
101 #ifndef QT_NO_PRINTPREVIEWWIDGET
103  void setPreviewMode(bool);
104 #endif
105 
107 
112 
115 #ifndef QT_NO_PRINTPREVIEWWIDGET
117 #endif
118 
120 
121  QAbstractPrintDialog::PrintDialogOptions options;
124 
127 
131 
132  // Used to remember which properties have been manually set by the user.
134 };
135 
137 
138 #endif // QT_NO_PRINTER
139 
140 #endif // QPRINTER_P_H
QList< QPrintEngine::PrintEnginePropertyKey > manualSetList
Definition: qprinter_p.h:133
QPrintEngine * printEngine
Definition: qprinter_p.h:110
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
QPrintEngine * realPrintEngine
Definition: qprinter_p.h:113
PrinterMode
This enum describes the mode the printer should work in.
Definition: qprinter.h:70
QPaintEngine * realPaintEngine
Definition: qprinter_p.h:114
uint hasCustomPageMargins
Definition: qprinter_p.h:129
QPrinterPrivate(QPrinter *printer)
Definition: qprinter_p.h:78
uint hasUserSetPageSize
Definition: qprinter_p.h:130
PrintRange
Used to specify the print range selection option.
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
The QPrintEngine class defines an interface for how QPrinter interacts with a given printing subsyste...
Definition: qprintengine.h:56
The QPrinter class is a paint device that paints on a printer.
Definition: qprinter.h:66
OutputFormat
The OutputFormat enum is used to describe the format QPrinter should use for printing.
Definition: qprinter.h:124
QPrinter * q_ptr
Definition: qprinter_p.h:119
unsigned int uint
Definition: qglobal.h:996
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
Definition: qpaintengine.h:90
QPrinter::PrinterMode printerMode
Definition: qprinter_p.h:108
QList< const QPicture * > previewPages() const
Definition: qprinter.cpp:209
void addToManualSetList(QPrintEngine::PrintEnginePropertyKey key)
Definition: qprinter.cpp:235
QAbstractPrintDialog::PrintRange printRange
Definition: qprinter_p.h:122
The QAbstractPrintDialog class provides a base implementation for print dialogs used to configure pri...
#define Q_DECLARE_PUBLIC(Class)
Definition: qglobal.h:2477
QPreviewPaintEngine * previewEngine
Definition: qprinter_p.h:116
uint use_default_engine
Definition: qprinter_p.h:125
int key
QAbstractPrintDialog::PrintDialogOptions options
Definition: qprinter_p.h:121
QPaintEngine * paintEngine
Definition: qprinter_p.h:111
void createDefaultEngines()
Definition: qprinter.cpp:161
The QPicture class is a paint device that records and replays QPainter commands.
Definition: qpicture.h:58
#define INT_MAX
void setPreviewMode(bool)
Definition: qprinter.cpp:216
The QList class is a template class that provides lists.
Definition: qdatastream.h:62
uint had_default_engines
Definition: qprinter_p.h:126
PrintEnginePropertyKey
This enum is used to communicate properties between the print engine and QPrinter.
Definition: qprintengine.h:60
QPrinter::OutputFormat outputFormat
Definition: qprinter_p.h:109