com.trolltech.qt.gui
Class QPrinterInfo

java.lang.Object
  extended by com.trolltech.qt.QSignalEmitter
      extended by com.trolltech.qt.QtJambiObject
          extended by com.trolltech.qt.gui.QPrinterInfo
All Implemented Interfaces:
QtJambiInterface, java.lang.Cloneable

public class QPrinterInfo
extends QtJambiObject
implements java.lang.Cloneable

The QPrinterInfo class gives access to information about existing printers. Use the static functions 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9
 
Constructor Summary
QPrinterInfo()
          Constructs an empty QPrinterInfo object.
QPrinterInfo(QPrinter printer)
          Constructs a QPrinterInfo object from printer.
QPrinterInfo(QPrinterInfo src)
          Constructs a copy of src.
 
Method Summary
static java.util.List availablePrinters()
          Returns a list of available printers on the system.
 QPrinterInfo clone()
          This method is reimplemented for internal reasons
static QPrinterInfo defaultPrinter()
          Returns the default printer on the system.
static QPrinterInfo fromNativePointer(QNativePointer nativePointer)
          This method returns the QPrinterInfo instance pointed to by nativePointer.
 boolean isDefault()
          Returns whether this printer is the default printer.
 boolean isNull()
          Returns whether this QPrinterInfo object holds a printer definition.
static QNativePointer nativePointerArray(QPrinterInfo[] array)
          This function returns a QNativePointer that is pointing to the specified QPrinterInfo array.
 java.lang.String printerName()
          Returns the name of the printer.
 java.util.List supportedPaperSizes()
          Returns a list of supported paper sizes by the printer.
 
Methods inherited from class com.trolltech.qt.QtJambiObject
dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr
 
Methods inherited from class com.trolltech.qt.QSignalEmitter
blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.trolltech.qt.QtJambiInterface
disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership
 

Constructor Detail

QPrinterInfo

public QPrinterInfo()
Constructs an empty QPrinterInfo object.

See also:
isNull().


QPrinterInfo

public QPrinterInfo(QPrinter printer)
Constructs a QPrinterInfo object from printer.


QPrinterInfo

public QPrinterInfo(QPrinterInfo src)
Constructs a copy of src.

Method Detail

isDefault

public final boolean isDefault()
Returns whether this printer is the default printer.


isNull

public final boolean isNull()
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.


printerName

public final java.lang.String printerName()
Returns the name of the printer.

See also:
QPrinter::setPrinterName().


supportedPaperSizes

public final java.util.List supportedPaperSizes()
Returns a list of supported paper sizes by the printer.

Not all printer drivers support this query, so the list may be empty.


availablePrinters

public static java.util.List availablePrinters()
Returns a list of available printers on the system.


defaultPrinter

public static QPrinterInfo defaultPrinter()
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.

See also:
isNull().


fromNativePointer

public static QPrinterInfo fromNativePointer(QNativePointer nativePointer)
This method returns the QPrinterInfo instance pointed to by nativePointer.


nativePointerArray

public static QNativePointer nativePointerArray(QPrinterInfo[] array)
This function returns a QNativePointer that is pointing to the specified QPrinterInfo array.


clone

public QPrinterInfo clone()
This method is reimplemented for internal reasons

Overrides:
clone in class java.lang.Object