📄 qprinter.3qt
字号:
The TrueType font embedding for Qt's postscript driver uses code by David Chappell of Trinity College Computing Center..PPCopyright 1995, Trinity College Computing Center. Written by David Chappell..PPPermission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. This software is provided "as is" without express or implied warranty..PPTrueType font support. These functions allow PPR to generate PostScript fonts from Microsoft compatible TrueType font files..PPThe functions in this file do most of the work to convert a TrueType font to a type 3 PostScript font..PPMost of the material in this file is derived from a program called" ttf2ps" which L. S. Ng posted to the usenet news group" comp.sources.postscript". The author did not provide a copyright notice or indicate any restrictions on use..PPLast revised 11 July 1995..PPSee also Graphics Classes and Image Processing Classes..SS "Member Type Documentation".SH "QPrinter::ColorMode"This enum type is used to indicate whether QPrinter should print in color or not..TP\fCQPrinter::Color\fR - print in color if available, otherwise in grayscale..TP\fCQPrinter::GrayScale\fR - print in grayscale, even on color printers. Might be a little faster than Color. This is the default..SH "QPrinter::Orientation"This enum type (not to be confused with Qt::Orientation) is used to specify each page's orientation..TP\fCQPrinter::Portrait\fR - the page's height is greater than its width (the default)..TP\fCQPrinter::Landscape\fR - the page's width is greater than its height..PPThis type interacts with QPrinter::PageSize and QPrinter::setFullPage() to determine the final size of the page available to the application..SH "QPrinter::PageOrder"This enum type is used by QPrinter to tell the application program how to print..TP\fCQPrinter::FirstPageFirst\fR - the lowest-numbered page should be printed first..TP\fCQPrinter::LastPageFirst\fR - the highest-numbered page should be printed first..SH "QPrinter::PageSize"This enum type specifies what paper size QPrinter should use. QPrinter does not check that the paper size is available; it just uses this information, together with QPrinter::Orientation and QPrinter::setFullPage(), to determine the printable area (see QPaintDeviceMetrics)..PPThe defined sizes (with setFullPage(TRUE)) are:.TP\fCQPrinter::A0\fR - 841 x 1189 mm.TP\fCQPrinter::A1\fR - 594 x 841 mm.TP\fCQPrinter::A2\fR - 420 x 594 mm.TP\fCQPrinter::A3\fR - 297 x 420 mm.TP\fCQPrinter::A4\fR - 210 x 297 mm, 8.26 x 11.7 inches.TP\fCQPrinter::A5\fR - 148 x 210 mm.TP\fCQPrinter::A6\fR - 105 x 148 mm.TP\fCQPrinter::A7\fR - 74 x 105 mm.TP\fCQPrinter::A8\fR - 52 x 74 mm.TP\fCQPrinter::A9\fR - 37 x 52 mm.TP\fCQPrinter::B0\fR - 1030 x 1456 mm.TP\fCQPrinter::B1\fR - 728 x 1030 mm.TP\fCQPrinter::B10\fR - 32 x 45 mm.TP\fCQPrinter::B2\fR - 515 x 728 mm.TP\fCQPrinter::B3\fR - 364 x 515 mm.TP\fCQPrinter::B4\fR - 257 x 364 mm.TP\fCQPrinter::B5\fR - 182 x 257 mm, 7.17 x 10.13 inches.TP\fCQPrinter::B6\fR - 128 x 182 mm.TP\fCQPrinter::B7\fR - 91 x 128 mm.TP\fCQPrinter::B8\fR - 64 x 91 mm.TP\fCQPrinter::B9\fR - 45 x 64 mm.TP\fCQPrinter::C5E\fR - 163 x 229 mm.TP\fCQPrinter::Comm10E\fR - 105 x 241 mm, US Common #10 Envelope.TP\fCQPrinter::DLE\fR - 110 x 220 mm.TP\fCQPrinter::Executive\fR - 7.5 x 10 inches, 191 x 254 mm.TP\fCQPrinter::Folio\fR - 210 x 330 mm.TP\fCQPrinter::Ledger\fR - 432 x 279 mm.TP\fCQPrinter::Legal\fR - 8.5 x 14 inches, 216 x 356 mm.TP\fCQPrinter::Letter\fR - 8.5 x 11 inches, 216 x 279 mm.TP\fCQPrinter::Tabloid\fR - 279 x 432 mm.TP\fCQPrinter::Custom\fR.TP\fCQPrinter::NPageSize\fR - (internal).PPWith setFullPage(FALSE) (the default), the metrics will be a bit smaller; how much depends on the printer in use..SH "QPrinter::PaperSource"This enum type specifies what paper source QPrinter is to use. QPrinter does not check that the paper source is available; it just uses this information to try and set the paper source. Whether it will set the paper source depends on whether the printer has that particular source..PPNote: this is currently only implemented for Windows..TP\fCQPrinter::OnlyOne\fR.TP\fCQPrinter::Lower\fR.TP\fCQPrinter::Middle\fR.TP\fCQPrinter::Manual\fR.TP\fCQPrinter::Envelope\fR.TP\fCQPrinter::EnvelopeManual\fR.TP\fCQPrinter::Auto\fR.TP\fCQPrinter::Tractor\fR.TP\fCQPrinter::SmallFormat\fR.TP\fCQPrinter::LargeFormat\fR.TP\fCQPrinter::LargeCapacity\fR.TP\fCQPrinter::Cassette\fR.TP\fCQPrinter::FormSource\fR.SH "QPrinter::PrintRange"This enum is used to specify which print range the application should use to print..TP\fCQPrinter::AllPages\fR - All pages should be printed.TP\fCQPrinter::Selection\fR - Only the selection should be printed..TP\fCQPrinter::PageRange\fR - From page, to page option..PPSee also setPrintRange() and printRange()..SH "QPrinter::PrinterMode"This enum describes the mode the printer should work in. It basically presets a certain resolution and working mode..TP\fCQPrinter::ScreenResolution\fR - Sets the resolution of the print device to the screen resolution. This has the big advantage that the results obtained when painting on the printer will match more or less exactly the visible output on the screen. It is the easiest to use, as font metrics on the screen and on the printer are the same. This is the default value. ScreenResolution will produce a lower quality output than HighResolution and should only be used for drafts..TP\fCQPrinter::PrinterResolution\fR - Use the physical resolution of the printer on Windows. On Unix, set the postscript resolution to 72 dpi..TP\fCQPrinter::HighResolution\fR - Use printer resolution on windows, set the resolution of the postscript driver to 600dpi..TP\fCQPrinter::Compatible\fR - Almost the same as PrinterResolution, but keeps some peculiarities of the Qt 2.x printer driver. This is useful for applications ported from Qt 2.x to Qt 3.x..SH "QPrinter::PrinterOption"This enum describes various printer options that appear in the printer setup dialog. It is used to enable and disable these options in the setup dialog..TP\fCQPrinter::PrintToFile\fR - Describes if print to file should be enabled..TP\fCQPrinter::PrintSelection\fR - Describes if printing selections should be enabled..TP\fCQPrinter::PrintPageRange\fR - Describes if printing page ranges (from, to) should be enabled.PPSee also setOptionEnabled() and isOptionEnabled()..SH MEMBER FUNCTION DOCUMENTATION.SH "QPrinter::QPrinter ( PrinterMode m = ScreenResolution )"Constructs a printer paint device with mode \fIm\fR..PPSee also QPrinter::PrinterMode..SH "QPrinter::~QPrinter ()"Destroys the printer paint device and cleans up..SH "bool QPrinter::abort ()"Aborts the print job. Returns TRUE if successful; otherwise returns FALSE..PPSee also aborted()..SH "bool QPrinter::aborted () const"Returns TRUE if the print job was aborted; otherwise returns FALSE..PPSee also abort()..SH "ColorMode QPrinter::colorMode () const"Returns the current color mode. The default color mode is Color..PPSee also setColorMode()..SH "QString QPrinter::creator () const"Returns the name of the application that created the document..PPSee also setCreator()..SH "QString QPrinter::docName () const"Returns the document name..PPSee also setDocName()..SH "int QPrinter::fromPage () const"Returns the from-page setting. The default value is 0..PPIf fromPage() and toPage() both return 0 this signifies 'print the whole document'..PPThe programmer is responsible for reading this setting and printing accordingly..PPSee also setFromTo() and toPage()..SH "bool QPrinter::fullPage () const"Returns TRUE if the origin of the printer's coordinate system is at the corner of the sheet and FALSE if it is at the edge of the printable area..PPSee setFullPage() for details and caveats..PPSee also setFullPage(), PageSize, and QPaintDeviceMetrics..SH "bool QPrinter::isOptionEnabled ( PrinterOption option )"Returns TRUE if the printer option with identifier \fIoption\fR is enabled; otherwise returns FALSE..PPSee also setOptionEnabled()..SH "QSize QPrinter::margins () const"Returns the width of the left margin and the height of the top margin of the printer. On Unix, this is a best-effort guess, not based on perfect knowledge..PPIf you have called setFullPage( TRUE ), margins().width() may be treated as the smallest sane left margin you can use, and margins().height() as the smallest sane top margin you can use..PPIf you have called setFullPage( FALSE ) (this is the default), margins() is automatically subtracted from the pageSize() by QPrinter..PPSee also setFullPage(), QPaintDeviceMetrics, and PageSize..SH "void QPrinter::margins ( uint * top, uint * left, uint * bottom, uint * right ) const"This is an overloaded member function, provided for convenience. It behaves essentially like the above function..PPSets \fItop\fR, \fIleft\fR, \fIbottom\fR and \fIright\fR to the margins of the printer. On Unix, this is a best-effort guess, not based on perfect knowledge..PPIf you have called setFullPage( TRUE ), the four values specify the smallest sane margins you can use..PPIf you have called setFullPage( FALSE ) (this is the default), the margins are automatically subtracted from the pageSize() by QPrinter..PPSee also setFullPage(), QPaintDeviceMetrics, and PageSize..SH "int QPrinter::maxPage () const"Returns the max-page setting. A user can't choose a higher page number than maxPage() when they select a print range. The default value is 0..PPSee also minPage(), setMinMax(), and setFromTo()..SH "int QPrinter::minPage () const"Returns the min-page setting, i.e. the lowest page number a user is allowed to choose. The default value is 0..PPSee also maxPage(), setMinMax(), and setFromTo()..SH "bool QPrinter::newPage ()"Advances to a new page on the printer. Returns TRUE if successful; otherwise returns FALSE..PPExamples:.)l action/application.cpp, application/application.cpp, helpviewer/helpwindow.cpp, and mdi/application.cpp..SH "int QPrinter::numCopies () const"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -