KDE 4.7 PyKDE API Reference

- KDE's Python API

# GeoDataFeature Class Reference

`from PyKDE4.marble import *`

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

## 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, Folder, Bookmark, AccomodationCamping, AccomodationHostel, AccomodationHotel, AccomodationMotel, AccomodationYouthHostel, AmenityLibrary, EducationCollege, EducationSchool, EducationUniversity, FoodBar, FoodBiergarten, FoodCafe, FoodFastFood, FoodPub, FoodRestaurant, HealthDoctors, HealthHospital, HealthPharmacy, MoneyAtm, MoneyBank, ShoppingBeverages, ShoppingHifi, ShoppingSupermarket, TouristAttraction, TouristCastle, TouristCinema, TouristMonument, TouristMuseum, TouristRuin, TouristTheatre, TouristThemePark, TouristViewPoint, TouristZoo, TransportAerodrome, TransportAirportTerminal, TransportBusStation, TransportBusStop, TransportCarShare, TransportFuel, TransportParking, TransportRentalBicycle, TransportRentalCar, TransportTaxiRank, TransportTrainStation, TransportTramStop, LastIndex }
## Methods
| __init__ (self)
| __init__ (self, QString name)
| __init__ (self, Marble.GeoDataFeature other)
Marble.GeoDataAbstractView | abstractView (self)
QString | address (self)
QString | description (self)
bool | descriptionIsCDATA (self)
| detach (self)
EnumFeatureId | featureId (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)
| setAbstractView (self, Marble.GeoDataAbstractView abstractView)
| setAddress (self, QString value)
| 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, QString 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)
## Static Methods
QFont | defaultFont ()
| resetDefaultStyles ()
| setDefaultFont (QFont font)

## Method Documentation

__init__ | ( |  | self ) |

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

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

Marble.GeoDataAbstractView abstractView | ( |  | self ) |

QString address | ( |  | 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 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.

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

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

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, |
|  | QString | 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.

## Static Method Documentation

QFont defaultFont | ( |  | ) |

resetDefaultStyles | ( |  | ) |

Return the label font of the placemark.

setDefaultFont | ( | QFont | font
| ) |  |  |

## 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 |
  Folder |
  Bookmark |
  AccomodationCamping |
  AccomodationHostel |
  AccomodationHotel |
  AccomodationMotel |
  AccomodationYouthHostel |
  AmenityLibrary |
  EducationCollege |
  EducationSchool |
  EducationUniversity |
  FoodBar |
  FoodBiergarten |
  FoodCafe |
  FoodFastFood |
  FoodPub |
  FoodRestaurant |
  HealthDoctors |
  HealthHospital |
  HealthPharmacy |
  MoneyAtm |
  MoneyBank |
  ShoppingBeverages |
  ShoppingHifi |
  ShoppingSupermarket |
  TouristAttraction |
  TouristCastle |
  TouristCinema |
  TouristMonument |
  TouristMuseum |
  TouristRuin |
  TouristTheatre |
  TouristThemePark |
  TouristViewPoint |
  TouristZoo |
  TransportAerodrome |
  TransportAirportTerminal |
  TransportBusStation |
  TransportBusStop |
  TransportCarShare |
  TransportFuel |
  TransportParking |
  TransportRentalBicycle |
  TransportRentalCar |
  TransportTaxiRank |
  TransportTrainStation |
  TransportTramStop |
  LastIndex |