.TH "KPrinter" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeprint Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KPrinter \- This class is the main interface to access the KDE print framework. The central interface class to access the KDE print system.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kprinter.h>\fP
.PP
Inherits \fBQPaintDevice\fP, and KPReloadObject.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBStandardPageType\fP { \fBCopiesPage\fP =  0x01, \fBFilesPage\fP =  0x02, \fBCustom\fP =  0x10 }"
.br
.ti -1c
.RI "enum \fBPageSelectionType\fP { \fBApplicationSide\fP =  0x01, \fBSystemSide\fP =  0x02 }"
.br
.ti -1c
.RI "enum \fBApplicationType\fP { \fBDialog\fP =  0x00, \fBStandAlone\fP =  0x01, \fBStandAlonePersistent\fP =  0x02 }"
.br
.ti -1c
.RI "enum \fBPageSetType\fP { \fBAllPages\fP =  0x00, \fBOddPages\fP =  0x01, \fBEvenPages\fP =  0x02 }"
.br
.ti -1c
.RI "enum \fBCollateType\fP { \fBCollate\fP =  0x00, \fBUncollate\fP =  0x01 }"
.br
.ti -1c
.RI "enum \fBColorMode\fP { \fBGrayScale\fP =  QPrinter::GrayScale, \fBColor\fP =  QPrinter::Color }"
.br
.ti -1c
.RI "enum \fBOrientation\fP { \fBPortrait\fP =  QPrinter::Portrait, \fBLandscape\fP =  QPrinter::Landscape }"
.br
.ti -1c
.RI "enum \fBPageOrder\fP { \fBFirstPageFirst\fP =  QPrinter::FirstPageFirst, \fBLastPageFirst\fP =  QPrinter::LastPageFirst }"
.br
.ti -1c
.RI "enum \fBPageSize\fP { \fBA4\fP =  QPrinter::A4, \fBB5\fP =  QPrinter::B5, \fBLetter\fP =  QPrinter::Letter, \fBLegal\fP =  QPrinter::Legal, \fBExecutive\fP =  QPrinter::Executive, \fBA0\fP =  QPrinter::A0, \fBA1\fP =  QPrinter::A1, \fBA2\fP =  QPrinter::A2, \fBA3\fP =  QPrinter::A3, \fBA5\fP =  QPrinter::A5, \fBA6\fP =  QPrinter::A6, \fBA7\fP =  QPrinter::A7, \fBA8\fP =  QPrinter::A8, \fBA9\fP =  QPrinter::A9, \fBB0\fP =  QPrinter::B0, \fBB1\fP =  QPrinter::B1, \fBB10\fP =  QPrinter::B10, \fBB2\fP =  QPrinter::B2, \fBB3\fP =  QPrinter::B3, \fBB4\fP =  QPrinter::B4, \fBB6\fP =  QPrinter::B6, \fBB7\fP =  QPrinter::B7, \fBB8\fP =  QPrinter::B8, \fBB9\fP =  QPrinter::B9, \fBC5E\fP =  QPrinter::C5E, \fBComm10E\fP =  QPrinter::Comm10E, \fBDLE\fP =  QPrinter::DLE, \fBFolio\fP =  QPrinter::Folio, \fBLedger\fP =  QPrinter::Ledger, \fBTabloid\fP =  QPrinter::Tabloid, \fBNPageSize\fP =  QPrinter::NPageSize }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKPrinter\fP (bool restore=true, QPrinter::PrinterMode m=QPrinter::ScreenResolution)"
.br
.ti -1c
.RI "\fB~KPrinter\fP ()"
.br
.ti -1c
.RI "bool \fBnewPage\fP ()"
.br
.ti -1c
.RI "bool \fBabort\fP ()"
.br
.ti -1c
.RI "bool \fBaborted\fP () const "
.br
.ti -1c
.RI "bool \fBoutputToFile\fP () const "
.br
.ti -1c
.RI "void \fBsetOutputToFile\fP (bool)"
.br
.ti -1c
.RI "\fBQString\fP \fBoutputFileName\fP () const "
.br
.ti -1c
.RI "void \fBsetOutputFileName\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBdocName\fP () const "
.br
.ti -1c
.RI "void \fBsetDocName\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBcreator\fP () const "
.br
.ti -1c
.RI "void \fBsetCreator\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "bool \fBfullPage\fP () const "
.br
.ti -1c
.RI "void \fBsetFullPage\fP (bool)"
.br
.ti -1c
.RI "\fBColorMode\fP \fBcolorMode\fP () const "
.br
.ti -1c
.RI "void \fBsetColorMode\fP (\fBColorMode\fP)"
.br
.ti -1c
.RI "int \fBnumCopies\fP () const "
.br
.ti -1c
.RI "void \fBsetNumCopies\fP (int n)"
.br
.ti -1c
.RI "\fBOrientation\fP \fBorientation\fP () const "
.br
.ti -1c
.RI "void \fBsetOrientation\fP (\fBOrientation\fP)"
.br
.ti -1c
.RI "\fBPageOrder\fP \fBpageOrder\fP () const "
.br
.ti -1c
.RI "void \fBsetPageOrder\fP (\fBPageOrder\fP)"
.br
.ti -1c
.RI "\fBCollateType\fP \fBcollate\fP () const "
.br
.ti -1c
.RI "void \fBsetCollate\fP (\fBCollateType\fP type)"
.br
.ti -1c
.RI "int \fBminPage\fP () const "
.br
.ti -1c
.RI "int \fBmaxPage\fP () const "
.br
.ti -1c
.RI "void \fBsetMinMax\fP (int, int)"
.br
.ti -1c
.RI "int \fBfromPage\fP () const KDE_DEPRECATED"
.br
.ti -1c
.RI "int \fBtoPage\fP () const "
.br
.ti -1c
.RI "void \fBsetFromTo\fP (int, int)"
.br
.ti -1c
.RI "\fBPageSize\fP \fBpageSize\fP () const "
.br
.ti -1c
.RI "void \fBsetPageSize\fP (\fBPageSize\fP)"
.br
.ti -1c
.RI "\fBQString\fP \fBprinterName\fP () const "
.br
.ti -1c
.RI "void \fBsetPrinterName\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "\fBQString\fP \fBprintProgram\fP () const "
.br
.ti -1c
.RI "void \fBsetPrintProgram\fP (const \fBQString\fP &\fBcmd\fP)"
.br
.ti -1c
.RI "\fBQString\fP \fBprinterSelectionOption\fP () const "
.br
.ti -1c
.RI "void \fBsetPrinterSelectionOption\fP (const \fBQString\fP &)"
.br
.ti -1c
.RI "int \fBcurrentPage\fP () const "
.br
.ti -1c
.RI "void \fBsetCurrentPage\fP (int p=0)"
.br
.ti -1c
.RI "\fBPageSetType\fP \fBpageSet\fP () const "
.br
.ti -1c
.RI "bool \fBsetup\fP (\fBQWidget\fP *parent=0, const \fBQString\fP &caption=QString::null, bool forceExpand=false)"
.br
.ti -1c
.RI "\fBQSize\fP \fBmargins\fP () const "
.br
.ti -1c
.RI "void \fBsetMargins\fP (\fBQSize\fP m)"
.br
.ti -1c
.RI "\fBQSize\fP \fBrealPageSize\fP () const "
.br
.ti -1c
.RI "void \fBsetRealPageSize\fP (\fBQSize\fP p)"
.br
.ti -1c
.RI "void \fBsetRealDrawableArea\fP (const \fBQRect\fP &r)"
.br
.ti -1c
.RI "\fBQRect\fP \fBrealDrawableArea\fP () const "
.br
.ti -1c
.RI "void \fBmargins\fP (uint *top, uint *left, uint *bottom, uint *right) const "
.br
.ti -1c
.RI "void \fBsetMargins\fP (uint top, uint left, uint bottom, uint right)"
.br
.ti -1c
.RI "\fBQValueList\fP< int > \fBpageList\fP () const "
.br
.ti -1c
.RI "void \fBsetPreviewOnly\fP (bool on)"
.br
.ti -1c
.RI "bool \fBpreviewOnly\fP () const "
.br
.ti -1c
.RI "void \fBsetResolution\fP (int dpi)"
.br
.ti -1c
.RI "int \fBresolution\fP () const "
.br
.ti -1c
.RI "void \fBsetUsePrinterResolution\fP (bool on)"
.br
.ti -1c
.RI "KPrinterImpl * \fBimplementation\fP () const "
.br
.ti -1c
.RI "bool \fBprintFiles\fP (const \fBQStringList\fP &files, bool removeafter=false, bool startviewer=true)"
.br
.ti -1c
.RI "const \fBQString\fP & \fBoption\fP (const \fBQString\fP &key) const "
.br
.ti -1c
.RI "void \fBsetOption\fP (const \fBQString\fP &key, const \fBQString\fP &value)"
.br
.ti -1c
.RI "const \fBQMap\fP< \fBQString\fP, \fBQString\fP > & \fBoptions\fP () const "
.br
.ti -1c
.RI "void \fBsetOptions\fP (const \fBQMap\fP< \fBQString\fP, \fBQString\fP > &opts)"
.br
.ti -1c
.RI "void \fBinitOptions\fP (const \fBQMap\fP< \fBQString\fP, \fBQString\fP > &opts)"
.br
.ti -1c
.RI "\fBQString\fP \fBsearchName\fP () const "
.br
.ti -1c
.RI "void \fBsetSearchName\fP (const \fBQString\fP &n)"
.br
.ti -1c
.RI "\fBQString\fP \fBerrorMessage\fP () const "
.br
.ti -1c
.RI "void \fBsetErrorMessage\fP (const \fBQString\fP &msg)"
.br
.ti -1c
.RI "bool \fBautoConfigure\fP (const \fBQString\fP &prname=QString::null, \fBQWidget\fP *parent=0)"
.br
.ti -1c
.RI "void \fBsetDocFileName\fP (const \fBQString\fP &filename)"
.br
.ti -1c
.RI "\fBQString\fP \fBdocFileName\fP () const "
.br
.ti -1c
.RI "void \fBsetDocDirectory\fP (const \fBQString\fP &dir)"
.br
.ti -1c
.RI "\fBQString\fP \fBdocDirectory\fP () const "
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static void \fBaddDialogPage\fP (\fBKPrintDialogPage\fP *_page)"
.br
.ti -1c
.RI "static void \fBsetPageSelection\fP (\fBPageSelectionType\fP _mode)"
.br
.ti -1c
.RI "static \fBPageSelectionType\fP \fBpageSelection\fP ()"
.br
.ti -1c
.RI "static void \fBsetApplicationType\fP (\fBApplicationType\fP type)"
.br
.ti -1c
.RI "static \fBApplicationType\fP \fBapplicationType\fP ()"
.br
.ti -1c
.RI "static void \fBaddStandardPage\fP (int p)"
.br
.ti -1c
.RI "static void \fBremoveStandardPage\fP (int p)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual bool \fBcmd\fP (int, \fBQPainter\fP *, QPDevCmdParam *)"
.br
.ti -1c
.RI "virtual int \fBmetric\fP (int) const "
.br
.ti -1c
.RI "void \fBtranslateQtOptions\fP ()"
.br
.ti -1c
.RI "void \fBloadSettings\fP ()"
.br
.ti -1c
.RI "void \fBsaveSettings\fP ()"
.br
.ti -1c
.RI "void \fBpreparePrinting\fP ()"
.br
.ti -1c
.RI "void \fBfinishPrinting\fP ()"
.br
.ti -1c
.RI "void \fBreload\fP ()"
.br
.ti -1c
.RI "void \fBinit\fP (bool restore=true, QPrinter::PrinterMode m=QPrinter::ScreenResolution)"
.br
.ti -1c
.RI "bool \fBdoPreview\fP (const \fBQString\fP &file)"
.br
.ti -1c
.RI "void \fBsetRealPageSize\fP (DrPageSize *p)"
.br
.ti -1c
.RI "void \fBsetOption\fP (const \fBQString\fP &key, const \fBQString\fP &value, bool broadcast)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "KPrinterPrivate * \fBd\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKPrinterWrapper\fP"
.br
.ti -1c
.RI "class \fBKPrinterImpl\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
This class is the main interface to access the KDE print framework. The central interface class to access the KDE print system. 

It allows KDE applications to easily access the print system, through an interface that is compatible with \fBQPrinter\fP. So that the porting of an existing application should be as easy as replacing any occurrence of \fBQPrinter\fP by KPrinter. However applications that explicitly used the QPrintDialog class must be changed to the standard KPrinter way of accessing the print dialog.
.PP
Basically, a KDE application will use the KPrinter object as a paint device, and will draw on it using \fBQPainter\fP. In a standard application, the use of the KPrinter class will look like this: 
.PP
.nf
 #include <kprinter.h>
 #include <qpainter.h>

 void MyClass::doPrint()
 {
   KPrinter printer;

   // do some printer initialization
   printer.setFullPage( true );

   // initialize the printer using the print dialog
   if ( printer.setup( this ) )
   {
     // create a painter to paint on the printer object
     QPainter painter;

     // start painting
     painter.begin( &printer );
     <do something>
     // stop painting, this will automatically send the print data to the printer
     painter.end();
   }
 }

.fi
.PP
.PP
The KPrinter interface also allows some more advanced possibilities, like the customization of the print dialog to integrate application specific print options. This is done by subclassing \fBKPrintDialogPage\fP and adding the page using \fBaddDialogPage()\fP.
.PP
When compiling an application that uses KPrinter, you must link to -lkdeprint, which when using the standard KDE build framework can be done by adding  to _LDADD.
.PP
\fBAuthor:\fP
.RS 4
Michael Goffioul 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBQPrinter\fP, \fBKPrintDialogPage\fP 
.RE
.PP

.PP
Definition at line 88 of file kprinter.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBKPrinter::StandardPageType\fP"
.PP
Defines the standard pages available for the print dialog: 
.PD 0

.IP "\(bu" 2
\fCCopiesPage:\fP page and copies selection (included by default) 
.IP "\(bu" 2
\fCFilesPage:\fP file selection (only used by kprinter utility) 
.IP "\(bu" 2
\fCCustom:\fP unused. 
.PP

.PP
\fBSee also:\fP
.RS 4
\fBaddStandardPage()\fP, \fBremoveStandardPage()\fP
.RE
.PP

.PP
Definition at line 102 of file kprinter.h.
.SS "enum \fBKPrinter::PageSelectionType\fP"
.PP
Defines whether the application can perform page selection itself or not. 
.PP
Some print systems (like CUPS) can do page selection, in this case the page selection will be enabled in the print dialog, otherwise it will be disabled. However some applications (word processor) can do page selection themselves, then it will be enabled in the print dialog, whatever the print system used. But such an application has to tell kdeprint about its feature: 
.PD 0

.IP "\(bu" 2
\fCApplicationSide:\fP the application will do page selection 
.IP "\(bu" 2
\fCSystemSide:\fP page selection will be left to the print system, if available (default)
.PP
\fBSee also:\fP
.RS 4
\fBsetPageSelection()\fP, \fBpageSelection()\fP
.RE
.PP

.PP
Definition at line 116 of file kprinter.h.
.SS "enum \fBKPrinter::ApplicationType\fP"
.PP
Defines the type of the application, this affects the GUI of the print dialog: 
.PD 0

.IP "\(bu" 2
\fCDialog:\fP print dialog used in an application (default) 
.IP "\(bu" 2
\fCStandAlone:\fP print dialog used as a standalone widget 
.IP "\(bu" 2
\fCStandAlonePersistent:\fP print dialog used as standalone widget, but persistent (do not use). 
.PP

.PP
Definition at line 126 of file kprinter.h.
.SS "enum \fBKPrinter::PageSetType\fP"
.PP
Defines the page set to print: 
.PD 0

.IP "\(bu" 2
\fCAllPages:\fP all pages 
.IP "\(bu" 2
\fCOddPages:\fP only odd pages 
.IP "\(bu" 2
\fCEvenPages:\fP only even pages. 
.PP

.PP
\fBSee also:\fP
.RS 4
\fBpageSet()\fP
.RE
.PP

.PP
Definition at line 137 of file kprinter.h.
.SS "enum \fBKPrinter::CollateType\fP"
.PP
Defines the collate property of the printer (if supported by the print system): 
.PD 0

.IP "\(bu" 2
\fCCollate:\fP copies collated (1-2-3-..., 1-2-3-...) 
.IP "\(bu" 2
\fCUncollate:\fP copies uncollated (1-1-..., 2-2-..., 3-3-...). 
.PP

.PP
\fBSee also:\fP
.RS 4
\fBsetCollate()\fP, \fBcollate()\fP
.RE
.PP

.PP
Definition at line 145 of file kprinter.h.
.SS "enum \fBKPrinter::ColorMode\fP"
.PP
Defines the color mode of the printer. 
.PP
\fBSee also:\fP
.RS 4
QPrinter::ColorMode
.RE
.PP

.PP
Definition at line 152 of file kprinter.h.
.SS "enum \fBKPrinter::Orientation\fP"
.PP
Defines the orientation of the paper. 
.PP
\fBSee also:\fP
.RS 4
QPrinter::Orientation
.RE
.PP

.PP
Definition at line 157 of file kprinter.h.
.SS "enum \fBKPrinter::PageOrder\fP"
.PP
Defines the page order of the print job. 
.PP
\fBSee also:\fP
.RS 4
QPrinter::PageOrder
.RE
.PP

.PP
Definition at line 162 of file kprinter.h.
.SS "enum \fBKPrinter::PageSize\fP"
.PP
Defines the paper size to use. 
.PP
\fBSee also:\fP
.RS 4
QPrinter::PageSize
.RE
.PP

.PP
Definition at line 167 of file kprinter.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KPrinter::KPrinter (bool restore = \fCtrue\fP, QPrinter::PrinterMode m = \fCQPrinter::ScreenResolution\fP)"
.PP
Constructor. 
.PP
This also restores/saves the state from a previous KPrinter object created within the same application run, if \fCrestore\fP is true. Setting \fCrestore\fP to false may be useful if you want an independent/clean KPrinter object. 
.PP
\fBParameters:\fP
.RS 4
\fIrestore\fP if true, options will be restored/saved between successive KPrinter objects 
.br
\fIm\fP the mode to establish the KPrinter in (see QPrinter::PrinterMode)
.RE
.PP

.PP
Definition at line 123 of file kprinter.cpp.
.SS "KPrinter::~\fBKPrinter\fP ()"
.PP
Destructor. 
.PP
This also saves the current KPrinter state for future printing.
.PP
Definition at line 129 of file kprinter.cpp.
.SH "Member Function Documentation"
.PP 
.SS "bool KPrinter::newPage ()"
.PP
See \fBQPrinter::newPage()\fP. 
.PP

.PP
Definition at line 906 of file kprinter.cpp.
.SS "bool KPrinter::abort ()"
.PP
See \fBQPrinter::abort()\fP. 
.PP

.PP
Definition at line 932 of file kprinter.cpp.
.SS "bool KPrinter::aborted () const"
.PP
See \fBQPrinter::aborted\fP(.). 
.PP
Definition at line 935 of file kprinter.cpp.
.SS "bool KPrinter::outputToFile () const"
.PP
See \fBQPrinter::outputToFile()\fP. 
.PP

.PP
Definition at line 919 of file kprinter.cpp.
.PP
References option().
.SS "void KPrinter::setOutputToFile (bool)"
.PP
See \fBQPrinter::setOutputToFile()\fP. 
.PP

.PP
Definition at line 922 of file kprinter.cpp.
.PP
References setOption().
.PP
Referenced by setOutputFileName(), and setPrintProgram().
.SS "\fBQString\fP KPrinter::outputFileName () const"
.PP
See \fBQPrinter::outputFileName()\fP. 
.PP

.PP
Definition at line 913 of file kprinter.cpp.
.PP
References option().
.SS "void KPrinter::setOutputFileName (const \fBQString\fP &)"
.PP
See \fBQPrinter::setOutputFileName()\fP. 
.PP

.PP
Definition at line 916 of file kprinter.cpp.
.PP
References setOption(), and setOutputToFile().
.SS "\fBQString\fP KPrinter::docName () const"
.PP
See \fBQPrinter::docName()\fP. 
.PP

.PP
Definition at line 791 of file kprinter.cpp.
.PP
References option().
.PP
Referenced by translateQtOptions().
.SS "void KPrinter::setDocName (const \fBQString\fP &)"
.PP
See \fBQPrinter::setDocName()\fP. 
.PP

.PP
Definition at line 794 of file kprinter.cpp.
.PP
References setOption().
.SS "\fBQString\fP KPrinter::creator () const"
.PP
See \fBQPrinter::creator()\fP. 
.PP

.PP
Definition at line 797 of file kprinter.cpp.
.PP
References option().
.PP
Referenced by translateQtOptions().
.SS "void KPrinter::setCreator (const \fBQString\fP &)"
.PP
See \fBQPrinter::setCreator()\fP. 
.PP

.PP
Definition at line 800 of file kprinter.cpp.
.PP
References setOption().
.SS "bool KPrinter::fullPage () const"
.PP
See \fBQPrinter::fullPage()\fP. 
.PP

.PP
Definition at line 803 of file kprinter.cpp.
.PP
References option().
.PP
Referenced by translateQtOptions().
.SS "void KPrinter::setFullPage (bool)"
.PP
See \fBQPrinter::setFullPage()\fP. 
.PP

.PP
Definition at line 806 of file kprinter.cpp.
.PP
References setOption().
.SS "\fBKPrinter::ColorMode\fP KPrinter::colorMode () const"
.PP
See \fBQPrinter::colorMode()\fP. 
.PP

.PP
Definition at line 809 of file kprinter.cpp.
.PP
References option().
.PP
Referenced by translateQtOptions().
.SS "void KPrinter::setColorMode (\fBColorMode\fP)"
.PP
See \fBQPrinter::setColorMode()\fP. 
.PP

.PP
Definition at line 812 of file kprinter.cpp.
.PP
References setOption().
.SS "int KPrinter::numCopies () const"
.PP
See \fBQPrinter::numCopies()\fP. 
.PP

.PP
Definition at line 543 of file kprinter.cpp.
.PP
References option(), and QString::toInt().
.PP
Referenced by translateQtOptions().
.SS "void KPrinter::setNumCopies (int n)"
.PP
See \fBQPrinter::setNumCopies()\fP. 
.PP

.PP
Definition at line 815 of file kprinter.cpp.
.PP
References setOption().
.SS "\fBKPrinter::Orientation\fP KPrinter::orientation () const"
.PP
See \fBQPrinter::orientation()\fP. 
.PP

.PP
Definition at line 818 of file kprinter.cpp.
.PP
References option().
.PP
Referenced by translateQtOptions().
.SS "void KPrinter::setOrientation (\fBOrientation\fP)"
.PP
See \fBQPrinter::setOrientation()\fP. 
.PP

.PP
Definition at line 600 of file kprinter.cpp.
.PP
References setOption().
.SS "\fBKPrinter::PageOrder\fP KPrinter::pageOrder () const"
.PP
See \fBQPrinter::pageOrder()\fP. 
.PP

.PP
Definition at line 821 of file kprinter.cpp.
.PP
References option().
.PP
Referenced by pageList().
.SS "void KPrinter::setPageOrder (\fBPageOrder\fP)"
.PP
See \fBQPrinter::setPageOrder()\fP. 
.PP

.PP
Definition at line 824 of file kprinter.cpp.
.PP
References setOption().
.SS "\fBKPrinter::CollateType\fP KPrinter::collate () const"
.PP
Returns the collate status of the current KPrinter. 
.PP

.PP
Definition at line 827 of file kprinter.cpp.
.PP
References option().
.SS "void KPrinter::setCollate (\fBCollateType\fP type)"
.PP
Sets the collate status for the current KPrinter to \fCtype\fP. 
.PP

.PP
Definition at line 830 of file kprinter.cpp.
.PP
References setOption().
.SS "int KPrinter::minPage () const"
.PP
See \fBQPrinter::minPage()\fP. 
.PP

.PP
Definition at line 833 of file kprinter.cpp.
.PP
References option().
.PP
Referenced by pageList().
.SS "int KPrinter::maxPage () const"
.PP
See \fBQPrinter::maxPage()\fP. 
.PP

.PP
Definition at line 836 of file kprinter.cpp.
.PP
References option().
.PP
Referenced by pageList().
.SS "void KPrinter::setMinMax (int, int)"
.PP
See \fBQPrinter::setMinMax()\fP. 
.PP

.PP
Definition at line 839 of file kprinter.cpp.
.PP
References setOption().
.SS "int KPrinter::fromPage () const"
.PP
Returns the first page to be printed. 
.PP
\fBDeprecated\fP
.RS 4
Applications should use \fBpageList()\fP instead, which takes into account all options: collate, page order, ranges, page set, ... 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBpageList()\fP
.RE
.PP

.PP
Definition at line 842 of file kprinter.cpp.
.PP
References option().
.SS "int KPrinter::toPage () const"
.PP
Returns the last page to be printed. 
.PP
\fBDeprecated\fP
.RS 4
Applications should use \fBpageList()\fP instead, which takes into account all options: collate, page order, ranges, page set, ... 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBpageList()\fP
.RE
.PP

.PP
Definition at line 845 of file kprinter.cpp.
.PP
References option().
.SS "void KPrinter::setFromTo (int, int)"
.PP
Sets the first and last page to be printed. 
.PP
See \fBQPrinter::setFromTo()\fP.
.PP
Definition at line 848 of file kprinter.cpp.
.PP
References setOption().
.SS "\fBKPrinter::PageSize\fP KPrinter::pageSize () const"
.PP
See \fBQPrinter::pageSize()\fP. 
.PP

.PP
Definition at line 852 of file kprinter.cpp.
.PP
References option().
.PP
Referenced by translateQtOptions().
.SS "void KPrinter::setPageSize (\fBPageSize\fP)"
.PP
See \fBQPrinter::setPageSize()\fP. 
.PP

.PP
Definition at line 615 of file kprinter.cpp.
.PP
References setOption().
.SS "\fBQString\fP KPrinter::printerName () const"
.PP
See \fBQPrinter::printerName()\fP. 
.PP

.PP
Definition at line 864 of file kprinter.cpp.
.PP
Referenced by printFiles().
.SS "void KPrinter::setPrinterName (const \fBQString\fP &)"
.PP
See \fBQPrinter::setPrinterName()\fP. 
.PP

.PP
Definition at line 867 of file kprinter.cpp.
.SS "\fBQString\fP KPrinter::printProgram () const"
.PP
Returns the print program as set by \fBsetPrintProgram()\fP or by the print dialog if a special printer has been selected. 
.PP
\fBReturns:\fP
.RS 4
the print command line 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetPrintProgram()\fP
.RE
.PP

.PP
Definition at line 870 of file kprinter.cpp.
.PP
References option().
.SS "void KPrinter::setPrintProgram (const \fBQString\fP & cmd)"
.PP
Sets the command line to use when printing. 
.PP
This function is useful when using a KPrinter object without the print dialog, to control what to print and how to do it. The command line may contain the following tags: 
.PD 0

.IP "\(bu" 2
in : the input file to the print program. It is required and automatically appended at the end of the command line if not present. 
.IP "\(bu" 2
out : the output file. Use this tag in conjunction with \fBsetOutputToFile()\fP and \fBsetOutputFileName()\fP 
.IP "\(bu" 2
psl : the page size in lower case. This may be useful with some programs like gs. 
.PP
.nf
 void createPNGOutputFile(const QString& filename)
 {
   // use a clean KPrinter object
   KPrinter prt(false);

   prt.setOutputToFile( true );
   prt.setOutputFileName( filename );
   prt.setPrintProgram( 'gs -sDEVICE=png256 -sPAPERSIZE=%psl -sOutputFile=%out %in' );

   QPainter painter( &prt );
   doPaint( &painter );
 }

.fi
.PP
 
.PP
\fBParameters:\fP
.RS 4
\fIcmd\fP the print command line (containing at least the \fCin\fP tag) 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBprintProgram()\fP
.RE
.PP

.PP

.PP
Definition at line 873 of file kprinter.cpp.
.PP
References QString::append(), QString::find(), QString::remove(), setOption(), and setOutputToFile().
.SS "\fBQString\fP KPrinter::printerSelectionOption () const"
.PP
See \fBQPrinter::printerSelectionOption()\fP. 
.PP
Unused.
.PP
Definition at line 891 of file kprinter.cpp.
.PP
References QString::fromLatin1().
.SS "void KPrinter::setPrinterSelectionOption (const \fBQString\fP &)"
.PP
See \fBQPrinter::setPrinterSelectionOption()\fP. 
.PP
Unused
.PP
Definition at line 894 of file kprinter.cpp.
.SS "int KPrinter::currentPage () const"
.PP
Returns the current page number. 
.PP
\fBSee also:\fP
.RS 4
\fBsetCurrentPage()\fP
.RE
.PP

.PP
Definition at line 858 of file kprinter.cpp.
.PP
References option().
.PP
Referenced by pageList().
.SS "void KPrinter::setCurrentPage (int p = \fC0\fP)"
.PP
Sets the current page number. 
.PP
This page number will be used if the user selected 'current page' in the print dialog. This option will only be enabled if the application does page selection itself and the application has called \fBsetCurrentPage()\fP before opening the print dialog: 
.PP
.nf
 MyClass::MyClass()
 {
   // declares my application able to do page selection
   KPrinter::setPageSelection( KPrinter::ApplicationSide );
 }

 void MyClass::doPrint()
 {
   KPrinter printer;

   printer.setCurrentPage( mycurrentpage );
   if ( printer.setup( this ) )
   {
     QValueList<int> pages = printer.pageList();
     // print the pages
     ...
   }
 }

.fi
.PP
 
.PP
\fBParameters:\fP
.RS 4
\fIp\fP the current page number (starting from 1)
.RE
.PP

.PP
Definition at line 861 of file kprinter.cpp.
.PP
References setOption().
.SS "\fBKPrinter::PageSetType\fP KPrinter::pageSet () const"
.PP
Returns the page set of the current KPrinter object. 
.PP

.PP
Definition at line 855 of file kprinter.cpp.
.PP
References option().
.PP
Referenced by pageList().
.SS "bool KPrinter::setup (\fBQWidget\fP * parent = \fC0\fP, const \fBQString\fP & caption = \fCQString::null\fP, bool forceExpand = \fCfalse\fP)"
.PP
Sets up the KPrinter object using the print dialog, returns true if the user clicked OK. 
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP the parent widget to use for the print dialog 
.br
\fIcaption\fP the caption to use in the print dialog 
.br
\fIforceExpand\fP force the expansion of the dialog (the show/hide button will be hidden) 
.RE
.PP
\fBReturns:\fP
.RS 4
boolean value corresponding to the button clicked by the user
.RE
.PP

.PP
Definition at line 219 of file kprinter.cpp.
.PP
References autoConfigure().
.SS "\fBQSize\fP KPrinter::margins () const"
.PP
See \fBQPrinter::margins()\fP. 
.PP

.PP
Definition at line 550 of file kprinter.cpp.
.SS "void KPrinter::setMargins (\fBQSize\fP m)"
.PP
Not used yet. 
.PP

.PP
Definition at line 938 of file kprinter.cpp.
.PP
References QSize::height(), and QSize::width().
.SS "\fBQSize\fP KPrinter::realPageSize () const"
.PP
Returns the page size in dot unit ( 1 dot = 1/72th in ). 
.PP
This method is intended for internal use, if you want to access actual page size, use a \fBQPaintDeviceMetrics\fP object instead. Note that the size returned by this method does not take resolution into account, and that it can returns invalid size if no page metric was found in the printer driver. DO NOT USE, WILL BE REMOVED. 
.PP
\fBSee also:\fP
.RS 4
\fBsetRealPageSize\fP 
.RE
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP

.PP
Definition at line 953 of file kprinter.cpp.
.SS "void KPrinter::setRealPageSize (\fBQSize\fP p)"
.PP
DO NOT USE, WILL BE REMOVED. 
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP

.PP
Definition at line 986 of file kprinter.cpp.
.SS "void KPrinter::setRealDrawableArea (const \fBQRect\fP & r)"
.PP
DO NOT USE, WILL BE REMOVED. 
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP

.PP
Definition at line 992 of file kprinter.cpp.
.SS "\fBQRect\fP KPrinter::realDrawableArea () const"
.PP
DO NOT USE, WILL BE REMOVED. 
.PP
\fBDeprecated\fP
.RS 4
.RE
.PP

.PP
Definition at line 998 of file kprinter.cpp.
.SS "\fBQValueList\fP< int > KPrinter::pageList () const"
.PP
Returns the page list to be printed, correpsonding to the options selected by the user. 
.PP
This takes into account collate, page order, page set, ranges, ... This is useful when the application does page selection itself. 
.PP
\fBSee also:\fP
.RS 4
\fBsetCurrentPage()\fP
.RE
.PP

.PP
Definition at line 470 of file kprinter.cpp.
.PP
References QValueList::append(), QValueList::begin(), QValueList::count(), currentPage(), QValueList::end(), QValueList::find(), maxPage(), minPage(), option(), pageOrder(), pageSet(), QValueList::remove(), and QStringList::split().
.SS "void KPrinter::setPreviewOnly (bool on)"
.PP
Sets the KPrinter object to preview mode if \fCon\fP is true. 
.PP
In this mode, nothing will be printed but only a preview dialog will be popped up with the single 'Close' action. Using this mode, any application can easily implement a preview action: 
.PP
.nf
 void MyClass:doPreview()
 {
   // use a 'clean' KPrinter object (independent from previous print jobs),
   // this is not necessary, it depends on the application
   KPrinter prt( false );
   prt.setPreviewOnly( true );

   QPainter painter( &prt );
   doPrint( &painter );
 }

.fi
.PP
 
.PP
\fBParameters:\fP
.RS 4
\fIon\fP the preview-only state 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBpreviewOnly()\fP
.RE
.PP

.PP
Definition at line 1017 of file kprinter.cpp.
.SS "bool KPrinter::previewOnly () const"
.PP
Returns the preview-only state for this KPrinter object. 
.PP
\fBSee also:\fP
.RS 4
\fBsetPreviewOnly()\fP
.RE
.PP

.PP
Definition at line 1020 of file kprinter.cpp.
.SS "void KPrinter::setResolution (int dpi)"
.PP
Set the resolution of the current KPrinter object. 
.PP
The resolution is given in DPI. This resolution mainly affects the accuracy for object positionning on the paint device, and does not influence the real resolution that will be used by the printer (this should be set in the driver settings). The resolution is usually defined in the constructor. 
.PP
\fBParameters:\fP
.RS 4
\fIdpi\fP the resolution in DPI 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKPrinter()\fP, \fBresolution()\fP
.RE
.PP

.PP
Definition at line 1035 of file kprinter.cpp.
.SS "int KPrinter::resolution () const"
.PP
Resturns the resolution of the current KPrinter object. 
.PP
The resolution is given in DPI. 
.PP
\fBReturns:\fP
.RS 4
resolution in DPI 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetResolution()\fP, \fBKPrinter()\fP
.RE
.PP

.PP
Definition at line 1041 of file kprinter.cpp.
.PP
Referenced by translateQtOptions().
.SS "void KPrinter::setUsePrinterResolution (bool on)"
.PP
Define the KPrinter object to use the actual printer resolution. 
.PP
Under some print systems (CUPS, Foomatic, PostScript printers), it is possible to know the actual resolution that is used by the printer, as selected by the user in the driver settings. If \fCon\fP is true, this KPrinter object will use the actual printer resolution if it is able to extract it. If nothing can be found, the default resolution will be the one defined by the PrinterMode argument used in the KPrinter constructor, or set explicitly by \fBsetResolution()\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIon\fP true if the KPrinter object should use the actual printer resolution 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBresolution()\fP, \fBsetResolution()\fP
.RE
.PP

.PP
Definition at line 1044 of file kprinter.cpp.
.SS "KPrinterImpl * KPrinter::implementation () const"
.PP
For internal use only. 
.PP

.PP
Definition at line 782 of file kprinter.cpp.
.SS "bool KPrinter::printFiles (const \fBQStringList\fP & files, bool removeafter = \fCfalse\fP, bool startviewer = \fCtrue\fP)"
.PP
Prints the files given in argument. 
.PP
This will first filter the files accorsing to the filtering options selected by the user in the print dialog, then send the filtered files to the printer with the print options selected. This function is called automatically when calling \fBQPainter::end()\fP for a painter object constructed on KPrinter. In normal use, you don't need this use this function explicitly.
.PP
Definition at line 358 of file kprinter.cpp.
.PP
References option(), printerName(), and QFile::remove().
.SS "void KPrinter::addDialogPage (\fBKPrintDialogPage\fP * _page)\fC [static]\fP"
.PP
Adds a customized page to the print dialog. 
.PP
The pages will appear in a tab widget in the bottom half of the dialog, along with the standard 'Copies' page. The page must be created and added each time you want open a print dialog with \fBsetup()\fP. If you correctly reimplemented \fBKPrintDialogPage::setOptions()\fP, the settings will be restored from call to call, you don't have to worry about state saving/restoration. 
.PP
\fBParameters:\fP
.RS 4
\fI_page\fP the page to add 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKPrintDialogPage::setOptions()\fP
.RE
.PP

.PP
Definition at line 250 of file kprinter.cpp.
.SS "void KPrinter::setPageSelection (\fBPageSelectionType\fP _mode)\fC [static]\fP"
.PP
Sets the page selection mode of the application. 
.PP
If needed, call this method somewhere at the beginning of your code. The default value is \fCSystemSide\fP. 
.PP
\fBParameters:\fP
.RS 4
\fI_mode\fP the mode for the application 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBpageSelection()\fP
.RE
.PP

.PP
Definition at line 255 of file kprinter.cpp.
.SS "\fBKPrinter::PageSelectionType\fP KPrinter::pageSelection ()\fC [static]\fP"
.PP
Returns the page selection mode of the current application. 
.PP
\fBReturns:\fP
.RS 4
the page selection mode 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetPageSelection()\fP
.RE
.PP

.PP
Definition at line 260 of file kprinter.cpp.
.SS "void KPrinter::setApplicationType (\fBApplicationType\fP type)\fC [static]\fP"
.PP
Sets the application type concerning the print dialog. 
.PP
You probably don't want to use it. For internal use only. 
.PP
\fBParameters:\fP
.RS 4
\fItype\fP the type for this application 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBapplicationType()\fP
.RE
.PP

.PP
Definition at line 265 of file kprinter.cpp.
.SS "\fBKPrinter::ApplicationType\fP KPrinter::applicationType ()\fC [static]\fP"
.PP
Returns the application type concerning the print dialog. 
.PP
For internal use only. 
.PP
\fBReturns:\fP
.RS 4
the type for the current application 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetApplicationType()\fP
.RE
.PP

.PP
Definition at line 270 of file kprinter.cpp.
.SS "void KPrinter::addStandardPage (int p)\fC [static]\fP"
.PP
Adds a standard page to the print dialog. 
.PP
This is not useful yet as there's only one standard page defines \fCCopiesPage\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIp\fP the page identifier 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBStandardPageType\fP
.RE
.PP

.PP
Definition at line 240 of file kprinter.cpp.
.SS "void KPrinter::removeStandardPage (int p)\fC [static]\fP"
.PP
Removes a standard page from the print dialog. 
.PP
If your application doesn't want a standard page in the dialog, simply call this method with the correct identifier. By default, the print dialog includes the \fCCopiesPage\fP page. 
.PP
\fBParameters:\fP
.RS 4
\fIp\fP the page identifier 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBStandardPageType\fP
.RE
.PP

.PP
Definition at line 245 of file kprinter.cpp.
.SS "const \fBQString\fP & KPrinter::option (const \fBQString\fP & key) const"
.PP
The KPrinter object stores all its settings in an internal \fBQMap\fP structure on \fBQString\fP. 
.PP
This allows to store any property. This method allows an application to access any print option from the KPrinter object, using the option name. For example if your application add a customized page to the print dialog, this page will saves its settings into the KPrinter object using this \fBQMap<QString,QString>\fP structure. After showing the print dialog, your application can then access these options using this method. The custom option name should follow the form 'kde-appname-optionname'. 
.PP
.nf
 void MyClass::doPrint()
 {
   KPrinter prt;

   // add my custom page
   prt.addDialogPage( new MyDialogPage() );

   // open print dialog
   if ( prt.setup( this ) )
   {
      QString fntname = prt.option( 'kde-myapp-fontname' );
      ...
      do_something;
      ...
   }
 }

.fi
.PP
 
.PP
\fBParameters:\fP
.RS 4
\fIkey\fP the option name (key) 
.RE
.PP
\fBReturns:\fP
.RS 4
the option value correponding to the key, or QString::null 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKPrintDialogPage\fP, \fBsetOption\fP, \fBoptions()\fP, \fBsetOptions()\fP
.RE
.PP

.PP
Definition at line 785 of file kprinter.cpp.
.PP
Referenced by collate(), colorMode(), creator(), currentPage(), docName(), fromPage(), fullPage(), maxPage(), minPage(), numCopies(), orientation(), outputFileName(), outputToFile(), pageList(), pageOrder(), pageSet(), pageSize(), printFiles(), printProgram(), toPage(), and translateQtOptions().
.SS "void KPrinter::setOption (const \fBQString\fP & key, const \fBQString\fP & value)"
.PP
Adds or modifies an option in the KPrinter object. 
.PP
You probably don't need to use this function explicitly. This will be done implicitely for example when reimplementing \fBKPrintDialogPage::getOptions()\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIkey\fP the option name 
.br
\fIvalue\fP the option value 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBoption()\fP, \fBKPrintDialogPage\fP
.RE
.PP

.PP
Definition at line 788 of file kprinter.cpp.
.PP
Referenced by initOptions(), setCollate(), setColorMode(), setCreator(), setCurrentPage(), setDocName(), setFromTo(), setFullPage(), setMinMax(), setNumCopies(), setOrientation(), setOutputFileName(), setOutputToFile(), setPageOrder(), setPageSize(), and setPrintProgram().
.SS "const \fBQMap\fP< \fBQString\fP, \fBQString\fP > & KPrinter::options () const"
.PP
Returns the complete set of print options from the KPrinter object. 
.PP
For internal use. 
.PP
\fBReturns:\fP
.RS 4
the option set as a \fBQMap\fP object
.RE
.PP

.PP
Definition at line 897 of file kprinter.cpp.
.SS "void KPrinter::setOptions (const \fBQMap\fP< \fBQString\fP, \fBQString\fP > & opts)"
.PP
Sets the option set in one operation. 
.PP
This method has some side effects like merging the internal map with the one given in argument, but only for option in the form 'kde-...'. For internal use only. 
.PP
\fBParameters:\fP
.RS 4
\fIopts\fP the option set to be merged in the KPrinter object
.RE
.PP

.PP
Definition at line 622 of file kprinter.cpp.
.PP
References QMap::begin(), QMap::end(), and QMap::remove().
.SS "void KPrinter::initOptions (const \fBQMap\fP< \fBQString\fP, \fBQString\fP > & opts)"
.PP
For internal use only. 
.PP
Does a similar job as \fBsetOption()\fP, except that all possible internal printers are initialized with the option if it has the form 'kde-...'. 
.PP
\fBParameters:\fP
.RS 4
\fIopts\fP the option set 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetOptions()\fP
.RE
.PP

.PP
Definition at line 645 of file kprinter.cpp.
.PP
References setOption().
.SS "\fBQString\fP KPrinter::searchName () const"
.PP
Returns the search name of the printer selected by the user. 
.PP
Each printer is identified by a unique name. This method is mainly used for state restoration. For internal use. 
.PP
\fBReturns:\fP
.RS 4
the unique printer search name 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetSearchName\fP
.RE
.PP

.PP
Definition at line 900 of file kprinter.cpp.
.SS "void KPrinter::setSearchName (const \fBQString\fP & n)"
.PP
Sets the search name of the KPrinter object. 
.PP
For internal use. 
.PP
\fBParameters:\fP
.RS 4
\fIn\fP the unique printer search name 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsearchName()\fP
.RE
.PP

.PP
Definition at line 903 of file kprinter.cpp.
.SS "\fBQString\fP KPrinter::errorMessage () const"
.PP
Returns the last error message issued by the print system. 
.PP
Unimplemented yet. 
.PP
\fBReturns:\fP
.RS 4
the last error message
.RE
.PP

.PP
Definition at line 1007 of file kprinter.cpp.
.SS "void KPrinter::setErrorMessage (const \fBQString\fP & msg)"
.PP
Sets the last error message. 
.PP
For internal use. 
.PP
\fBParameters:\fP
.RS 4
\fImsg\fP the error message
.RE
.PP

.PP
Definition at line 1010 of file kprinter.cpp.
.SS "bool KPrinter::autoConfigure (const \fBQString\fP & prname = \fCQString::null\fP, \fBQWidget\fP * parent = \fC0\fP)"
.PP
Configure the KPrinter object to be used with the printer named \fCprname\fP. 
.PP
After the call, the KPrinter object can be used without the need to call the print dialog. If \fCprname\fP is empty, then the KPrinter object is configured for the default printer. If \fCprname\fP corresponds to a pseudo-printer which needs an output file, a file dialog will be used. In that case, providing a parent widget for that dialog in \fCparent\fP may be useful. 
.PP
\fBParameters:\fP
.RS 4
\fIprname\fP the name of the printer for which the KPrinter object has to be configured 
.br
\fIparent\fP a parent widget, used a parent for a file dialog 
.RE
.PP
\fBReturns:\fP
.RS 4
boolean flag: if false, the KPrinter has not been correctly set up, and the application shouldn't use it to print. This may happen if the printer named \fCprname\fP has not been found or if the user clicked 'Cancel' in the file dialog. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetup()\fP
.RE
.PP

.PP
Definition at line 667 of file kprinter.cpp.
.PP
Referenced by setup().
.SS "void KPrinter::setDocFileName (const \fBQString\fP & filename)"
.PP
Set the default document filename. 
.PP
This filename will be used as the default basename for the output file, instead of the default 'print'. For example, by using setDocFileName('my_document'), the default output file will be $HOME/my_document.ps. 
.PP
\fBParameters:\fP
.RS 4
\fIfilename\fP the default document basename to use 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBdocFileName()\fP
.RE
.PP

.PP
Definition at line 1023 of file kprinter.cpp.
.SS "\fBQString\fP KPrinter::docFileName () const"
.PP
Get the default document filename, that is the default basename used for the output file. 
.PP
\fBReturns:\fP
.RS 4
the default document basename 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetDocFileName()\fP
.RE
.PP

.PP
Definition at line 1026 of file kprinter.cpp.
.SS "void KPrinter::setDocDirectory (const \fBQString\fP & dir)"
.PP
Set the default document directory. 
.PP
This directory will be used as the default location for any output file. If not set, $HOME directory is used instead. 
.PP
\fBParameters:\fP
.RS 4
\fIdir\fP the new default output directory 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBdocDirectory()\fP
.RE
.PP

.PP
Definition at line 1029 of file kprinter.cpp.
.SS "\fBQString\fP KPrinter::docDirectory () const"
.PP
Get the default document directory, that is the directory used for any output file. 
.PP
By default, it is the $HOME directory. 
.PP
\fBReturns:\fP
.RS 4
the default output directory 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetDocDirectory\fP
.RE
.PP

.PP
Definition at line 1032 of file kprinter.cpp.
.PP
References QDir::homeDirPath().
.SS "void KPrinter::translateQtOptions ()\fC [protected]\fP"
.PP
Scale margings as the margin widget always stores values in dot units ( 1/72th in ), to be resolution independent when specified by the user ( who usually specifies margins in metric units ).
.PP
Definition at line 296 of file kprinter.cpp.
.PP
References colorMode(), creator(), docName(), fullPage(), numCopies(), option(), orientation(), pageSize(), and resolution().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeprint Library from the source code.
