ViewProperties

Since: BlackBerry 10.0.0

#include <bb/cascades/maps/ViewProperties>

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

The properties of the current view.


Overview

Public Functions Index

ViewProperties ()
ViewProperties (const ViewProperties &src)
~ViewProperties ()
doublealtitude () const
bb::platform::geo::AltitudeMode::TypealtitudeMode () const
bb::platform::geo::BoundingBoxboundingBox () const
bb::platform::geo::Pointcenter () const
doubleheading () const
doublelatitude () const
doublelongitude () const
ViewProperties &operator= (const ViewProperties &src)
boolsetAltitude (double alt)
boolsetAltitudeMode (bb::platform::geo::AltitudeMode::Type mode)
voidsetBoundingBox (const bb::platform::geo::BoundingBox &box)
boolsetHeading (double heading)
boolsetLatitude (double newLat)
boolsetLongitude (double newLon)
boolsetTilt (int newTilt)
voidsetWindow (const QRect &newDimensions)
inttilt () const
QPointwindowMidpoint () const
QSizewindowSize () const

Public Functions

ViewProperties ()

Basic constructor.

Since:

BlackBerry 10.0.0

ViewProperties (

Copy constructor.

Parameters
src

The object from which to copy information.

Since:

BlackBerry 10.0.0

~ViewProperties ()

Destructor.

Since:

BlackBerry 10.0.0

double altitude ()

Indicates from what height, in meters, that the map is viewed at.

See also:

altitudeMode

Return:

The view's altitude.

Since:

BlackBerry 10.0.0

bb::platform::geo::AltitudeMode::Type altitudeMode ()

Captures how the altitude attribute should be interpreted.

Return:

The altitude's mode.

Since:

BlackBerry 10.0.0

bb::platform::geo::BoundingBox boundingBox ()

Retrieves the bounding box that this view encapsulates.

Return:

The bounding box of the view.

Since:

BlackBerry 10.0.0

bb::platform::geo::Point center ()

Gets the center of the viewport's coordinates in the form of a Point.

Return:

The center coordinate.

Since:

BlackBerry 10.0.0

double heading ()

Gets the direction of the view in degrees.

Return:

The view's heading, or direction.

Since:

BlackBerry 10.0.0

double latitude ()

Gets the latitude of the view.

Return:

The latitude of the center of the view.

Since:

BlackBerry 10.0.0

double longitude ()

Gets the longitude of the view.

Return:

The longitude of the center of the view.

Since:

BlackBerry 10.0.0

ViewProperties & operator= (

Assignment operator.

Parameters
src

The object from which to copy information.

Since:

BlackBerry 10.0.0

bool setAltitude (
  • doublealt)

Sets the height the map is viewed at, in meters.

Parameters
alt

The new altitude.

Return:

true if a change occurred, false otherwise

Since:

BlackBerry 10.0.0

bool setAltitudeMode (

Sets the altitude mode.

See also:

AltitudeMode

Parameters
mode

The new altitude mode.

Return:

true if the attribute changed.

Since:

BlackBerry 10.0.0

void setBoundingBox (

Sets the bounding box for this view.

Parameters
box

The new bounding box for this view.

Since:

BlackBerry 10.0.0

bool setHeading (
  • doubleheading)

Sets the orientation of the view.

Heading is the angle of the view based on a compass reading. Units are degrees. Thus, a value of 90 indicates that the view is facing east.

Parameters
heading

The new heading. Before this value is applied, it is normalized to be within the range of 0 to 360.

Return:

true if a change occurred, false otherwise

Since:

BlackBerry 10.0.0

bool setLatitude (
  • doublenewLat)

Sets the latitude of the view.

Parameters
newLat

The new latitude coordinate. The value is normalized (between -90 and +90) before being applied.

Return:

true if the attribute was changed.

Since:

BlackBerry 10.0.0

bool setLongitude (
  • doublenewLon)

Sets the longitude of the view.

Parameters
newLon

The new longitude coordinate. The value is normalized (between -180 and +180) before being applied.

Return:

true if the attribute was changed.

Since:

BlackBerry 10.0.0

bool setTilt (
  • intnewTilt)

Sets the view's tilt in degrees.

Parameters
newTilt

The view's new tilt value.

Return:

true if the attribute was changed.

Since:

BlackBerry 10.0.0

void setWindow (
  • const QRect &newDimensions)

Sets the properties of the window.

Parameters
newDimensions

The new dimensions of the window.

Since:

BlackBerry 10.0.0

int tilt ()

Gets the current view's tilt in degrees, where a value of 0 is pointing straight down.

Return:

The view's tilt value.

Since:

BlackBerry 10.0.0

QPoint windowMidpoint ()

Gets the coordinates of the middle of the window.

Return:

The midpoint of the view in screen coordinates.

Since:

BlackBerry 10.0.0

QSize windowSize ()

Gets the window's size.

Return:

The window's size in pixels.

Since:

BlackBerry 10.0.0

Last modified: 2014-06-24



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

comments powered by Disqus