gnomeprint.Config
Prev | The Gnomeprint Class Reference | Next

## gnomeprint.Config

gnomeprint.Config — Config object for GnomePrint

## Synopsis

    class gnomeprint.Config(gobject.GObject):
        gnomeprint.Config()
        def dup()
        def get(key)
        def set(key, value)
        def get_boolean(key, val)
        def get_int(key, val)
        def get_double(key, val)
        def get_lenght(key, val, unit)
        def set_boolean(key, val)
        def set_int(key, val)
        def set_double(key, val)
        def set_lenght(key, val, unit)
        def dump()

## Ancestry

    +-- gobject.GObject
      +-- gnomeprint.Config

## Description

## Constructor

        gnomeprint.Config()

Returns : | a new `gnomeprint.Config`.

Creates a new `gnomeprint.Config` object.

## Methods

### gnomeprint.Config.dup

        def dup()

Returns : | a copy of config.

The `dup`() method does a deep copy of the config config.

### gnomeprint.Config.get

        def get(key)

`key` : | string containing the path of key whose value is to be obtained.
Returns : | the value of the key, `None` indicates failure.

The `get`() method

### gnomeprint.Config.set

        def set(key, value)

`key` : | string containing the path of key whose value is to be set.
`value` : | string containing the value to set.
Returns : | `TRUE` on success, `FALSE` on failure.

The `set`() method sets the value of string key in the GnomePrintConfig object to value value

### gnomeprint.Config.get_boolean

        def get_boolean(key, val)

`key` : | string containing the path of key whose value is to be obtained.
`val` : | a boolean variable to store the value in. Should initially be `None`.
Returns : | `TRUE` if a value was retrieved, `FALSE` on failure.

The `get_boolean`() method gets the value of key key from the `gnomeprint.Config` object. Converts values such as "true", "y", "yes", and their opposites, to their boolean equivalent. The boolean value will be stored in the variable val.

### gnomeprint.Config.get_int

        def get_int(key, val)

`key` : | string containing the path of key whose value is to be obtained.
`val` : | an integer variable to store the value in. Should initially be `None`.
Returns : | `TRUE` if a value was retrieved, `FALSE` on failure.

The `get_int`() method gets the value of key key from the `gnomeprint.Config` object. Converts values to their integer equivalent. The integer value will be stored in the variable val.

### gnomeprint.Config.get_double

        def get_double(key, val)

`key` : | string containing the path of key whose value is to be obtained.
`val` : | a double variable to store the value in. Should initially be `None`.
Returns : | `TRUE` if a value was retrieved, `FALSE` on failure.

The `get_double`() method gets the value of key key from the `gnomeprint.Config` object. Converts values to their double equivalent. The double value will be stored in the variable val.

### gnomeprint.Config.get_length

        def get_length(key, val, unit)

`key` : | string containing the path of key whose value is to be obtained.
`val` : | a double variable to store the value in. Should initially be `None`.
`unit` : | pointer to an already allocated GnomePrintUnit struct.`None`.
Returns : | `TRUE` if a value was retrieved, `FALSE` on failure.

The `get_length`() method gets the value of key key from the `gnomeprint.Config` object. Converts values to their double equivalent. The double value will be stored in the variable val and the units will be stored in unit.

### gnomeprint.Config.set_boolean

        def set_boolean(key, val)

`key` : | string containing the path of key whose value is to be obtained.
`val` : | boolean containing the value to set.
Returns : | `TRUE` if a value was retrieved, `FALSE` on failure.

The `set_boolean`() method set a boolean value in the `gnomeprint.Config` object.

### gnomeprint.Config.set_int

        def set_int(key, val)

`key` : | string containing the path of key whose value is to be set.
`val` : | integer containing the value to set.
Returns : | `TRUE` if a value was retrieved, `FALSE` on failure.

The `set_int`() method set an integer value in the `gnomeprint.Config` object.

### gnomeprint.Config.set_double

        def set_double(key, val)

`key` : | string containing the path of key whose value is to be set.
`val` : | integer containing the value to set.
Returns : | `TRUE` on success, `FALSE` on failure.

The `set_double`() method set an integer value in the `gnomeprint.Config` object.

### gnomeprint.Config.set_length

        def set_length(key, val, unit)

`key` : | string containing the path of key whose value is to be set.
`val` : | double containing the value to set.
`unit` : | units to use when setting value.
Returns : | `TRUE` on success, `FALSE` on failure.

The `set_length`() method sets a double value and the units it is using. This should be used in conjunction with `get_lenght`

### gnomeprint.Config.dump

        def dump()

The `dump`() method print out the tree structure representing the `gnomeprint.Config`. Output is to STDOUT and is limited to a depth of 20.

Prev | Up | Next
gnomeprint.Context | Home | gnomeprint.Job