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

marble

  • sources
  • kde-4.14
  • 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 QAbstractItemModel;
21 
22 namespace Marble
23 {
24 
25 class RoutingInputWidgetPrivate;
26 class MarbleModel;
27 class MarblePlacemarkModel;
28 
35 class RoutingInputWidget : public QWidget
36 {
37  Q_OBJECT
38 
39 public:
40 
42  explicit RoutingInputWidget( MarbleModel* model, int index, QWidget *parent = 0 );
43 
45  ~RoutingInputWidget();
46 
51  bool hasTargetPosition() const;
52 
58  GeoDataCoordinates targetPosition() const;
59 
63  MarblePlacemarkModel *searchResultModel();
64 
68  bool hasInput() const;
69 
73  void setIndex( int index );
74 
78  void clear();
79 
80 public Q_SLOTS:
85  void findPlacemarks();
86 
91  void setTargetPosition( const GeoDataCoordinates &position, const QString &name = QString() );
92 
94  void abortMapInputRequest();
95 
97  void reloadBookmarks();
98 
99 Q_SIGNALS:
101  void searchFinished( RoutingInputWidget * );
102 
104  void removalRequest( RoutingInputWidget * );
105 
107  void activityRequest( RoutingInputWidget * );
108 
110  void mapInputModeEnabled( RoutingInputWidget *, bool enabled );
111 
113  void targetValidityChanged( bool targetValid );
114 
115 private Q_SLOTS:
117  void setPlacemarkModel( QAbstractItemModel * );
118 
120  void requestActivity();
121 
123  void requestRemoval();
124 
126  void setMapInputModeEnabled( bool enabled );
127 
129  void finishSearch();
130 
132  void setInvalid();
133 
135  void updatePosition( int index, const GeoDataCoordinates &position );
136 
137  void reverseGeocoding();
138 
139  void retrieveReverseGeocodingResult( const GeoDataCoordinates &coordinates, const GeoDataPlacemark &placemark );
140 
141  void setHomePosition();
142 
143  void setCurrentLocation();
144 
145  void updateCurrentLocationButton( PositionProviderStatus status );
146 
147  void updateCenterButton( bool hasPosition );
148 
149  void setBookmarkPosition( QAction* bookmark );
150 
151  void openTargetSelectionDialog();
152 
153  void showMenu();
154 
155 private:
156  RoutingInputWidgetPrivate *const d;
157 };
158 
159 } // namespace Marble
160 
161 #endif
GeoDataCoordinates.h
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
QWidget
Marble::RoutingInputWidget::setIndex
void setIndex(int index)
Change the data index in the route request model.
Definition: RoutingInputWidget.cpp:403
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::targetPosition
GeoDataCoordinates targetPosition() const
Returns the geoposition selected by the user, or a default constructed geoposition if hasTargetPositi...
Definition: RoutingInputWidget.cpp:337
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:374
Marble::RoutingInputWidget::searchResultModel
MarblePlacemarkModel * searchResultModel()
Returns the placemark model that contains search results.
Definition: RoutingInputWidget.cpp:357
Marble::RoutingInputWidget::reloadBookmarks
void reloadBookmarks()
Reload the bookmarks menu.
Definition: RoutingInputWidget.cpp:434
QObject::name
const char * name() const
QWidget::enabled
enabled
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:320
Marble::RoutingInputWidget::findPlacemarks
void findPlacemarks()
Search for placemarks matching the current input text.
Definition: RoutingInputWidget.cpp:346
Marble::RoutingInputWidget::abortMapInputRequest
void abortMapInputRequest()
Cancel a started input request from the map.
Definition: RoutingInputWidget.cpp:396
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:35
QString
GeoDataPlacemark.h
Marble::PositionProviderStatus
PositionProviderStatus
Definition: PositionProviderPluginInterface.h:25
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:419
Marble::RoutingInputWidget::RoutingInputWidget
RoutingInputWidget(MarbleModel *model, int index, QWidget *parent=0)
Constructor.
Definition: RoutingInputWidget.cpp:254
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
Marble::RoutingInputWidget::hasTargetPosition
bool hasTargetPosition() const
Returns true if the user has selected a valid geo position.
Definition: RoutingInputWidget.cpp:332
PositionProviderPluginInterface.h
Marble::RoutingInputWidget::removalRequest
void removalRequest(RoutingInputWidget *)
User requests to remove this widget.
QAction
QAbstractItemModel
QObject::parent
QObject * parent() const
Marble::GeoDataPlacemark
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
Marble::RoutingInputWidget::~RoutingInputWidget
~RoutingInputWidget()
Destructor.
Definition: RoutingInputWidget.cpp:296
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 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
  • 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