Shumate.MarkerLayer¶
- Subclasses:
None
Methods¶
- Inherited:
Shumate.Layer (1), Gtk.Widget (181), GObject.Object (37), Gtk.Accessible (15), Gtk.Buildable (1)
- Structs:
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
- Inherited:
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w |
Determines the type of selection that will be performed. |
Signals¶
- Inherited:
Name |
Short Description |
---|---|
Emitted when a marker in the layer is selected. |
|
Emitted when a marker in the layer is unselected. |
Fields¶
- Inherited:
Class Details¶
- class Shumate.MarkerLayer(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Displays markers on the map. It is responsible for positioning markers correctly, marker selections and group marker operations.
- classmethod new(viewport)¶
- Parameters:
viewport (
Shumate.Viewport
) – the ShumateViewport- Returns:
a new [class`MarkerLayer`] ready to be used as a container for the markers.
- Return type:
Creates a new instance of [class`MarkerLayer`].
- classmethod new_full(viewport, mode)¶
- Parameters:
viewport (
Shumate.Viewport
) – the ShumateViewportmode (
Gtk.SelectionMode
) – Selection mode
- Returns:
a new [class`MarkerLayer`] ready to be used as a container for the markers.
- Return type:
Creates a new instance of [class`MarkerLayer`] with the specified selection mode.
- add_marker(marker)¶
- Parameters:
marker (
Shumate.Marker
) – a [class`Marker`]
Adds the marker to the layer.
- get_markers()¶
- Returns:
the list
- Return type:
Gets a copy of the list of all markers inserted into the layer. You should free the list but not its contents.
- get_selected()¶
- Returns:
the list
- Return type:
Gets a list of selected markers in the layer.
- get_selection_mode()¶
- Returns:
the selection mode of the layer.
- Return type:
Gets the selection mode of the layer.
- remove_all()¶
Removes all markers from the layer.
- remove_marker(marker)¶
- Parameters:
marker (
Shumate.Marker
) – a [class`Marker`]
Removes the marker from the layer.
- select_all_markers()¶
Selects all selectable markers in the layer.
- select_marker(marker)¶
- Parameters:
marker (
Shumate.Marker
) – a [class`Marker`] that is a child of self- Returns:
- Return type:
Selects a marker in this layer.
If [class`MarkerLayer`]:py:data::selection-mode<Shumate.MarkerLayer.props.selection_mode> is
Gtk.SelectionMode.SINGLE
orGtk.SelectionMode.BROWSE
, all other markers will be unselected. If the mode isGtk.SelectionMode.NONE
or marker is not selectable, nothing will happen.
- set_selection_mode(mode)¶
- Parameters:
mode (
Gtk.SelectionMode
) – a [enum`Gtk`.SelectionMode] value
Sets the selection mode of the layer.
NOTE: changing selection mode to
Gtk.SelectionMode.NONE
,Gtk.SelectionMode.SINGLE
orGtk.SelectionMode.BROWSE
will clear all previously selected markers.
- unselect_all_markers()¶
Unselects all markers in the layer.
- unselect_marker(marker)¶
- Parameters:
marker (
Shumate.Marker
) – a [class`Marker`] that is a child of self
Unselects a marker in this layer.
This works even if [class`MarkerLayer`]:py:data::selection-mode<Shumate.MarkerLayer.props.selection_mode> is
Gtk.SelectionMode.BROWSE
. Browse mode only prevents user interaction, not the program, from unselecting a marker.
Signal Details¶
- Shumate.MarkerLayer.signals.marker_selected(marker_layer, marker)¶
- Signal Name:
marker-selected
- Flags:
- Parameters:
marker_layer (
Shumate.MarkerLayer
) – The object which received the signalmarker (
Shumate.Marker
) – The marker that was selected
Emitted when a marker in the layer is selected.
- Shumate.MarkerLayer.signals.marker_unselected(marker_layer, marker)¶
- Signal Name:
marker-unselected
- Flags:
- Parameters:
marker_layer (
Shumate.MarkerLayer
) – The object which received the signalmarker (
Shumate.Marker
) – The marker that was unselected
Emitted when a marker in the layer is unselected.
Property Details¶
- Shumate.MarkerLayer.props.selection_mode¶
- Name:
selection-mode
- Type:
- Default Value:
- Flags:
Determines the type of selection that will be performed.