• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • Marble
  • AlternativeRoutesModel
Public Types | Public Slots | Signals | Public Member Functions | Static Public Member Functions | List of all members
Marble::AlternativeRoutesModel Class Reference

#include <AlternativeRoutesModel.h>

Inherits QAbstractListModel.

Public Types

enum  WritePolicy { Instant, Lazy }
 

Public Slots

void setCurrentRoute (int index)
 

Signals

void currentRouteChanged (GeoDataDocument *newRoute)
 
void currentRouteChanged (int index)
 

Public Member Functions

 AlternativeRoutesModel (QObject *parent=0)
 
 ~AlternativeRoutesModel ()
 
void addRoute (GeoDataDocument *document, WritePolicy policy=Lazy)
 
void clear ()
 
GeoDataDocument * currentRoute ()
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
 
void newRequest (RouteRequest *request)
 
GeoDataDocument * route (int index)
 
int rowCount (const QModelIndex &parent=QModelIndex()) const
 

Static Public Member Functions

static QVector< qreal > deviation (const GeoDataDocument *routeA, const GeoDataDocument *routeB)
 
static qreal distance (const GeoDataCoordinates &satellite, const GeoDataCoordinates &lineA, const GeoDataCoordinates &lineB)
 
static GeoDataLineString * waypoints (const GeoDataDocument *document)
 

Detailed Description

Definition at line 31 of file AlternativeRoutesModel.h.

Member Enumeration Documentation

enum Marble::AlternativeRoutesModel::WritePolicy
Enumerator
Instant 
Lazy 

Definition at line 36 of file AlternativeRoutesModel.h.

Constructor & Destructor Documentation

Marble::AlternativeRoutesModel::AlternativeRoutesModel ( QObject *  parent = 0)
explicit

Constructor.

Definition at line 298 of file AlternativeRoutesModel.cpp.

Marble::AlternativeRoutesModel::~AlternativeRoutesModel ( )

Destructor.

Definition at line 305 of file AlternativeRoutesModel.cpp.

Member Function Documentation

void Marble::AlternativeRoutesModel::addRoute ( GeoDataDocument *  document,
WritePolicy  policy = Lazy 
)

Old data in the model is discarded, the parsed content of the provided document is used as the new model data and a model reset is done.

Parameters
documentThe route to add
policyIn lazy mode (default), a short amount of time is waited for other addRoute() calls before adding the route to the model. Otherwise, the model is changed immediately.

Definition at line 367 of file AlternativeRoutesModel.cpp.

void Marble::AlternativeRoutesModel::clear ( )

Remove all alternative routes from the model.

Definition at line 457 of file AlternativeRoutesModel.cpp.

GeoDataDocument * Marble::AlternativeRoutesModel::currentRoute ( )

Definition at line 447 of file AlternativeRoutesModel.cpp.

void Marble::AlternativeRoutesModel::currentRouteChanged ( GeoDataDocument *  newRoute)
signal
void Marble::AlternativeRoutesModel::currentRouteChanged ( int  index)
signal
QVariant Marble::AlternativeRoutesModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const

Overload of QAbstractListModel.

Definition at line 320 of file AlternativeRoutesModel.cpp.

QVector< qreal > Marble::AlternativeRoutesModel::deviation ( const GeoDataDocument *  routeA,
const GeoDataDocument *  routeB 
)
static

Returns the minimal distance of each waypoint of routeA to routeB.

Definition at line 413 of file AlternativeRoutesModel.cpp.

qreal Marble::AlternativeRoutesModel::distance ( const GeoDataCoordinates &  satellite,
const GeoDataCoordinates &  lineA,
const GeoDataCoordinates &  lineB 
)
static

Returns the distance between the given point and the given great circle path.

Definition at line 408 of file AlternativeRoutesModel.cpp.

QVariant Marble::AlternativeRoutesModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const

Overload of QAbstractListModel.

Definition at line 315 of file AlternativeRoutesModel.cpp.

void Marble::AlternativeRoutesModel::newRequest ( RouteRequest *  request)

Invalidate the current alternative routes and prepare for new ones to arrive.

Definition at line 340 of file AlternativeRoutesModel.cpp.

GeoDataDocument * Marble::AlternativeRoutesModel::route ( int  index)

Definition at line 331 of file AlternativeRoutesModel.cpp.

int Marble::AlternativeRoutesModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const

Overload of QAbstractListModel.

Definition at line 310 of file AlternativeRoutesModel.cpp.

void Marble::AlternativeRoutesModel::setCurrentRoute ( int  index)
slot

Definition at line 438 of file AlternativeRoutesModel.cpp.

GeoDataLineString * Marble::AlternativeRoutesModel::waypoints ( const GeoDataDocument *  document)
static

Returns the waypoints contained in the route as a linestring.

Definition at line 433 of file AlternativeRoutesModel.cpp.


The documentation for this class was generated from the following files:
  • AlternativeRoutesModel.h
  • AlternativeRoutesModel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:55 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal