Marble.GeoDataFeature

KDE 4.5 PyKDE API Reference

- KDE's Python API

# GeoDataFeature Class Reference

`from PyKDE4.marble import *`

Inherits: Marble.GeoDataObject → Marble.GeoNode
Subclasses: Marble.GeoDataContainer, Marble.GeoDataPlacemark
Namespace: Marble.GeoDataFeature

## Detailed Description

A base class for all geodata features

GeoDataFeature is the base class for most geodata classes that correspond to places on a map. It is never instantiated by itself, but is always used as part of a derived class.

See also:
  GeoDataPlacemark

See also:
  GeoDataContainer

## Enumerations
GeoDataVisualCategory | { None, Default, Unknown, SmallCity, SmallCountyCapital, SmallStateCapital, SmallNationCapital, MediumCity, MediumCountyCapital, MediumStateCapital, MediumNationCapital, BigCity, BigCountyCapital, BigStateCapital, BigNationCapital, LargeCity, LargeCountyCapital, LargeStateCapital, LargeNationCapital, Nation, Mountain, Volcano, Mons, Valley, Continent, Ocean, OtherTerrain, Crater, Mare, GeographicPole, MagneticPole, ShipWreck, AirPort, Observatory, Wikipedia, OsmSite, Coordinate, MannedLandingSite, RoboticRover, UnmannedSoftLandingSite, UnmannedHardLandingSite, LastIndex }
## Methods
| __init__ (self)
| __init__ (self, QString name)
| __init__ (self, Marble.GeoDataFeature other)
| __init__ (self, Marble.GeoDataContainer other)
| __init__ (self, Marble.GeoDataFolder other)
| __init__ (self, Marble.GeoDataDocument other)
| __init__ (self, Marble.GeoDataPlacemark other)
Marble.GeoDataAbstractView | abstractView (self)
QString | address (self)
QFont | defaultFont (self)
QString | description (self)
bool | descriptionIsCDATA (self)
| detach (self)
EnumFeatureId | featureId (self)
bool | isFolder (self)
bool | isPlacemark (self)
bool | isVisible (self)
QString | name (self)
QString | nodeType (self)
bool | operator == (self, Marble.GeoDataFeature a0)
| pack (self, QDataStream stream)
QString | phoneNumber (self)
long | popularity (self)
int | popularityIndex (self)
Marble.GeoDataRegion | region (self)
| resetDefaultStyles (self)
QChar | role (self)
| setAbstractView (self, Marble.GeoDataAbstractView abstractView)
| setAddress (self, QString value)
| setDefaultFont (self, QFont font)
| setDescription (self, QString value)
| setDescriptionCDATA (self, bool cdata)
| setName (self, QString value)
| setPhoneNumber (self, QString value)
| setPopularity (self, long popularity)
| setPopularityIndex (self, int index)
| setRegion (self, Marble.GeoDataRegion region)
| setRole (self, QChar role)
| setStyle (self, Marble.GeoDataStyle style)
| setStyleMap (self, Marble.GeoDataStyleMap map)
| setStyleUrl (self, QString value)
| setVisible (self, bool value)
| setVisualCategory (self, Marble.GeoDataFeature.GeoDataVisualCategory category)
Marble.GeoDataStyle | style (self)
Marble.GeoDataStyleMap | styleMap (self)
QString | styleUrl (self)
QPixmap | symbolPixmap (self)
QSize | symbolSize (self)
| unpack (self, QDataStream stream)
Marble.GeoDataFeature.GeoDataVisualCategory | visualCategory (self)

## Method Documentation

__init__ | ( |  | self ) |

__init__ | ( | self, |
|  | QString | name
| ) |  |  |

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

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

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

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

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

Marble.GeoDataAbstractView abstractView | ( |  | self ) |

QString address | ( |  | self ) |

QFont defaultFont | ( |  | self ) |

QString description | ( |  | self ) |

bool descriptionIsCDATA | ( |  | self ) |

test if the description is CDATA or not CDATA allows for special characters to be included in XML and also allows for other XML formats to be embedded in the XML without interfering with parser namespace.

Returns:
  @true if the description should be treated as CDATA

@false if the description is a plain string

detach | ( |  | self ) |

EnumFeatureId featureId | ( |  | self ) |

bool isFolder | ( |  | self ) |

bool isPlacemark | ( |  | self ) |

bool isVisible | ( |  | self ) |

QString name | ( |  | self ) |

The name of the feature

The name of the feature should be a short string. It is often shown directly on the map and need therefore not take up much space.

Returns:
  The name of this feature

QString nodeType | ( |  | self ) |

bool operator == | ( | self, |
|  | Marble.GeoDataFeature | a0
| ) |  |  |

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

QString phoneNumber | ( |  | self ) |

long popularity | ( |  | self ) |

Return the popularity of the feature.

int popularityIndex | ( |  | self ) |

Return the popularity index of the placemark.

The popularity index is a value which describes at which zoom level the placemark will be shown.

Marble.GeoDataRegion region | ( |  | self ) |

Return the region assigned to the placemark.

resetDefaultStyles | ( |  | self ) |

Return the label font of the placemark.

QChar role | ( |  | self ) |

Return the role of the placemark.

FIXME: describe roles here!

setAbstractView | ( | self, |
|  | Marble.GeoDataAbstractView | abstractView
| ) |  |  |

setAddress | ( | self, |
|  | QString | value
| ) |  |  |

setDefaultFont | ( | self, |
|  | QFont | font
| ) |  |  |

setDescription | ( | self, |
|  | QString | value
| ) |  |  |

setDescriptionCDATA | ( | self, |
|  | bool | cdata
| ) |  |  |

setName | ( | self, |
|  | QString | value
| ) |  |  |

Set a new name for this feature

Parameters:

  | value | the new name

setPhoneNumber | ( | self, |
|  | QString | value
| ) |  |  |

setPopularity | ( | self, |
|  | long | popularity
| ) |  |  |

Sets the popularity of the feature.

Parameters:

  |  | popularity the new popularity value

setPopularityIndex | ( | self, |
|  | int | index
| ) |  |  |

Sets the popularity index of the placemark.

Parameters:

  |  | index the new index to be used.

setRegion | ( | self, |
|  | Marble.GeoDataRegion | region
| ) |  |  |

Sets the region of the placemark.

Parameters:

  | region | new value for the region

The feature is only shown when the region if active.

setRole | ( | self, |
|  | QChar | role
| ) |  |  |

Sets the role of the placemark.

Parameters:

  |  | role the new role to be used.

setStyle | ( | self, |
|  | Marble.GeoDataStyle | style
| ) |  |  |

Sets the style of the placemark.

Parameters:

  |  | style the new style to be used.

setStyleMap | ( | self, |
|  | Marble.GeoDataStyleMap | map
| ) |  |  |

Sets the styleMap of the feature

setStyleUrl | ( | self, |
|  | QString | value
| ) |  |  |

setVisible | ( | self, |
|  | bool | value
| ) |  |  |

Set a new value for visibility

Parameters:

  | value | new value for the visibility

This function sets the visibility, i.e. whether this feature should be shown or not. This can be changed either from a GUI or through some action of the program.

setVisualCategory | ( | self, |
|  | Marble.GeoDataFeature.GeoDataVisualCategory | category
| ) |  |  |

Sets the symbol index of the placemark.

Parameters:

  |  | category the new category to be used.

Marble.GeoDataStyle style | ( |  | self ) |

Return the style assigned to the placemark.

Marble.GeoDataStyleMap styleMap | ( |  | self ) |

Return a pointer to a GeoDataStyleMap object which represents the styleMap of this feature. A styleMap is simply a QMap<QString,QString> which can connect two styles with a keyword. This can be used to have a highlighted and a normal style.

See also:
  GeoDataStyleMap

QString styleUrl | ( |  | self ) |

QPixmap symbolPixmap | ( |  | self ) |

Return the symbol of the feature as a pixmap.

Note that the pixmaps are shared between all features with the same visual category

QSize symbolSize | ( |  | self ) |

Return the symbol size of the feature in pixels.

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

Marble.GeoDataFeature.GeoDataVisualCategory visualCategory | ( |  | self ) |

Return the symbol index of the placemark.

## Enumeration Documentation

GeoDataVisualCategory

A categorization of a placemark as defined by ...FIXME.

Enumerator:

  None |
  Default |
  Unknown |
  SmallCity |
  SmallCountyCapital |
  SmallStateCapital |
  SmallNationCapital |
  MediumCity |
  MediumCountyCapital |
  MediumStateCapital |
  MediumNationCapital |
  BigCity |
  BigCountyCapital |
  BigStateCapital |
  BigNationCapital |
  LargeCity |
  LargeCountyCapital |
  LargeStateCapital |
  LargeNationCapital |
  Nation |
  Mountain |
  Volcano |
  Mons |
  Valley |
  Continent |
  Ocean |
  OtherTerrain |
  Crater |
  Mare |
  GeographicPole |
  MagneticPole |
  ShipWreck |
  AirPort |
  Observatory |
  Wikipedia |
  OsmSite |
  Coordinate |
  MannedLandingSite |
  RoboticRover |
  UnmannedSoftLandingSite |
  UnmannedHardLandingSite |
  LastIndex |