58 #undef B0 // Terminal hang-up. We assume that you do not want that.
61 class QPrinterPrivate;
81 enum PageSize { A4, B5, Letter, Legal, Executive,
82 A0, A1, A2, A3, A5, A6, A7, A8, A9, B0,
B1,
83 B10, B2, B3, B4, B6, B7, B8, B9, C5E,
Comm10E,
84 DLE, Folio, Ledger,
Tabloid, Custom, NPageSize = Custom, NPaperSize = Custom };
87 enum PageSize { A4, B5, Letter, Legal, Executive,
88 A0, A1, A2, A3, A5, A6, A7, A8, A9, B0, B1,
89 B10, B2, B3, B4, B6, B7, B8, B9, C5E, Comm10E,
90 DLE, Folio, Ledger, Tabloid, Custom, NPageSize = Custom };
91 enum PaperSize { A4, B5, Letter, Legal, Executive,
92 A0, A1, A2, A3, A5, A6, A7, A8, A9, B0, B1,
93 B10, B2, B3, B4, B6, B7, B8, B9, C5E, Comm10E,
94 DLE, Folio, Ledger, Tabloid, Custom, NPageSize = Custom, NPaperSize = Custom };
147 enum PrinterOption { PrintToFile, PrintSelection, PrintPageRange };
148 #endif // QT3_SUPPORT
150 void setOutputFormat(OutputFormat
format);
151 OutputFormat outputFormat()
const;
153 void setPrinterName(
const QString &);
156 bool isValid()
const;
158 void setOutputFileName(
const QString &);
161 void setPrintProgram(
const QString &);
164 void setDocName(
const QString &);
167 void setCreator(
const QString &);
173 void setPageSize(PageSize);
174 PageSize pageSize()
const;
176 void setPaperSize(PaperSize);
177 PaperSize paperSize()
const;
179 void setPaperSize(
const QSizeF &paperSize, Unit unit);
180 QSizeF paperSize(Unit unit)
const;
182 void setPageOrder(PageOrder);
183 PageOrder pageOrder()
const;
185 void setResolution(
int);
186 int resolution()
const;
188 void setColorMode(ColorMode);
189 ColorMode colorMode()
const;
191 void setCollateCopies(
bool collate);
192 bool collateCopies()
const;
194 void setFullPage(
bool);
195 bool fullPage()
const;
197 void setNumCopies(
int);
198 int numCopies()
const;
200 int actualNumCopies()
const;
202 void setCopyCount(
int);
203 int copyCount()
const;
204 bool supportsMultipleCopies()
const;
206 void setPaperSource(PaperSource);
207 PaperSource paperSource()
const;
209 void setDuplex(DuplexMode duplex);
210 DuplexMode duplex()
const;
218 void setFontEmbeddingEnabled(
bool enable);
219 bool fontEmbeddingEnabled()
const;
221 void setDoubleSidedPrinting(
bool enable);
222 bool doubleSidedPrinting()
const;
225 void setWinPageSize(
int winPageSize);
226 int winPageSize()
const;
229 QRect paperRect()
const;
230 QRect pageRect()
const;
231 QRectF paperRect(Unit)
const;
232 QRectF pageRect(Unit)
const;
234 #if !defined(Q_WS_WIN) || defined(qdoc)
235 QString printerSelectionOption()
const;
236 void setPrinterSelectionOption(
const QString &);
242 PrinterState printerState()
const;
249 void releaseDC(HDC hdc)
const;
252 void setFromTo(
int fromPage,
int toPage);
253 int fromPage()
const;
256 void setPrintRange(PrintRange
range);
257 PrintRange printRange()
const;
259 void setPageMargins(qreal
left, qreal top, qreal
right, qreal bottom, Unit unit);
260 void getPageMargins(qreal *
left, qreal *top, qreal *
right, qreal *bottom, Unit unit)
const;
264 QT3_SUPPORT
bool pageSetup(
QWidget *parent = 0);
265 QT3_SUPPORT
bool printSetup(
QWidget *parent = 0);
268 QT3_SUPPORT
bool setup(
QWidget *parent = 0);
270 QT3_SUPPORT
void setMinMax(
int minPage,
int maxPage);
271 QT3_SUPPORT
int minPage()
const;
272 QT3_SUPPORT
int maxPage()
const;
274 QT3_SUPPORT
void setCollateCopiesEnabled(
bool);
275 QT3_SUPPORT
bool collateCopiesEnabled()
const;
277 QT3_SUPPORT
void setOptionEnabled(PrinterOption,
bool enable);
278 QT3_SUPPORT
bool isOptionEnabled(PrinterOption)
const;
280 inline QT3_SUPPORT
QSize margins()
const;
281 inline QT3_SUPPORT
void margins(uint *top, uint *
left, uint *bottom, uint *
right)
const;
283 inline QT3_SUPPORT
bool aborted() {
return printerState() == Aborted; }
285 QT3_SUPPORT
void setOutputToFile(
bool);
286 inline QT3_SUPPORT
bool outputToFile()
const {
return !outputFileName().isEmpty(); }
290 int metric(PaintDeviceMetric)
const;
294 void init(PrinterMode
mode);
300 friend class QPrintDialogPrivate;
302 friend class QAbstractPrintDialogPrivate;
303 friend class QPrintPreviewWidgetPrivate;
305 friend class QPageSetupWidget;
309 inline QSize QPrinter::margins()
const
311 QRect page = pageRect();
312 QRect paper = paperRect();
316 inline void QPrinter::margins(uint *top, uint *
left, uint *bottom, uint *
right)
const
318 QRect page = pageRect();
319 QRect paper = paperRect();
321 *top = page.
top() - paper.
top();
331 #endif // QT_NO_PRINTER
virtual QPaintEngine * paintEngine() const =0
Q_CORE_EXPORT QTextStream & right(QTextStream &s)
virtual int devType() const
#define QT_BEGIN_NAMESPACE
GLenum GLsizei GLenum format
Q_CORE_EXPORT QTextStream & left(QTextStream &s)
virtual int metric(PaintDeviceMetric metric) const