Shumate.MapSourceRegistry¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Shumate.MapSourceRegistry(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
This object allows you to hold [class`MapSource`] instances, you can access a default set of sources with [method`MapSourceRegistry`.populate_defaults].
It conveniently implements [iface`Gio`.ListModel] to easily integrate with it.
- classmethod new()¶
- Returns:
a newly created
Shumate.MapSourceRegistry
- Return type:
Create a new
Shumate.MapSourceRegistry
.
- classmethod new_with_defaults()¶
- Returns:
a newly created
Shumate.MapSourceRegistry
- Return type:
Create a new
Shumate.MapSourceRegistry
with defaults map sources. This is identical to calling [method`MapSourceRegistry`.populate_defaults] afterShumate.MapSourceRegistry.new
().
- add(map_source)¶
- Parameters:
map_source (
Shumate.MapSource
) – aShumate.MapSource
Adds the
Shumate.MapSource
to theShumate.MapSourceRegistry
- get_by_id(id)¶
- Parameters:
id (
str
) – the id of theShumate.MapSource
- Returns:
the
Shumate.MapSource
orNone
if no map source has been found- Return type:
Find the
Shumate.MapSource
with the corresponding id
- populate_defaults()¶
Populates the
Shumate.MapSourceRegistry
with a default set of sources.
- remove(id)¶
- Parameters:
id (
str
) – aShumate.MapSource
id
Removes the corresponding
Shumate.MapSource
from the registry. If the source doesn’t exist in the registry, this function does nothing.