Scribus
Open source desktop publishing at your fingertips
PrinterUtil Class Reference

Static Public Member Functions

static QStringList getPrinterNames ()
 
static bool getPrinterMarginValues (const QString &printerName, const QString &pageSize, double &ptsTopMargin, double &m_ptsBottomMargin, double &m_ptsLeftMargin, double &m_ptsRightMargin)
 Get the 4 minimum page margins for a certain paper size on the given printer. More...
 
static PrintEngine getDefaultPrintEngine (const QString &printerName, bool toFile)
 Get default print engine for a specific printer. More...
 
static PrintEngineMap getPrintEngineSupport (const QString &printerName, bool toFile)
 Get print engines supported by a specific printer. More...
 
static bool checkPrintEngineSupport (const QString &printerName, PrintEngine engine, bool toFile)
 Check if a print engine is supported by a specific printer. More...
 
static bool isPostscriptPrinter (QString printerName)
 Check if a specified printer supports postscript input. More...
 

Member Function Documentation

bool PrinterUtil::checkPrintEngineSupport ( const QString &  printerName,
PrintEngine  engine,
bool  toFile 
)
static

Check if a print engine is supported by a specific printer.

Parameters
printerNamethe printer name
enginethe print engine for which support is to be checked
toFileif file printing is planned
PrintEngine PrinterUtil::getDefaultPrintEngine ( const QString &  printerName,
bool  toFile 
)
static

Get default print engine for a specific printer.

Parameters
printerNamethe printer name
toFileif file printing is planned
PrintEngineMap PrinterUtil::getPrintEngineSupport ( const QString &  printerName,
bool  toFile 
)
static

Get print engines supported by a specific printer.

Parameters
printerNamethe printer name
toFileif file printing is planned
bool PrinterUtil::getPrinterMarginValues ( const QString &  printerName,
const QString &  pageSize,
double &  ptsTopMargin,
double &  m_ptsBottomMargin,
double &  m_ptsLeftMargin,
double &  m_ptsRightMargin 
)
static

Get the 4 minimum page margins for a certain paper size on the given printer.

Parameters
printerNamethe printer name
pageSizethe page size to get the margins for
ptsTopMarginthe page's top margin in points
m_ptsBottomMarginthe page's bottom margin in points
m_ptsLeftMarginthe page's left margin in points
m_ptsRightMarginthe page's right margin in points
Return values
booltrue on success
bool PrinterUtil::isPostscriptPrinter ( QString  printerName)
static

Check if a specified printer supports postscript input.

On Windows, the function test postscript support for a specified printer and return true if ps is supported On non Windows systems, the function always return true

Parameters
printerNamethe printer name
Returns
true is printer support postscript, false otherwise.

The documentation for this class was generated from the following files: