gtk.PrintSettings — Stores print settings (new in PyGTK 2.10)
class gtk.PrintSettings(gobject.GObject): |
A gtk.PrintSettings object represents the settings of a print dialog in a system-independent way. The main use for this object is that once you've printed you can get a settings object that represents the settings the user chose, and the next time you print you can pass that object in so that the user doesn't have to re-set all his settings.
Its also possible to enumerate the settings so that you can easily save the settings for the next time your app runs, or even store them in a document. The predefined keys try to use shared values as much as possible so that moving such a document between systems still works.
Printing support was added in GTK+ 2.10.
|
Returns : | a new gtk.PrintSettings object |
This constructor is available in PyGTK 2.10 and above.
Creates a new gtk.PrintSettings object.
|
Returns : | a newly allocated copy of the print settings |
This method is available in PyGTK 2.10 and above.
Returns a copy of this gtk.PrintSettings object.
|
key : | a key |
Returns : | TRUE, if key has a value |
This method is available in PyGTK 2.10 and above.
Returns TRUE, if a value is associated with key.
|
key : | a key |
Returns : | the string value for key |
This method is available in PyGTK 2.10 and above.
Looks up the string value associated with key.
|
key : | a key |
value : | a string value, or None |
This method is available in PyGTK 2.10 and above.
Associates value with key.
|
key : | a key |
This method is available in PyGTK 2.10 and above.
Removes any value associated with key. This has the same effect as setting the value to None.
|
func : | the function to call |
user_data : | user data for func |
This method is available in PyGTK 2.10 and above.
Calls func for each key-value pair.
The signature of func is:
def func(key, value, data): |
where key and value are the key-value pair and data is user_data.
|
key : | a key |
Returns : | TRUE, if key maps to a true value. |
This method is available in PyGTK 2.10 and above.
Returns the boolean represented by the value that is associated with key.
|
key : | a key |
value : | a boolean |
This method is available in PyGTK 2.10 and above.
Sets key to the boolean value specified by value..
|
key : | a key |
Returns : | the double value of key |
This method is available in PyGTK 2.10 and above.
Returns the double value associated with key, or 0.
|
key : | a key |
def : | the default value |
Returns : | the floating point number associated with key |
This method is available in PyGTK 2.10 and above.
Returns the floating point number represented by the value that is associated with key, or def if the value does not represent a floating point number.
|
key : | a key |
value : | a double value |
This method is available in PyGTK 2.10 and above.
Sets key to the given double value.
|
key : | a key |
unit : | the unit of the return value |
Returns : | the length value of key, converted to unit |
This method is available in PyGTK 2.10 and above.
Returns the value associated with key, interpreted as a length. The returned value is converted to the units specified by unit.
|
key : | a key |
value : | a length |
unit : | the unit of length |
This method is available in PyGTK 2.10 and above.
Associates a length in units of unit with key.
|
key : | a key |
Returns : | the integer value of key |
This method is available in PyGTK 2.10 and above.
Returns the integer value of key, or 0.
|
key : | a key |
def : | the default value |
Returns : | the integer value of key |
This method is available in PyGTK 2.10 and above.
Returns the value of key, interpreted as an integer, or the default value specified by def.
|
key : | a key |
value : | an integer |
This method is available in PyGTK 2.10 and above.
Sets key to the given integer value.
|
Returns : | the printer name |
This method is available in PyGTK 2.10 and above.
Convenience method to obtain the value of the "printer" key.
|
printer : | the printer name |
This method is available in PyGTK 2.10 and above.
Convenience function to set the "printer" key the value specified by printer.
|
Returns : | the orientation |
This method is available in PyGTK 2.10 and above.
Get the value of the "orientation" key, converted to one of the GTK Page Orientation Constants.
|
orientation : | a page orientation |
This method is available in PyGTK 2.10 and above.
Sets the value of the "orientation" key to one of the GTK Page Orientation Constants specified by orientation.
|
Returns : | the paper size |
This method is available in PyGTK 2.10 and above.
Gets the value of the "paper-format" key, converted to a gtk.PaperSize.
|
paper_size : | a paper size |
This method is available in PyGTK 2.10 and above.
Sets the value of the "paper-format", "paper-width" and "paper-height" keys using the gtk.PaperSize specified by paper_size.
|
unit : | the unit for the return value |
Returns : | the paper width, in units of unit |
This method is available in PyGTK 2.10 and above.
Retuens the value of the "printer-width" key converted to the units specified by unit.
|
width : | the paper width |
unit : | the units of width |
This method is available in PyGTK 2.10 and above.
Sets the value of the "printer-width" key using the units specified by unit.
|
unit : | the units for the return value |
Returns : | the paper height, in units of unit |
This method is available in PyGTK 2.10 and above.
Gets the value of the "paper-height" key converted to the units specified by unit.
|
height : | the paper height |
unit : | the units of height |
This method is available in PyGTK 2.10 and above.
Sets the value of the "paper-height" key using the units specified by unit.
|
Returns : | whether to use color |
This method is available in PyGTK 2.10 and above.
Returns the value of the "use-color" key. If TRUE color will be used when printing.
|
use_color : | if TRUE use color |
This method is available in PyGTK 2.10 and above.
Sets the value of the "use-color" key to the value specified by use_color. If use_color is TRUE color will be used when printing.
|
Returns : | TRUE if the printed pages are to be collated |
This method is available in PyGTK 2.10 and above.
Returns the value of the "collate" key.
|
collate : | if TRUE, collate the output |
This method is available in PyGTK 2.10 and above.
Sets the value of the "collate" key. If collate is TRUE the output pages will be collated.
|
Returns : | TRUE if the order of the printed pages shoudl be reversed. |
This method is available in PyGTK 2.10 and above.
Returns the value of the "reverse" key.
|
reverse : | if TRUE reverse the output |
This method is available in PyGTK 2.10 and above.
Sets the value of the "reverse" key. If reverse is TRUE the output pages willl be reversed.
|
Returns : | the "duplex" key. |
This method is available in PyGTK 2.10 and above.
Returns the value of the "duplex" key - one of the GTK Print Duplex Constants.
|
duplex : | one of the GTK Print Duplex Constants |
This method is available in PyGTK 2.10 and above.
Sets the value of the "duplex" key. duplexp must be one of the GTK Print Duplex Constants
|
Returns : | the print quality |
This method is available in PyGTK 2.10 and above.
Returns the value of the "quality" key.
|
quality : | one of the GTK Print Quality Constants |
This method is available in PyGTK 2.10 and above.
Sets the value of the "quality" key. quality must be one of the GTK Print Quality Constants.
|
Returns : | the number of copies to print |
This method is available in PyGTK 2.10 and above.
Returns the value of the "n-copies" key.
|
num_copies : | the number of copies |
This method is available in PyGTK 2.10 and above.
Sets the value of the "n-copies" key to the value specified by num_copies.
|
Returns : | the number of pages per sheet |
This method is available in PyGTK 2.10 and above.
Returns the value of the "number-up" key which specifies the number of pages per sheet.
|
number_up : | the number of pages per sheet |
This method is available in PyGTK 2.10 and above.
Sets the value of the "number-up" key. number_up specifies the number of document pages to be printed per sheet.
|
Returns : | the resolution in dpi |
This method is available in PyGTK 2.10 and above.
Returns the value of the "resolution" key in dpi.
|
resolution : | the resolution in dpi |
This method is available in PyGTK 2.10 and above.
Sets the value of the "resolution" key in dpi.
|
Returns : | the scale in percent |
This method is available in PyGTK 2.10 and above.
Returns the value of the "scale" key as a float number.
|
scale : | the scale in percent |
This method is available in PyGTK 2.10 and above.
Sets the value of the "scale" key using the float number specified by scale.
|
Returns : | which pages to print |
This method is available in PyGTK 2.10 and above.
Returns the value of the "print-pages" key as one if the GTK Print Pages Constants.
|
pages : | one if the GTK Print Pages Constants |
This method is available in PyGTK 2.10 and above.
Sets the value of the "print-pages" key to one of the GTK Print Pages Constants.
|
Returns : | a list of [age ranges as 2-tuples |
This method is available in PyGTK 2.10 and above.
Returns the value of the "page-ranges" key as a list of 2-tuples containing the start and end page numbers of each range.
|
page_ranges : | a sequence of page range 2-tuples |
This method is available in PyGTK 2.10 and above.
Sets the value of the "page-ranges" key to the value of page_ranges which should be a sequence of 2-tuples containing the start and end page numbers of each page range.
|
Returns : | the set of pages to print |
This method is available in PyGTK 2.10 and above.
Returns the value of the "page-set" key which is one of the GTK Page Set Constants.
|
page_set : | one of the GTK Page Set Constants |
This method is available in PyGTK 2.10 and above.
Sets the value of the "page-set" key to the value specified by page_set which should be one of the GTK Page Set Constants.
|
Returns : | the default source |
This method is available in PyGTK 2.10 and above.
Returns the value of the "default-source" key.
|
default_source : | the default source |
This method is available in PyGTK 2.10 and above.
Sets the value of the "default-source" key to the string specified by default_source.
|
Returns : | the media type |
This method is available in PyGTK 2.10 and above.
Returns the value of the "media-type" key.
The set of media types is defined in PWG 5101.1-2002 PWG.
|
media_type : | the media type |
This method is available in PyGTK 2.10 and above.
Sets the value of the "media-type" key.
The set of media types is defined in PWG 5101.1-2002 PWG.
|
Returns : | the dithering that is used |
This method is available in PyGTK 2.10 and above.
Returns the value of the "dither" key.
|
dither : | the dithering that is used |
This method is available in PyGTK 2.10 and above.
Sets the value of the "dither" key to the string specified by dither.
|
Returns : | the finishings |
This method is available in PyGTK 2.10 and above.
Returns the value of the "finishings" key.
|
finishings : | the finishings |
This method is available in PyGTK 2.10 and above.
Sets the value of the "finishings" key to the string specified by finishings.