Champlain.Scale

g Atk.ImplementorIface Atk.ImplementorIface Clutter.Actor Clutter.Actor Atk.ImplementorIface->Clutter.Actor Champlain.Scale Champlain.Scale Clutter.Actor->Champlain.Scale Clutter.Animatable Clutter.Animatable Clutter.Animatable->Clutter.Actor Clutter.Container Clutter.Container Clutter.Container->Clutter.Actor Clutter.Scriptable Clutter.Scriptable Clutter.Scriptable->Clutter.Actor GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface GObject.GInterface->Clutter.Animatable GObject.GInterface->Clutter.Container GObject.GInterface->Clutter.Scriptable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Clutter.Actor GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned

Subclasses:

None

Methods

Inherited:

Clutter.Actor (238), GObject.Object (37), Clutter.Animatable (5), Clutter.Container (17), Clutter.Scriptable (4)

Structs:

GObject.ObjectClass (5)

class

new ()

connect_view (view)

disconnect_view ()

get_max_width ()

get_unit ()

set_max_width (value)

set_unit (unit)

Virtual Methods

Inherited:

Clutter.Actor (35), GObject.Object (7), Clutter.Animatable (5), Clutter.Container (13), Clutter.Scriptable (4)

Properties

Inherited:

Clutter.Actor (82)

Name

Type

Flags

Short Description

max-width

int

r/w

The max width of the scaleon screen

unit

Champlain.Unit

r/w

The map scale’s unit

Signals

Inherited:

Clutter.Actor (26), GObject.Object (1), Clutter.Container (3)

Fields

Inherited:

Clutter.Actor (26), GObject.Object (1), Clutter.Container (3)

Name

Type

Access

Description

parent

Clutter.Actor

r

Class Details

class Champlain.Scale(**kwargs)
Bases:

Clutter.Actor

Abstract:

No

Structure:

Champlain.ScaleClass

The Champlain.Scale structure contains only private data and should be accessed using the provided API

New in version 0.10.

classmethod new()
Returns:

a new Champlain.Scale.

Return type:

Clutter.Actor

Creates an instance of Champlain.Scale.

New in version 0.10.

connect_view(view)
Parameters:

view (Champlain.View) – a Champlain.View

This method connects to the necessary signals of Champlain.View to make the scale adapt to the current latitude and longitude.

New in version 0.10.

disconnect_view()

This method disconnects from the signals previously connected by Champlain.Scale.connect_view().

New in version 0.10.

get_max_width()
Returns:

The maximum scale width in pixels.

Return type:

int

Gets the maximum scale width.

New in version 0.10.

get_unit()
Returns:

The unit used by the scale

Return type:

Champlain.Unit

Gets the unit used by the scale.

New in version 0.10.

set_max_width(value)
Parameters:

value (int) – the number of pixels

Sets the maximum width of the scale on the screen in pixels

New in version 0.10.

set_unit(unit)
Parameters:

unit (Champlain.Unit) – a Champlain.Unit

Sets the scale unit.

New in version 0.10.

Property Details

Champlain.Scale.props.max_width
Name:

max-width

Type:

int

Default Value:

100

Flags:

READABLE, WRITABLE

The size of the map scale on screen in pixels.

New in version 0.10.

Champlain.Scale.props.unit
Name:

unit

Type:

Champlain.Unit

Default Value:

Champlain.Unit.KM

Flags:

READABLE, WRITABLE

The scale’s units.

New in version 0.10.