CopperSpice API
1.9.2
|
The QPrinterInfo class gives access to information about existing printers. More...
Public Methods | |
QPrinterInfo () | |
QPrinterInfo (const QPrinter &printer) | |
QPrinterInfo (const QPrinterInfo &other) | |
~QPrinterInfo () | |
QPrinter::DuplexMode | defaultDuplexMode () const |
QPageSize | defaultPageSize () const |
QString | description () const |
bool | isDefault () const |
bool | isNull () const |
bool | isRemote () const |
QString | location () const |
QString | makeAndModel () const |
QPageSize | maximumPhysicalPageSize () const |
QPageSize | minimumPhysicalPageSize () const |
QPrinterInfo & | operator= (const QPrinterInfo &other) |
QString | printerName () const |
QPrinter::PrinterState | state () const |
QList< QPrinter::DuplexMode > | supportedDuplexModes () const |
QList< QPageSize > | supportedPageSizes () const |
QList< int > | supportedResolutions () const |
bool | supportsCustomPageSizes () const |
Static Public Methods | |
static QStringList | availablePrinterNames () |
static QList< QPrinterInfo > | availablePrinters () |
static QPrinterInfo | defaultPrinter () |
static QString | defaultPrinterName () |
static QPrinterInfo | printerInfo (const QString &printerName) |
Friends | |
class | QPlatformPrinterSupport |
The QPrinterInfo class gives access to information about existing printers.
Use the static methods to generate a list of QPrinterInfo objects. Each QPrinterInfo object in the list represents a single printer and can be queried for name, supported paper sizes, and whether or not it is the default printer.
QPrinterInfo::QPrinterInfo | ( | ) |
Constructs an empty QPrinterInfo object.
QPrinterInfo::QPrinterInfo | ( | const QPrinterInfo & | other | ) |
Constructs a new QPrinterInfo from other.
|
explicit |
Constructs a QPrinterInfo object from printer.
QPrinterInfo::~QPrinterInfo | ( | ) |
Destroys the QPrinterInfo object. References to the values in the object become invalid.
|
static |
Returns a list of all the available Printer Names on this system. It is recommended to use this method instead of availablePrinters() as it will be faster on most systems.
The list may become outdated if changes are made on the local system or remote print server. Only instantiate required QPrinterInfo instances when needed, and always check for validity before calling.
|
static |
Returns a list of available printers on the system.
QPrinter::DuplexMode QPrinterInfo::defaultDuplexMode | ( | ) | const |
Returns the default duplex mode of this printer.
QPageSize QPrinterInfo::defaultPageSize | ( | ) | const |
Returns the current default QPageSize for this printer.
|
static |
Returns the default printer on the system. The return value should be checked using isNull() before being used, in case there is no default printer.
|
static |
Returns the current default printer name.
QString QPrinterInfo::description | ( | ) | const |
Returns the readable description of the printer.
bool QPrinterInfo::isDefault | ( | ) | const |
Returns whether this printer is the default printer.
bool QPrinterInfo::isNull | ( | ) | const |
Returns whether this QPrinterInfo object holds a printer definition. An empty QPrinterInfo object could result for example from calling defaultPrinter() when there are no printers on the system.
bool QPrinterInfo::isRemote | ( | ) | const |
Returns whether this printer is a remote network printer.
QString QPrinterInfo::location | ( | ) | const |
Returns the readable location of the printer.
QString QPrinterInfo::makeAndModel | ( | ) | const |
Returns a readable make and model of the printer.
QPageSize QPrinterInfo::maximumPhysicalPageSize | ( | ) | const |
Returns the maximum physical page size supported by this printer.
QPageSize QPrinterInfo::minimumPhysicalPageSize | ( | ) | const |
Returns the minimum physical page size supported by this printer.
QPrinterInfo & QPrinterInfo::operator= | ( | const QPrinterInfo & | other | ) |
Sets the QPrinterInfo object to be equal to other.
|
static |
Returns the printerName. The return value should be checked using isNull() before being used, in case the named printer does not exist.
QString QPrinterInfo::printerName | ( | ) | const |
Returns the name of the printer.
QPrinter::PrinterState QPrinterInfo::state | ( | ) | const |
Returns the current state of this printer. This state may not always be accurate, depending on the platform, printer driver, or printer itself.
QList< QPrinter::DuplexMode > QPrinterInfo::supportedDuplexModes | ( | ) | const |
Returns a list of duplex modes supported by this printer.
Returns a list of every QPageSize supported by this printer.
QList< int > QPrinterInfo::supportedResolutions | ( | ) | const |
Returns a list of resolutions supported by this printer.
bool QPrinterInfo::supportsCustomPageSizes | ( | ) | const |
Returns whether this printer supports custom page sizes.