mateprint.Config

Config object for MatePrint

## Synopsis

        mateprint.Config
        gobject.GObject

    	   mateprint.Config

    	    dup

            get
            key

            set
            key
            value

            get_boolean
            key
            val

            get_int
            key
            val

            get_double
            key
            val

            get_lenght
            key
            val
            unit

            set_boolean
            key
            val

            set_int
            key
            val

            set_double
            key
            val

            set_lenght
            key
            val
            unit

            dump

## Ancestry

    +-- gobject.GObject
      +-- mateprint.Config

## Description

## Constructor

    	  mateprint.Config

Returns :

- a new `mateprint.Config`.

Creates a new `mateprint.Config` object.

## Methods

### mateprint.Config.dup

                    dup

Returns :

- a copy of config.

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

### mateprint.Config.get

                    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

### mateprint.Config.set

                    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 MatePrintConfig object to value value

### mateprint.Config.get_boolean

                    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 `mateprint.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.

### mateprint.Config.get_int

                    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 `mateprint.Config` object. Converts values to their integer equivalent. The integer value will be stored in the variable val.

### mateprint.Config.get_double

                    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 `mateprint.Config` object. Converts values to their double equivalent. The double value will be stored in the variable val.

### mateprint.Config.get_length

                    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 MatePrintUnit struct.`None`.

Returns :

- `TRUE` if a value was retrieved, `FALSE` on failure.

The `get_length`() method gets the value of key key from the `mateprint.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.

### mateprint.Config.set_boolean

                    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 `mateprint.Config` object.

### mateprint.Config.set_int

                    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 `mateprint.Config` object.

### mateprint.Config.set_double

                    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 `mateprint.Config` object.

### mateprint.Config.set_length

                    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`

### mateprint.Config.dump

                    dump

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