KDE 4.2 PyKDE API Reference for Marble

- 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, QFont font, QColor color)
| __init__ (self, Marble.GeoDataLabelStyle a0)
Marble.GeoDataLabelStyle.Alignment | alignment (self)
QFont | font (self)
| pack (self, QDataStream stream)
float | scale (self)
| setAlignment (self, Marble.GeoDataLabelStyle.Alignment alignment)
| setFont (self, QFont font)
| setScale (self, float scale)
| unpack (self, QDataStream stream)

## Method Documentation

__init__ | ( |  | self ) |

Construct a new GeoDataLabelStyle

__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

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

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

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

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 |