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

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • plugins
  • declarative
Routing.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2011 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 #ifndef MARBLE_DECLARATIVE_ROUTING_H
12 #define MARBLE_DECLARATIVE_ROUTING_H
13 
14 #include <QObject>
15 #if QT_VERSION < 0x050000
16  #include <QtDeclarative/qdeclarative.h>
17 #else
18  #include <QtQml/qqml.h>
19 #endif
20 
21 class QAbstractItemModel;
22 
23 class MarbleWidget;
24 class RoutingPrivate;
25 
26 class Routing : public QObject
27 {
28  Q_OBJECT
29  Q_PROPERTY( MarbleWidget* map READ map WRITE setMap NOTIFY mapChanged)
30  Q_PROPERTY( QString routingProfile READ routingProfile WRITE setRoutingProfile NOTIFY routingProfileChanged )
31  Q_PROPERTY( bool hasRoute READ hasRoute NOTIFY hasRouteChanged )
32 
33 public:
34  enum RoutingProfile { Motorcar, Bicycle, Pedestrian };
35 
36  explicit Routing( QObject* parent = 0 );
37 
38  ~Routing();
39 
40  void setMap( MarbleWidget* widget );
41 
42  MarbleWidget *map();
43 
44  QString routingProfile() const;
45 
46  void setRoutingProfile( const QString & profile );
47 
48  bool hasRoute() const;
49 
50 public Q_SLOTS:
51  void addVia( qreal lon, qreal lat );
52 
53  void setVia( int index, qreal lon, qreal lat );
54 
55  void removeVia( int index );
56 
57  void reverseRoute();
58 
59  void clearRoute();
60 
61  void updateRoute();
62 
63  void openRoute( const QString &filename );
64 
65  void saveRoute( const QString &filename );
66 
67  QObject* waypointModel();
68 
69 Q_SIGNALS:
70  void mapChanged();
71 
72  void routingProfileChanged();
73 
74  void hasRouteChanged();
75 
76 private:
77  RoutingPrivate* const d;
78 };
79 
80 #endif
Routing::Motorcar
Definition: Routing.h:34
Routing::updateRoute
void updateRoute()
Definition: Routing.cpp:162
Routing::setRoutingProfile
void setRoutingProfile(const QString &profile)
Definition: Routing.cpp:91
Routing::mapChanged
void mapChanged()
Routing::removeVia
void removeVia(int index)
Definition: Routing.cpp:136
Routing::routingProfileChanged
void routingProfileChanged()
Routing::Routing
Routing(QObject *parent=0)
Definition: Routing.cpp:42
Routing::map
MarbleWidget * map()
Routing::routingProfile
QString routingProfile() const
Routing::saveRoute
void saveRoute(const QString &filename)
Definition: Routing.cpp:187
Routing::waypointModel
QObject * waypointModel()
Definition: Routing.cpp:53
Routing::addVia
void addVia(qreal lon, qreal lat)
Definition: Routing.cpp:107
QObject
Routing
Definition: Routing.qml:15
Routing::Bicycle
Definition: Routing.h:34
Routing::setVia
void setVia(int index, qreal lon, qreal lat)
Definition: Routing.cpp:116
Routing::hasRouteChanged
void hasRouteChanged()
Routing::Pedestrian
Definition: Routing.h:34
Routing::clearRoute
void clearRoute()
Definition: Routing.cpp:155
QAbstractItemModel
Routing::RoutingProfile
RoutingProfile
Definition: Routing.h:34
Routing::setMap
void setMap(MarbleWidget *widget)
Definition: Routing.cpp:58
Routing::openRoute
void openRoute(const QString &filename)
Definition: Routing.cpp:169
Routing::hasRoute
bool hasRoute() const
MarbleWidget
Wraps a Marble::MarbleWidget, providing access to important properties and methods.
Definition: MarbleDeclarativeWidget.h:50
Routing::reverseRoute
void reverseRoute()
Definition: Routing.cpp:148
Routing::~Routing
~Routing()
Definition: Routing.cpp:48
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:52 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