Foundry.Settings

g Foundry.Contextual Foundry.Contextual Foundry.Settings Foundry.Settings Foundry.Contextual->Foundry.Settings GObject.GInterface GObject.GInterface Gio.ActionGroup Gio.ActionGroup GObject.GInterface->Gio.ActionGroup Json.Serializable Json.Serializable GObject.GInterface->Json.Serializable GObject.Object GObject.Object GObject.Object->Foundry.Contextual Gio.ActionGroup->Foundry.Settings Json.Serializable->Foundry.Contextual

Subclasses:

None

Methods

Inherited:

Foundry.Contextual (4), GObject.Object (37), Json.Serializable (8), Gio.ActionGroup (14)

Structs:

GObject.ObjectClass (5)

class

new (context, schema_id)

class

new_with_path (context, schema_id, path)

bind (key, object, property, flags)

bind_with_mapping (key, object, property, flags, get_mapping, set_mapping, *user_data)

dup_layer (layer)

get_boolean (key)

get_default_value (key)

get_double (key)

get_int (key)

get_schema_id ()

get_string (key)

get_strv (key)

get_uint (key)

get_user_value (key)

get_value (key)

set_boolean (key, val)

set_double (key, val)

set_int (key, val)

set_string (key, val)

set_uint (key, val)

set_value (key, value)

unbind (property)

Virtual Methods

Inherited:

GObject.Object (7), Json.Serializable (5), Gio.ActionGroup (14)

Properties

Inherited:

Foundry.Contextual (1)

Name

Type

Flags

Short Description

path

str

r/w/co

The path to use for for app settings

schema-id

str

r/w/co

Schema ID

Signals

Inherited:

GObject.Object (1), Gio.ActionGroup (4)

Name

Short Description

changed

Fields

Inherited:

GObject.Object (1), Gio.ActionGroup (4)

Class Details

class Foundry.Settings(**kwargs)
Bases:

Foundry.Contextual, Gio.ActionGroup

Abstract:

No

Structure:

Foundry.SettingsClass

Abstraction for user, project, and application settings.

This class provides support for settings which may be overridden at multiple levels including per-user, per-project, and application-wide defaults.

classmethod new(context, schema_id)
Parameters:
Return type:

Foundry.Settings

classmethod new_with_path(context, schema_id, path)
Parameters:
Return type:

Foundry.Settings

bind(key, object, property, flags)
Parameters:
bind_with_mapping(key, object, property, flags, get_mapping, set_mapping, *user_data)
Parameters:

Like Foundry.Settings.bind() but allows transforming to and from settings storage using get_mapping and set_mapping transformation functions.

Call Foundry.Settings.unbind() to unbind the mapping.

dup_layer(layer)
Parameters:

layer (Foundry.SettingsLayer) – the desired layer

Returns:

a Gio.Settings instance

Return type:

Gio.Settings

Gets the underlying Gio.Settings used for the respective layer.

get_boolean(key)
Parameters:

key (str) –

Return type:

bool

get_default_value(key)
Parameters:

key (str) –

Return type:

GLib.Variant

get_double(key)
Parameters:

key (str) –

Return type:

float

get_int(key)
Parameters:

key (str) –

Return type:

int

get_schema_id()
Return type:

str

get_string(key)
Parameters:

key (str) –

Return type:

str

get_strv(key)
Parameters:

key (str) –

Return type:

[str] or None

New in version 1.1.

get_uint(key)
Parameters:

key (str) –

Return type:

int

get_user_value(key)
Parameters:

key (str) –

Return type:

GLib.Variant

get_value(key)
Parameters:

key (str) –

Return type:

GLib.Variant

set_boolean(key, val)
Parameters:
set_double(key, val)
Parameters:
set_int(key, val)
Parameters:
set_string(key, val)
Parameters:
set_uint(key, val)
Parameters:
set_value(key, value)
Parameters:
unbind(property)
Parameters:

property (str) –

Signal Details

Foundry.Settings.signals.changed(settings, object)
Signal Name:

changed

Flags:

RUN_LAST, DETAILED

Parameters:

Property Details

Foundry.Settings.props.path
Name:

path

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The path to use for for app settings

Foundry.Settings.props.schema_id
Name:

schema-id

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Schema ID