marble
FoursquareModel.cpp
Go to the documentation of this file.
50 qreal const distanceLon = marbleModel()->planetRadius() * distanceSphere( box.west(), box.north(), box.east(), box.north() );
51 qreal const distanceLat = marbleModel()->planetRadius() * distanceSphere( box.west(), box.north(), box.west(), box.south() );
89 QString category = iterator.value().property( "categories" ).property( 0 ).property( "name" ).toString();
93 double latitude = iterator.value().property( "location" ).property( "lat" ).toString().toDouble();
94 double longitude = iterator.value().property( "location" ).property( "lng" ).toString().toDouble();
97 QScriptValue categoryIcon = iterator.value().property( "categories" ).property( 0 ).property( "icon" );
QList< AbstractDataPluginItem * > items(const ViewportParams *viewport, qint32 number=10)
Get the items on the viewport Returns the currently downloaded images in the viewport.
Definition: AbstractDataPluginModel.cpp:274
void setTarget(const QString &target)
Definition: AbstractDataPluginItem.cpp:66
Definition: FoursquareItem.h:20
void setCategory(const QString &category)
Definition: FoursquareItem.cpp:67
bool itemExists(const QString &id) const
Testing the existence of the item id in the list.
Definition: AbstractDataPluginModel.cpp:563
This file contains the headers for MarbleModel.
void setId(const QString &id)
Definition: AbstractDataPluginItem.cpp:86
QScriptValue evaluate(const QString &program, const QString &fileName, int lineNumber)
An abstract data model (not based on QAbstractModel) for a AbstractDataPlugin.
Definition: AbstractDataPluginModel.h:45
const MarbleModel * marbleModel() const
Definition: AbstractDataPluginModel.cpp:269
void setCategoryLargeIconUrl(const QString &url)
Definition: FoursquareItem.cpp:144
void parseFile(const QByteArray &file)
Parses the file which getAdditionalItems downloads and prepares the data for usage.
Definition: FoursquareModel.cpp:72
qreal distanceSphere(qreal lon1, qreal lat1, qreal lon2, qreal lat2)
This method calculates the shortest distance between two points on a sphere.
Definition: MarbleMath.h:52
FoursquareModel(const MarbleModel *marbleModel, QObject *parent=0)
Definition: FoursquareModel.cpp:30
qreal latitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the latitude of the GeoDataCoordinates object use the unit parameter to switch between Radi...
Definition: GeoDataCoordinates.cpp:751
double toDouble(bool *ok) const
QString toString() const
qreal north(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the northern boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:93
void downloadDescriptionFile(const QUrl &url)
Download the description file from the url.
Definition: AbstractDataPluginModel.cpp:392
const char * name() const
qreal east(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the eastern boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:135
QString number(int n, int base)
QString fromUtf8(const char *str, int size)
void setAddress(const QString &address)
Definition: FoursquareItem.cpp:80
QScriptValue property(const QString &name, const ResolveFlags &mode) const
void setUsersCount(const int count)
Definition: FoursquareItem.cpp:118
virtual void getAdditionalItems(const GeoDataLatLonAltBox &box, qint32 number=10)
Generates the download url for the description file from the web service depending on the box surroun...
Definition: FoursquareModel.cpp:40
qreal longitude(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
retrieves the longitude of the GeoDataCoordinates object use the unit parameter to switch between Rad...
Definition: GeoDataCoordinates.cpp:739
virtual GeoDataCoordinates center() const
returns the center of this box
Definition: GeoDataLatLonAltBox.cpp:151
void setCountry(const QString &country)
Definition: FoursquareItem.cpp:105
qreal west(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the western boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:156
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
bool isValid() const
qreal south(GeoDataCoordinates::Unit unit=GeoDataCoordinates::Radian) const
Get the southern boundary of the bounding box.
Definition: GeoDataLatLonBox.cpp:114
void setCategoryIconUrl(const QString &url)
Definition: FoursquareItem.cpp:131
void setCoordinate(const GeoDataCoordinates &coordinates)
Definition: BillboardGraphicsItem.cpp:98
bool isArray() const
A class that defines a 3D bounding box for geographic data.
Definition: GeoDataLatLonAltBox.h:49
void addItemsToList(const QList< AbstractDataPluginItem * > &items)
Adds the items to the list of initialized items.
Definition: AbstractDataPluginModel.cpp:408
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.