Marble.GeoDataLabelStyle

KDE 4.9 PyKDE API Reference

- KDE's Python API

# GeoDataLabelStyle Class Reference

`from PyKDE4.marble import *`

Inherits: Marble.GeoDataColorStyle → Marble.GeoDataObject → Marble.GeoNode
Namespace: Marble

## Detailed Description

specifies how the name of a GeoDataFeature is drawn

A GeoDataLabelStyle specifies how the name of a GeoDataFeature is drawn in the viewer. A custom color, color mode (both inherited from GeoDataColorStyle, and scale for the label (name) can be specified.

## Enumerations
Alignment | { Corner, Center }
## Methods
| __init__ (self)
| __init__ (self, Marble.GeoDataLabelStyle other)
| __init__ (self, QFont font, QColor color)
Marble.GeoDataLabelStyle.Alignment | alignment (self)
QFont | font (self)
bool | glow (self)
QString | nodeType (self)
| pack (self, QDataStream stream)
float | scale (self)
| setAlignment (self, Marble.GeoDataLabelStyle.Alignment alignment)
| setFont (self, QFont font)
| setGlow (self, bool on)
| setScale (self, float scale)
| unpack (self, QDataStream stream)

## Method Documentation

__init__ | ( |  | self ) |

__init__ | ( | self, |
|  | Marble.GeoDataLabelStyle | other
| ) |  |  |

__init__ | ( | self, |
|  | QFont | font,
|  | QColor | color
| ) |  |  |

Construct a new GeoDataLabelStyle

Parameters:

  |  | font the font to use when showing the name
  |  | color the color to use when showing the name See also: GeoDataColorStyle

Marble.GeoDataLabelStyle.Alignment alignment | ( |  | self ) |

Return the alignment of the label

Returns:
  the current alignment

QFont font | ( |  | self ) |

Return the current font of the label

Returns:
  the current font

bool glow | ( |  | self ) |

Return true if the text of the label should glow, false otherwise

See also:
  setGlow

QString nodeType | ( |  | self ) |

pack | ( | self, |
|  | QDataStream | stream
| ) |  |  |

Serialize the style to a stream.

Parameters:

  |  | stream the stream

float scale | ( |  | self ) |

Return the current scale of the label

Returns:
  the current scale

setAlignment | ( | self, |
|  | Marble.GeoDataLabelStyle.Alignment | alignment
| ) |  |  |

Set the alignment of the label

Parameters:

  |  | int the alignment

setFont | ( | self, |
|  | QFont | font
| ) |  |  |

Set the font of the label

Parameters:

  |  | font the new font

setGlow | ( | self, |
|  | bool | on
| ) |  |  |

Enable or disable a glow effect around the text of the label.

The default is false.

Note that this is not a KML property.

setScale | ( | self, |
|  | float | scale
| ) |  |  |

Set the scale of the label

Parameters:

  |  | scale the new scale

unpack | ( | self, |
|  | QDataStream | stream
| ) |  |  |

Unserialize the style from a stream

Parameters:

  |  | stream the stream

## Enumeration Documentation

Alignment

Enumerator:

  Corner |
  Center |