okular
#include <fileprinter.h>
|
static bool | cupsAvailable () |
|
static QList< int > | pageList (QPrinter &printer, int lastPage, int currentPage, const QList< int > &selectedPageList) |
|
static QList< int > | pageList (QPrinter &printer, int lastPage, const QList< int > &selectedPageList) |
|
static QString | pageListToPageRange (const QList< int > &pageList) |
|
static QString | pageRange (QPrinter &printer, int lastPage, const QList< int > &selectedPageList) |
|
static bool | pdf2psAvailable () |
|
static Generator::PrintError | printError (int c) |
|
static int | printFile (QPrinter &printer, const QString file, QPrinter::Orientation documentOrientation, FileDeletePolicy fileDeletePolicy=FilePrinter::ApplicationDeletesFiles, PageSelectPolicy pageSelectPolicy=FilePrinter::ApplicationSelectsPages, const QString &pageRange=QString()) |
|
static bool | ps2pdfAvailable () |
|
static QSize | psPaperSize (QPrinter &printer) |
|
|
QStringList | copies (QPrinter &printer, const QString &version) |
|
QStringList | cupsOptions (QPrinter &printer, QPrinter::Orientation documentOrientation) |
|
QStringList | deleteFile (QPrinter &printer, FileDeletePolicy fileDeletePolicy, const QString &version) |
|
QStringList | destination (QPrinter &printer, const QString &version) |
|
bool | detectCupsConfig () |
|
bool | detectCupsService () |
|
int | doPrintFiles (QPrinter &printer, const QStringList fileList, FileDeletePolicy fileDeletePolicy, PageSelectPolicy pageSelectPolicy, const QString &pageRange, QPrinter::Orientation documentOrientation) |
|
QStringList | jobname (QPrinter &printer, const QString &version) |
|
QString | mediaPageSize (QPrinter &printer) |
|
QString | mediaPaperSource (QPrinter &printer) |
|
QStringList | optionCollateCopies (QPrinter &printer) |
|
QStringList | optionCupsProperties (QPrinter &printer) |
|
QStringList | optionDoubleSidedPrinting (QPrinter &printer) |
|
QStringList | optionMedia (QPrinter &printer) |
|
QStringList | optionOrientation (QPrinter &printer, QPrinter::Orientation documentOrientation) |
|
QStringList | optionPageMargins (QPrinter &printer) |
|
QStringList | optionPageOrder (QPrinter &printer) |
|
QStringList | pages (QPrinter &printer, PageSelectPolicy pageSelectPolicy, const QString &pageRange, bool useCupsOptions, const QString &version) |
|
QStringList | printArguments (QPrinter &printer, FileDeletePolicy fileDeletePolicy, PageSelectPolicy pageSelectPolicy, bool useCupsOptions, const QString &pageRange, const QString &version, QPrinter::Orientation documentOrientation) |
|
Definition at line 28 of file fileprinter.h.
Whether file(s) get deleted by the application or by the print system.
You may need to chose system deletion if your temp file clean-up deletes the file before the print system is finished with it.
Enumerator |
---|
ApplicationDeletesFiles |
|
SystemDeletesFiles |
|
Definition at line 37 of file fileprinter.h.
Whether pages to be printed are selected by the application or the print system.
If application side, then the generated file will only contain those pages selected by the user, so FilePrinter will print all the pages in the file.
If system side, then the file will contain all the pages in the document, and the print system will print the users selected print range from out of the file.
Note system side only works in CUPS, not LPR.
Enumerator |
---|
ApplicationSelectsPages |
|
SystemSelectsPages |
|
Definition at line 49 of file fileprinter.h.
QStringList FilePrinter::copies |
( |
QPrinter & |
printer, |
|
|
const QString & |
version |
|
) |
| |
|
protected |
bool FilePrinter::cupsAvailable |
( |
| ) |
|
|
static |
Return if CUPS Print System is available on this system.
- Returns
- Returns true if CUPS available
Definition at line 236 of file fileprinter.cpp.
QStringList FilePrinter::cupsOptions |
( |
QPrinter & |
printer, |
|
|
QPrinter::Orientation |
documentOrientation |
|
) |
| |
|
protected |
QStringList FilePrinter::deleteFile |
( |
QPrinter & |
printer, |
|
|
FileDeletePolicy |
fileDeletePolicy, |
|
|
const QString & |
version |
|
) |
| |
|
protected |
QStringList FilePrinter::destination |
( |
QPrinter & |
printer, |
|
|
const QString & |
version |
|
) |
| |
|
protected |
bool FilePrinter::detectCupsConfig |
( |
| ) |
|
|
protected |
bool FilePrinter::detectCupsService |
( |
| ) |
|
|
protected |
int FilePrinter::doPrintFiles |
( |
QPrinter & |
printer, |
|
|
const QStringList |
fileList, |
|
|
FileDeletePolicy |
fileDeletePolicy, |
|
|
PageSelectPolicy |
pageSelectPolicy, |
|
|
const QString & |
pageRange, |
|
|
QPrinter::Orientation |
documentOrientation |
|
) |
| |
|
protected |
QStringList FilePrinter::jobname |
( |
QPrinter & |
printer, |
|
|
const QString & |
version |
|
) |
| |
|
protected |
QString FilePrinter::mediaPageSize |
( |
QPrinter & |
printer | ) |
|
|
protected |
QString FilePrinter::mediaPaperSource |
( |
QPrinter & |
printer | ) |
|
|
protected |
QStringList FilePrinter::optionCollateCopies |
( |
QPrinter & |
printer | ) |
|
|
protected |
QStringList FilePrinter::optionCupsProperties |
( |
QPrinter & |
printer | ) |
|
|
protected |
QStringList FilePrinter::optionDoubleSidedPrinting |
( |
QPrinter & |
printer | ) |
|
|
protected |
QStringList FilePrinter::optionMedia |
( |
QPrinter & |
printer | ) |
|
|
protected |
QStringList FilePrinter::optionOrientation |
( |
QPrinter & |
printer, |
|
|
QPrinter::Orientation |
documentOrientation |
|
) |
| |
|
protected |
QStringList FilePrinter::optionPageMargins |
( |
QPrinter & |
printer | ) |
|
|
protected |
QStringList FilePrinter::optionPageOrder |
( |
QPrinter & |
printer | ) |
|
|
protected |
QList< int > FilePrinter::pageList |
( |
QPrinter & |
printer, |
|
|
int |
lastPage, |
|
|
int |
currentPage, |
|
|
const QList< int > & |
selectedPageList |
|
) |
| |
|
static |
Return the list of pages selected by the user in the Print Dialog.
- Parameters
-
printer | the print settings to use |
lastPage | the last page number, needed if AllPages option is selected |
currentPage | the current page number, needed if CurrentPage option is selected |
selectedPageList | list of pages to use if Selection option is selected |
- Returns
- Returns list of pages to print
Definition at line 150 of file fileprinter.cpp.
QList< int > FilePrinter::pageList |
( |
QPrinter & |
printer, |
|
|
int |
lastPage, |
|
|
const QList< int > & |
selectedPageList |
|
) |
| |
|
static |
Return the list of pages selected by the user in the Print Dialog.
- Parameters
-
printer | the print settings to use |
lastPage | the last page number, needed if AllPages option is selected |
selectedPageList | list of pages to use if Selection option is selected |
- Returns
- Returns list of pages to print
Definition at line 145 of file fileprinter.cpp.
QString FilePrinter::pageListToPageRange |
( |
const QList< int > & |
pageList | ) |
|
|
static |
convert a Page List into a Page Range
- Parameters
-
pageList | list of pages to convert |
- Returns
- Returns equivalent page range
Definition at line 193 of file fileprinter.cpp.
QString FilePrinter::pageRange |
( |
QPrinter & |
printer, |
|
|
int |
lastPage, |
|
|
const QList< int > & |
selectedPageList |
|
) |
| |
|
static |
Return the range of pages selected by the user in the Print Dialog.
- Parameters
-
printer | the print settings to use |
lastPage | the last page number, needed if AllPages option is selected |
selectedPageList | list of pages to use if Selection option is selected |
- Returns
- Returns range of pages to print
Definition at line 180 of file fileprinter.cpp.
QStringList FilePrinter::pages |
( |
QPrinter & |
printer, |
|
|
PageSelectPolicy |
pageSelectPolicy, |
|
|
const QString & |
pageRange, |
|
|
bool |
useCupsOptions, |
|
|
const QString & |
version |
|
) |
| |
|
protected |
bool FilePrinter::pdf2psAvailable |
( |
| ) |
|
|
static |
Return if Ghostscript pdf2ps is available on this system.
- Returns
- Returns true if Ghostscript pdf2ps available
Definition at line 231 of file fileprinter.cpp.
QStringList FilePrinter::printArguments |
( |
QPrinter & |
printer, |
|
|
FileDeletePolicy |
fileDeletePolicy, |
|
|
PageSelectPolicy |
pageSelectPolicy, |
|
|
bool |
useCupsOptions, |
|
|
const QString & |
pageRange, |
|
|
const QString & |
version, |
|
|
QPrinter::Orientation |
documentOrientation |
|
) |
| |
|
protected |
Convert the code returned by printFile* to PrintError.
- Since
- 0.11 (KDE 4.5)
Definition at line 318 of file fileprinter.cpp.
Print a file using the settings in QPrinter.
Only supports CUPS and LPR on *NIX. Page Range only supported in CUPS. Most settings unsupported by LPR, some settings unsupported by CUPS.
The documentOrientation parameter was added in version 0.14.
- Parameters
-
printer | the print settings to use |
file | the file to print |
documentOrientation | the orientation stored in the document itself |
fileDeletePolicy | if the application or system deletes the file |
pageSelectPolicy | if the application or system selects the pages to print |
pageRange | page range to print if SystemSlectsPages and user chooses Selection in Print Dialog |
- Returns
- Returns exit code: -9 if lpr not found -8 if empty file name -7 if unable to find file -6 if invalid printer state -5 if print to file copy failed -2 if the KProcess could not be started -1 if the KProcess crashed otherwise the KProcess exit code
- Since
- 0.14 (KDE 4.8)
Definition at line 36 of file fileprinter.cpp.
bool FilePrinter::ps2pdfAvailable |
( |
| ) |
|
|
static |
Return if Ghostscript ps2pdf is available on this system.
- Returns
- Returns true if Ghostscript ps2pdf available
Definition at line 226 of file fileprinter.cpp.
QSize FilePrinter::psPaperSize |
( |
QPrinter & |
printer | ) |
|
|
static |
Returns the postscript standard page size.
- Returns
- Returns paper size in ps points
Definition at line 271 of file fileprinter.cpp.
The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:45:03 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.