Qt Jambi Home

com.trolltech.qt.gui
Enum QPrinter.PrinterMode

java.lang.Object
  extended by java.lang.Enum<QPrinter.PrinterMode>
      extended by com.trolltech.qt.gui.QPrinter.PrinterMode
All Implemented Interfaces:
QtEnumerator, java.io.Serializable, java.lang.Comparable<QPrinter.PrinterMode>
Enclosing class:
QPrinter

public static enum QPrinter.PrinterMode
extends java.lang.Enum<QPrinter.PrinterMode>
implements QtEnumerator

This enum describes the mode the printer should work in. It basically presets a certain resolution and working mode.

Note: When rendering text on a QPrinter device, it is important to realize that the size of text, when specified in points, is independent of the resolution specified for the device itself. Therefore, it may be useful to specify the font size in pixels when combining text with graphics to ensure that their relative sizes are what you expect.


Enum Constant Summary
HighResolution
          On Windows, sets the printer resolution to that defined for the printer in use.
PrinterResolution
          This value is deprecated.
ScreenResolution
          Sets the resolution of the print device to the screen resolution.
 
Method Summary
static QPrinter.PrinterMode resolve(int value)
           
 int value()
          This function should return an integer value for the enum values of the enumeration that implements this interface.
static QPrinter.PrinterMode valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static QPrinter.PrinterMode[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ScreenResolution

public static final QPrinter.PrinterMode ScreenResolution

Sets the resolution of the print device to the screen resolution. This has the big advantage that the results obtained when painting on the printer will match more or less exactly the visible output on the screen. It is the easiest to use, as font metrics on the screen and on the printer are the same. This is the default value. ScreenResolution will produce a lower quality output than HighResolution and should only be used for drafts.


PrinterResolution

public static final QPrinter.PrinterMode PrinterResolution

This value is deprecated. Is is equivalent to ScreenResolution on Unix and HighResolution on Windows and Mac. Due do the difference between ScreenResolution and HighResolution, use of this value may lead to non-portable printer code.


HighResolution

public static final QPrinter.PrinterMode HighResolution

On Windows, sets the printer resolution to that defined for the printer in use. For PostScript printing, sets the resolution of the PostScript driver to 1200 dpi.

Method Detail

values

public static final QPrinter.PrinterMode[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(QPrinter.PrinterMode c : QPrinter.PrinterMode.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static QPrinter.PrinterMode valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

value

public int value()
Description copied from interface: QtEnumerator
This function should return an integer value for the enum values of the enumeration that implements this interface.

Specified by:
value in interface QtEnumerator

resolve

public static QPrinter.PrinterMode resolve(int value)

Qt Jambi Home