Geographic

Since: BlackBerry 10.0.0

#include <bb/platform/geo/Geographic>

To link against this class, add the following line to your .pro file: LIBS += -lbbcascadesmaps

An entity that can be placed on a map.

Identifier Uniqueness

All instances of Geographic must have a unique identifier, which is tracked through the id property. If two elements exist within a container (for example, GeoList, DataProvider, MapData or other containers) and have the same ID, then one instance will overwrite the other instance.

It is the responsibility of the application to ensure that the IDs used are unique. Note: A unique ID will be generated on object creation if no ID is provided.

Subclass Contract

Subclasses must perform the following:
  • Call setBoundingBox(BoundingBox) whenever this object's bounding box changes.

  • Emit a topographyChanged signal when the contents of the Geographic have changed.

Reference Type

Geographic and its subclasses are expected to be used as a reference type. As such, care needs to be made when referencing this object in multithreaded environments. For example, deletion in one thread can cause a dangling pointer in another thread.


Overview

Public Functions Index

Geographic (QObject *parent=0)
Geographic (const QString &id, QObject *parent=0)
virtual ~Geographic ()
virtual bb::platform::geo::BoundingBoxboundingBox () const
QStringdescription () const
QStringgeoId () const
QStringid () const BB_DEPRECATED
QStringname () const
Q_SLOT voidsetDescription (const QString &desc)
Q_SLOT voidsetGeoId (const QString &id)
Q_SLOT voidsetId (const QString &id) BB_DEPRECATED
Q_SLOT voidsetName (const QString &name)
Q_SLOT voidsetStyleFamily (const QString &styleFamily)
QStringstyleFamily () const

Protected Functions Index

voidsetBoundingBox (const bb::platform::geo::BoundingBox &newBox)

Signals Index

voidboundaryChanged (const bb::platform::geo::BoundingBox &box)
voiddescriptionChanged (const QString &desc)
voidgeoIdChanged (const QString &id)
voididChanged (const QString &id) BB_DEPRECATED
voidnameChanged (const QString &name)
voidstyleFamilyChanged (const QString &newFamily)
voidtopographyChanged (const QString &id)

Properties

bb::platform::geo::BoundingBox boundingBox[read-only]

The axis-aligned bounding box in which this object is contained.

Since:

BlackBerry 10.0.0

QString description

The description of this object.

Since:

BlackBerry 10.0.0

QString geoId

The ID of this Geographic object.

Since:

BlackBerry 10.2.0

QString id

Deprecated

Use the geoId property instead.

QString name

The name of this object.

Since:

BlackBerry 10.0.0

QString styleFamily

The style family to be used in conjunction with this element.

Since:

BlackBerry 10.2.0

Public Functions

Geographic (

Constructor.

If no ID is supplied when constructing a Geographic entity, an ID that is guaranteed to be unique will be auto-generated.

Parameters
parent

The parent of this Geographic.

Since:

BlackBerry 10.0.0

Geographic (

Constructor.

Parameters
id

The identifier for this Geographic.

parent

The parent of this Geographic.

Since:

BlackBerry 10.0.0

virtual~Geographic ()

Destructor.

virtualbb::platform::geo::BoundingBox boundingBox ()

Retrieves the axis-aligned bounding box for this Geographic.

Since:

BlackBerry 10.0.0

QString description ()

Gets the description of this Geographic.

Since:

BlackBerry 10.0.0

QString geoId ()

Gets the unique identifier for this Geographic.

If two Geographics are attribute-wise equal, they still need to have different IDs. The ID needs to be unique within a process.

Since:

BlackBerry 10.2.0

QString id ()

Deprecated

Use geoId() instead.

QString name ()

Gets the name of this Geographic.

Since:

BlackBerry 10.0.0

Q_SLOT void setDescription (

Sets the description of this Geographic.

Since:

BlackBerry 10.0.0

Q_SLOT void setGeoId (

Sets the ID of this Geographic.

Since:

BlackBerry 10.2.0

Q_SLOT void setId (

Deprecated

Use setGeoId() instead.

Q_SLOT void setName (

Sets the name of this Geographic.

Since:

BlackBerry 10.0.0

Q_SLOT void setStyleFamily (

Sets the style family for this Geographic.

Parameters
styleFamily

The new style family for this element.

Since:

BlackBerry 10.2.0

See also:

StyleSheet

QString styleFamily ()

Gets the style family for this Geographic.

Since:

BlackBerry 10.2.0

See also:

StyleSheet

Protected Functions

void setBoundingBox (

Signals

void boundaryChanged (

Emitted by derived classes when the bounding box has changed.

See the BoundingBox documentation.

Since:

BlackBerry 10.0.0

void descriptionChanged (

Emitted when the description of this Geographic changes.

Since:

BlackBerry 10.0.0

void geoIdChanged (

Emitted when the ID of this Geographic changes.

Since:

BlackBerry 10.2.0

void idChanged (

Deprecated

Use geoIdChanged() instead.

void nameChanged (

Emitted when the name of this Geographic changes.

Since:

BlackBerry 10.0.0

void styleFamilyChanged (

Emitted when the style family attribute changes.

Since:

BlackBerry 10.2.0

void topographyChanged (

Emitted when the topography of this Geographic changes.

A Geographic's topography captures the location (or geographic) properties of the element.
Parameters
id

The ID of this Geographic.

Since:

BlackBerry 10.1.0

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus