📄 qprinter.3qt
字号:
.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 (182x257 mm, 7.17x10.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.5x10 inches, 191x254 mm).TP\fCQPrinter::Folio\fR (210 x 330 mm).TP\fCQPrinter::Ledger\fR (432 x 279 mm).TP\fCQPrinter::Legal\fR (8.5x14 inches, 216x356 mm).TP\fCQPrinter::Letter\fR (8.5x11 inches, 216x279 mm).TP\fCQPrinter::Tabloid\fR (279 x 432 mm).PPWith setFullPage( FALSE ) (the default), the metrics will be a bit smaller. How much depends on the printer in use..SH MEMBER FUNCTION DOCUMENTATION.SH "QPrinter::QPrinter ()"Constructs a printer paint device..SH "QPrinter::~QPrinter ()"Destroys the printer paint device and cleans up..SH "bool QPrinter::abort ()"Aborts the print job. Returns TRUE if successful, otherwise FALSE..PPSee also: aborted()..SH "bool QPrinter::aborted () const"Returns TRUE is the printer job was aborted, otherwise FALSE..PPSee also: abort()..SH "bool QPrinter::cmd ( int c, QPainter * paint, QPDevCmdParam * p ) \fC[virtual protected]\fR"For internal use only..PPReimplemented from QPaintDevice..SH "QString QPrinter::creator () const"Returns the creator name..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..PPThe programmer is responsible for reading this setting and print accordingly..PPSee also: setFromTo() and toPage()..SH "bool QPrinter::fullPage () const"..SH "QSize QPrinter::margins () const"..SH "int QPrinter::maxPage () const"Returns the max-page setting. The default value is 0..PPSee also: minPage() and setMinMax()..SH "int QPrinter::metric ( int m ) const \fC[virtual protected]\fR"Internal implementation of the virtual QPaintDevice::metric() function..PPUse the QPaintDeviceMetrics class instead..PPReimplemented from QPaintDevice..SH "int QPrinter::minPage () const"Returns the min-page setting. The default value is 0..PPSee also: maxPage() and setMinMax()..SH "bool QPrinter::newPage ()"Advances to a new page on the printer. Returns TRUE if successful, otherwise FALSE..SH "int QPrinter::numCopies () const"Returns the number of copies to be printed. The default value is 1..PPSee also: setNumCopies()..SH "Orientation QPrinter::orientation () const"Returns the orientation setting. The default value is \fCQPrinter::Portrait.\fR.PPSee also: setOrientation()..SH "QString QPrinter::outputFileName () const"Returns the name of the output file. There is no default file name..PPSee also: setOutputFileName() and setOutputToFile()..SH "bool QPrinter::outputToFile () const"Returns TRUE if the output should be written to a file, or FALSE if the output should be sent directly to the printer. The default setting is FALSE..PPThis function is currently only supported under X11..PPSee also: setOutputToFile() and setOutputFileName()..SH "QPrinter::PageOrder QPrinter::pageOrder() const"Returns the current page order..PPThe default page order is \fIFirstPageFirst.\fR.SH "PageSize QPrinter::pageSize () const"Returns the printer page size. The default value is system-dependent..PPSee also: setPageSize()..SH "QString QPrinter::printProgram () const"Returns the name of the program that sends the print output to the printer..PPThe default is to return a null string; meaning that QPrinter will try to be smart in a system-dependent way. On X11 only, you can set it to something different to use a specific print program..PPSee also: setPrintProgram() and setPrinterSelectionOption()..SH "QString QPrinter::printerName () const"Returns the printer name. This value is initially set to the name of the default printer..PPSee also: setPrinterName()..SH "QString QPrinter::printerSelectionOption () const"Returns the printer options selection string. This is only useful if the print command has been explicitly set..PPThe default value (a null string) implies to select printer in a system-dependent manner..PPAny other value implies to use that value..PPSee also: setPrinterSelectionOption()..SH "void QPrinter::setColorMode ( ColorMode newColorMode ) \fC[virtual]\fR"Sets the printer's color mode to \fInewColorMode,\fR which can be one of \fCColor\fR (the default) and \fCGrayScale.\fR.PPA future version of Qt will modify its printing accordingly. At present, QPrinter behaves as if \fCColor\fR is selected..PPSee also: colorMode()..SH "void QPrinter::setCreator ( const QString & creator ) \fC[virtual]\fR"Sets the creator name..PPCalling this function only has effect for the X11 version of Qt. The creator name is the name of the application that created the document. If no creator name is specified, then the creator will be set to "Qt" with some version number..PPSee also: creator()..SH "void QPrinter::setDocName ( const QString & name ) \fC[virtual]\fR"Sets the document name..SH "void QPrinter::setFromTo ( int fromPage, int toPage ) \fC[virtual]\fR"Sets the from page and to page..PPThe from-page and to-page settings specify what pages to print..PPThis function is useful mostly for setting a default value that the user can override in the print dialog when you call setup()..PPSee also: fromPage(), toPage(), setMinMax() and setup()..SH "void QPrinter::setFullPage ( bool fp ) \fC[virtual]\fR"..SH "void QPrinter::setMinMax ( int minPage, int maxPage ) \fC[virtual]\fR"Sets the min page and max page..PPThe min-page and max-page restrict the from-page and to-page settings. When the printer setup dialog comes up, the user cannot select from and to that are outside the range specified by min and max pages..PPSee also: minPage(), maxPage(), setFromTo() and setup()..SH "void QPrinter::setNumCopies ( int numCopies ) \fC[virtual]\fR"Sets the number of pages to be printed..PPThe printer driver reads this setting and prints the specified number of copies..PPSee also: numCopies() and setup()..SH "void QPrinter::setOrientation ( Orientation orientation ) \fC[virtual]\fR"Sets the print orientation..PPThe orientation can be either \fCQPrinter::Portrait\fR or \fCQPrinter::Landscape.\fR.PPThe printer driver reads this setting and prints using the specified orientation..PPSee also: orientation()..SH "void QPrinter::setOutputFileName ( const QString & fileName ) \fC[virtual]\fR"Sets the name of the output file..PPSetting a null name (0 or "") disables output to a file, i.e. calls setOutputToFile(FALSE); Setting non-null name enables output to a file, i.e. calls setOutputToFile(TRUE)..PPThis function is currently only supported under X11..PPSee also: outputFileName() and setOutputToFile()..SH "void QPrinter::setOutputToFile ( bool enable ) \fC[virtual]\fR"Specifies whether the output should be written to a file or sent directly to the printer..PPWill output to a file if \fIenable\fR is TRUE, or will output directly to the printer if \fIenable\fR is FALSE..PPThis function is currently only supported under X11..PPSee also: outputToFile() and setOutputFileName()..SH "void QPrinter::setPageOrder ( PageOrder newPageOrder ) \fC[virtual]\fR"Sets the page order to \fInewPageOrder.\fR.PPThe page order can be \fCQPrinter::FirstPageFirst\fR or \fCQPrinter::LastPageFirst.\fR The application programmer is responsible for reading the page order and printing accordingly..PPThis function is useful mostly for setting a default value that the user can override in the print dialog when you call setup()..SH "void QPrinter::setPageSize ( PageSize newPageSize ) \fC[virtual]\fR"Sets the printer page size to \fInewPageSize.\fR.PPThe default page size is system-dependent..PPThis function is useful mostly for setting a default value that the user can override in the print dialog when you call setup()..PPSee also: pageSize(), PageSize and setFullPage()..SH "void QPrinter::setPrintProgram ( const QString & printProg ) \fC[virtual]\fR"Sets the name of the program that should do the print job..PPOn X11, this function sets the program to call with the PostScript output. On other platforms, it has no effect..PPSee also: printProgram()..SH "void QPrinter::setPrinterName ( const QString & name ) \fC[virtual]\fR"Sets the printer name..PPThe default printer will be used if no printer name is set..PPUnder X11, the PRINTER environment variable defines the default printer. Under any other window system, the window system defines the default printer..PPSee also: printerName()..SH "void QPrinter::setPrinterSelectionOption ( const QString & option ) \fC[virtual]\fR"Sets the printer to use \fIoption\fR to select printer. \fIoption\fR is null by default, meaning to be a little smart, but can be set to other values to use a specific printer selection option..PPIf the printer selection option is changed while the printer is active, the current print job may or may not be affected..SH "bool QPrinter::setup ( QWidget * parent = 0 )"Opens a printer setup dialog and asks the user to specify what printer to use and miscellaneous printer settings..PPReturns TRUE if the user pressed "OK" to print, or FALSE if the user cancelled the operation..PPExamples:.(ldrawdemo/drawdemo.cpp.)l.SH "int QPrinter::toPage () const"Returns the to-page setting. The default value is 0..PPThe programmer is responsible for reading this setting and print accordingly..PPSee also: setFromTo() and fromPage()..SH "SEE ALSO".BR http://www.troll.no/qt/qprinter.html.SH COPYRIGHTCopyright 1992-1999 Troll Tech AS. See the license file included inthe distribution for a complete license statement..SH AUTHORGenerated automatically from the source code.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -