• 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
  • examples
  • cpp
  • search
examples/cpp/search/main.cpp
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 2012 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 #include <QApplication>
12 #include <QDebug>
13 
14 #include <marble/MarbleWidget.h>
15 #include <marble/MarbleModel.h>
16 #include <marble/SearchRunnerManager.h>
17 #include <GeoDataPlacemark.h>
18 
19 using namespace Marble;
20 
21 int main(int argc, char** argv)
22 {
23  QApplication app( argc, argv );
24 
25  MarbleModel model;
26  SearchRunnerManager manager( &model );
27 
28  QVector<GeoDataPlacemark*> searchResult = manager.searchPlacemarks( "Karlsruhe" );
29  foreach( const GeoDataPlacemark* placemark, searchResult ) {
30  qDebug() << "Found" << placemark->name() << "at" << placemark->coordinate().toString();
31  }
32 
33  qDeleteAll( searchResult );
34 }
main
int main(int argc, char **argv)
Definition: examples/cpp/search/main.cpp:21
MarbleModel.h
This file contains the headers for MarbleModel.
Marble::SearchRunnerManager::searchPlacemarks
QVector< GeoDataPlacemark * > searchPlacemarks(const QString &searchTerm, const GeoDataLatLonBox &preferred=GeoDataLatLonBox(), int timeout=30000)
Definition: SearchRunnerManager.cpp:202
QApplication
Marble::GeoDataPlacemark::coordinate
GeoDataCoordinates coordinate(const QDateTime &dateTime=QDateTime(), bool *iconAtCoordinates=0) const
Return the coordinates of the placemark at time dateTime as a GeoDataCoordinates. ...
Definition: GeoDataPlacemark.cpp:172
Marble::SearchRunnerManager
Definition: SearchRunnerManager.h:33
GeoDataPlacemark.h
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
QVector
Marble::GeoDataFeature::name
QString name() const
The name of the feature.
Definition: GeoDataFeature.cpp:544
Marble::GeoDataCoordinates::toString
QString toString() const
return a string representation of the coordinate this is a convenience function which uses the defaul...
Definition: GeoDataCoordinates.cpp:921
SearchRunnerManager.h
MarbleWidget.h
This file contains the headers for MarbleWidget.
Marble::GeoDataPlacemark
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 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