OsmGpsMap.MapTrack

g GObject.Object GObject.Object OsmGpsMap.MapTrack OsmGpsMap.MapTrack GObject.Object->OsmGpsMap.MapTrack

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new ()

add_point (point)

get_color ()

get_length ()

get_point (pos)

get_points ()

insert_point (np, pos)

n_points ()

remove_point (pos)

set_color (color)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

alpha

float

r/w/c

alpha transparency of the track

color

Gdk.RGBA

r/w

color of the track

editable

bool

r/w/c

should this track be editable

line-width

float

r/w/c

width of the lines drawn for the track

track

int

r/w/co

list of points for the track

visible

bool

r/w/c

should this track be visible

Signals

Inherited:

GObject.Object (1)

Name

Short Description

point-added

The OsmGpsMap.MapTrack ::point-added signal is emitted whenever a OsmGpsMap.MapPoint is added to the OsmGpsMap.MapTrack.

point-changed

point-inserted

point-removed

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

parent

GObject.Object

r

Class Details

class OsmGpsMap.MapTrack(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

OsmGpsMap.MapTrackClass

classmethod new()
Returns:

New track

Return type:

OsmGpsMap.MapTrack

Create new track

New in version 0.7.0.

add_point(point)
Parameters:

point (OsmGpsMap.MapPoint) – a OsmGpsMap.MapPoint point to add

Add a point to track

New in version 0.7.0.

get_color()
Returns:

track color

Return type:

color: Gdk.RGBA

Get track color

New in version 0.7.0.

get_length()
Returns:

the length of the track in meters.

Return type:

float

Get track length in meters

New in version 1.1.0.

get_point(pos)
Parameters:

pos (int) – Position of the point to get

Returns:

a OsmGpsMap.MapPoint

Return type:

OsmGpsMap.MapPoint

Get a OsmGpsMap.MapPoint point at pos of given track

New in version 1.1.0.

get_points()
Returns:

list of OsmGpsMap.MapPoint

Return type:

[OsmGpsMap.MapPoint]

Get list of points in the track

New in version 0.7.0.

insert_point(np, pos)
Parameters:

Instert point np at given postition pos

New in version 1.1.0.

n_points()
Returns:

the number of points in the track.

Return type:

int

Get number of points in the track

New in version 1.1.0.

remove_point(pos)
Parameters:

pos (int) – Position of the point to remove

Remove track point at pos position in point list

New in version 1.1.0.

set_color(color)
Parameters:

color (Gdk.RGBA) – new track color

Set track color

New in version 1.1.0.

Signal Details

OsmGpsMap.MapTrack.signals.point_added(map_track, arg1)
Signal Name:

point-added

Flags:

RUN_FIRST

Parameters:

The OsmGpsMap.MapTrack ::point-added signal is emitted whenever a OsmGpsMap.MapPoint is added to the OsmGpsMap.MapTrack.

OsmGpsMap.MapTrack.signals.point_changed(map_track, object)
Signal Name:

point-changed

Flags:

RUN_FIRST

Parameters:
OsmGpsMap.MapTrack.signals.point_inserted(map_track, object)
Signal Name:

point-inserted

Flags:

RUN_FIRST

Parameters:
OsmGpsMap.MapTrack.signals.point_removed(map_track, object)
Signal Name:

point-removed

Flags:

RUN_FIRST

Parameters:

Property Details

OsmGpsMap.MapTrack.props.alpha
Name:

alpha

Type:

float

Default Value:

0.6000000238418579

Flags:

READABLE, WRITABLE, CONSTRUCT

alpha transparency of the track

OsmGpsMap.MapTrack.props.color
Name:

color

Type:

Gdk.RGBA

Default Value:

None

Flags:

READABLE, WRITABLE

color of the track

OsmGpsMap.MapTrack.props.editable
Name:

editable

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE, CONSTRUCT

should this track be editable

OsmGpsMap.MapTrack.props.line_width
Name:

line-width

Type:

float

Default Value:

4.0

Flags:

READABLE, WRITABLE, CONSTRUCT

width of the lines drawn for the track

OsmGpsMap.MapTrack.props.track
Name:

track

Type:

int

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

list of points for the track

OsmGpsMap.MapTrack.props.visible
Name:

visible

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

should this track be visible