Shumate.MapSourceRegistry
Description: Reference for Shumate.MapSourceRegistry

### Class

# ShumateMapSourceRegistry

#### Description [src]

    final class Shumate.MapSourceRegistry : GObject.Object
      implements Gio.ListModel {
      /* No available fields */
    }

This object allows you to hold `ShumateMapSource` instances, you can access a default set of sources with `shumate_map_source_registry_populate_defaults()`.

It conveniently implements `GListModel` to easily integrate with it.

#### Hierarchy

#### Ancestors

- GObject

#### Implements

- GListModel

#### Constructors

###### shumate_map_source_registry_new

Create a new `ShumateMapSourceRegistry`.

###### shumate_map_source_registry_new_with_defaults

Create a new `ShumateMapSourceRegistry` with defaults map sources. This is identical to calling `shumate_map_source_registry_populate_defaults()` after shumate_map_source_registry_new().

#### Instance methods

###### shumate_map_source_registry_add

Adds the `ShumateMapSource` to the `ShumateMapSourceRegistry`.

###### shumate_map_source_registry_get_by_id

Find the `ShumateMapSource` with the corresponding id.

###### shumate_map_source_registry_populate_defaults

Populates the `ShumateMapSourceRegistry` with a default set of sources.

###### shumate_map_source_registry_remove

Removes the corresponding `ShumateMapSource` from the registry. If the source doesn’t exist in the registry, this function does nothing.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from GListModel (5)

###### g_list_model_get_item

Get the item at `position`.

###### g_list_model_get_item_type

Gets the type of the items in `list`.

###### g_list_model_get_n_items

Gets the number of items in `list`.

###### g_list_model_get_object

Get the item at `position`.

###### g_list_model_items_changed

Emits the `GListModel::items-changed` signal on `list`.

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

##### Signals inherited from GListModel (1)

###### GListModel::items-changed

This signal is emitted whenever items were added to or removed from `list`. At `position`, `removed` items were removed and `added` items were added in their place.

#### Class structure

    struct ShumateMapSourceRegistryClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.