• 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
  • lib
  • marble
  • routing
RoutingInputWidget.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 2010 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 #ifndef MARBLE_ROUTINGINPUTWIDGET_H
12 #define MARBLE_ROUTINGINPUTWIDGET_H
13 
14 #include "GeoDataCoordinates.h"
15 #include "GeoDataPlacemark.h"
16 #include "PositionProviderPluginInterface.h"
17 
18 #include <QWidget>
19 
20 class QNetworkReply;
21 class QAbstractItemModel;
22 class QMenu;
23 
24 namespace Marble
25 {
26 
27 class RoutingInputWidgetPrivate;
28 class MarblePlacemarkModel;
29 class RouteRequest;
30 class PluginManager;
31 class MarbleWidget;
32 
39 class RoutingInputWidget : public QWidget
40 {
41  Q_OBJECT
42 
43 public:
44 
46  explicit RoutingInputWidget( MarbleWidget* widget, int index, QWidget *parent = 0 );
47 
49  ~RoutingInputWidget();
50 
55  bool hasTargetPosition() const;
56 
62  GeoDataCoordinates targetPosition() const;
63 
67  MarblePlacemarkModel *searchResultModel();
68 
72  bool hasInput() const;
73 
77  void setIndex( int index );
78 
82  void clear();
83 
88  void setProgressAnimation( const QVector<QIcon> &animation );
89 
90 public Q_SLOTS:
95  void findPlacemarks();
96 
101  void setTargetPosition( const GeoDataCoordinates &position, const QString &name = QString() );
102 
104  void abortMapInputRequest();
105 
107  void reloadBookmarks();
108 
109 Q_SIGNALS:
111  void searchFinished( RoutingInputWidget * );
112 
114  void removalRequest( RoutingInputWidget * );
115 
117  void activityRequest( RoutingInputWidget * );
118 
120  void mapInputModeEnabled( RoutingInputWidget *, bool enabled );
121 
123  void targetValidityChanged( bool targetValid );
124 
125 private Q_SLOTS:
127  void setPlacemarkModel( QAbstractItemModel * );
128 
130  void requestActivity();
131 
133  void requestRemoval();
134 
136  void setMapInputModeEnabled( bool enabled );
137 
139  void finishSearch();
140 
142  void setInvalid();
143 
145  void updatePosition( int index, const GeoDataCoordinates &position );
146 
147  void reverseGeocoding();
148 
149  void retrieveReverseGeocodingResult( const GeoDataCoordinates &coordinates, const GeoDataPlacemark &placemark );
150 
151  void setHomePosition();
152 
153  void setCurrentLocation();
154 
155  void updateCurrentLocationButton( PositionProviderStatus status );
156 
157  void updateCenterButton( bool hasPosition );
158 
159  void setBookmarkPosition( QAction* bookmark );
160 
161  void openTargetSelectionDialog();
162 
163  void showMenu();
164 
165 private:
166  RoutingInputWidgetPrivate *const d;
167 };
168 
169 } // namespace Marble
170 
171 #endif
GeoDataCoordinates.h
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::RoutingInputWidget::setIndex
void setIndex(int index)
Change the data index in the route request model.
Definition: RoutingInputWidget.cpp:407
Marble::MarblePlacemarkModel
This class represents a model of all place marks which are currently available through a given Placem...
Definition: MarblePlacemarkModel.h:37
Marble::RoutingInputWidget::RoutingInputWidget
RoutingInputWidget(MarbleWidget *widget, int index, QWidget *parent=0)
Constructor.
Definition: RoutingInputWidget.cpp:255
QWidget
Marble::RoutingInputWidget::targetPosition
GeoDataCoordinates targetPosition() const
Returns the geoposition selected by the user, or a default constructed geoposition if hasTargetPositi...
Definition: RoutingInputWidget.cpp:341
Marble::RoutingInputWidget::searchFinished
void searchFinished(RoutingInputWidget *)
All runners are finished.
Marble::RoutingInputWidget::hasInput
bool hasInput() const
Returns false iff the input text is empty.
Definition: RoutingInputWidget.cpp:378
Marble::RoutingInputWidget::searchResultModel
MarblePlacemarkModel * searchResultModel()
Returns the placemark model that contains search results.
Definition: RoutingInputWidget.cpp:361
Marble::MarbleWidget
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:102
Marble::RoutingInputWidget::reloadBookmarks
void reloadBookmarks()
Reload the bookmarks menu.
Definition: RoutingInputWidget.cpp:443
Marble::RoutingInputWidget::setTargetPosition
void setTargetPosition(const GeoDataCoordinates &position, const QString &name=QString())
Set the target position to the given coordinates, eliminating any previously set positions.
Definition: RoutingInputWidget.cpp:323
Marble::RoutingInputWidget::setProgressAnimation
void setProgressAnimation(const QVector< QIcon > &animation)
Set the progress animation to use.
Definition: RoutingInputWidget.cpp:438
Marble::RoutingInputWidget::findPlacemarks
void findPlacemarks()
Search for placemarks matching the current input text.
Definition: RoutingInputWidget.cpp:350
Marble::RoutingInputWidget::abortMapInputRequest
void abortMapInputRequest()
Cancel a started input request from the map.
Definition: RoutingInputWidget.cpp:400
Marble::RoutingInputWidget::targetValidityChanged
void targetValidityChanged(bool targetValid)
hasTargetPosition changed because of selecting a placemark or changing the search term ...
Marble::RoutingInputWidget::activityRequest
void activityRequest(RoutingInputWidget *)
User requests to activate this widget.
Marble::RoutingInputWidget
Combines a line edit for input and a couple of buttons to let the user type in a search term...
Definition: RoutingInputWidget.h:39
GeoDataPlacemark.h
Marble::PositionProviderStatus
PositionProviderStatus
Definition: PositionProviderPluginInterface.h:25
QAbstractItemModel
Marble::RoutingInputWidget::mapInputModeEnabled
void mapInputModeEnabled(RoutingInputWidget *, bool enabled)
User requests position input from the map.
Marble::RoutingInputWidget::clear
void clear()
Remove target position and user input, if any.
Definition: RoutingInputWidget.cpp:423
Marble::RoutingInputWidget::hasTargetPosition
bool hasTargetPosition() const
Returns true if the user has selected a valid geo position.
Definition: RoutingInputWidget.cpp:335
PositionProviderPluginInterface.h
Marble::RoutingInputWidget::removalRequest
void removalRequest(RoutingInputWidget *)
User requests to remove this widget.
MarbleWidget
Wraps a Marble::MarbleWidget, providing access to important properties and methods.
Definition: MarbleDeclarativeWidget.h:50
Marble::GeoDataPlacemark
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
Marble::RoutingInputWidget::~RoutingInputWidget
~RoutingInputWidget()
Destructor.
Definition: RoutingInputWidget.cpp:299
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