marble
twitterPlugin.cpp
Go to the documentation of this file.
116 parsedData = twitterJsonParser.parseAllObjects(QString::fromUtf8(m_storagePolicy->data(id)), 20);
118 disconnect(m_downloadManager, SIGNAL(downloadComplete(QString,QString)), this, SLOT(slotJsonDownloadComplete(QString,QString)) );
120 connect(m_downloadManager, SIGNAL(downloadComplete(QString,QString)), this, SLOT(slotGeoCodingReplyRecieved(QString,QString)) );
123 parsedData[counter].location.replace(QRegExp("[?,:!/\\s]+"), "+");//remove whitespace and replace it with + for query api
130 void twitterPlugin::downloadtwitter(int rangeFrom , int rangeTo , qreal east , qreal west , qreal north , qreal south)
134 m_downloadManager->addJob(QUrl("http://twitter.com/statuses/public_timeline.json"), "twitter", "twitter");
135 // m_downloadManager->addJob(QUrl("http://identi.ca/api/statuses/public_timeline.json"), "identica", "identica");
137 connect(m_downloadManager, SIGNAL(downloadComplete(QString,QString)), this, SLOT(slotJsonDownloadComplete(QString,QString)) );
144 m_downloadManager->addJob("http://maps.google.com/maps/geo?q=" + streetAddress + "&output=json&key=ABQIAAAASD_v8YRzG0tBD18730KjmRTxoHoIpYL45xcSRJH0O7cH64DuXRT7rQeRcgCLAhjkteQ8vkWAATM_JQ", streetAddress, streetAddress);
154 geoCodedData = twitterJsonParser.geoCodingAPIparseObject(QString::fromUtf8(m_storagePolicy->data(id))) ;
156 twitterData.location = GeoDataCoordinates(geoCodedData.lat, geoCodedData.lon, 1.0, GeoDataCoordinates::Degree);
void addJob(const QUrl &sourceUrl, const QString &destFilename, const QString &id, const DownloadUsage usage)
Adds a new job with a sourceUrl, destination file name and given id.
Definition: HttpDownloadManager.cpp:129
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
QStringList backendTypes() const
Returns the name(s) of the backend that the plugin can render This method should return the name of t...
Definition: twitterPlugin.cpp:30
The class that specifies the a simple panormaio plugin.
Definition: twitterPlugin.h:37
void slotGeoCodingReplyRecieved(QString, QString)
Definition: twitterPlugin.cpp:148
googleMapDataStructure geoCodingAPIparseObject(QString content)
Definition: twitter/jsonparser.cpp:61
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
void setStyle(Qt::BrushStyle style)
QString tr(const char *sourceText, const char *disambiguation, int n)
QString renderPolicy() const
Return how the plugin settings should be used.
Definition: twitterPlugin.cpp:35
QString description() const
Returns a user description of the plugin.
Definition: twitterPlugin.cpp:60
QString fromUtf8(const char *str, int size)
void slotJsonDownloadComplete(QString, QString)
Definition: twitterPlugin.cpp:110
void setPen(const QColor &color)
Definition: twitterPlugin.h:43
void setBrush(const QBrush &brush)
void drawAnnotation(const GeoDataCoordinates &position, const QString &text, QSizeF bubbleSize=QSizeF(130, 100), qreal bubbleOffsetX=-10, qreal bubbleOffsetY=-30, qreal xRnd=5, qreal yRnd=5)
Draws a text annotation that points to a geodesic position.
Definition: GeoPainter.cpp:197
~twitterPlugin()
Right now this plugin displays public twit from Twitter , and gecocodes [i.e getting lat lon from a g...
Definition: twitterPlugin.cpp:25
bool render(GeoPainter *painter, ViewportParams *viewport, const QString &renderPos, GeoSceneLayer *layer=0)
Renders the content provided by the layer on the viewport.
Definition: twitterPlugin.cpp:85
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
QStringList renderPosition() const
Preferred level in the layer stack for the rendering.
Definition: twitterPlugin.cpp:40
QByteArray data(const QString &fileName)
Returns the data of a file.
Definition: CacheStoragePolicy.cpp:56
QList< panoramioDataStructure > parseAllObjects(const QString &content, int number)
Definition: panoramio/jsonparser.cpp:88
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Definition: twitter/jsonparser.h:37
void setColor(const QColor &color)
This class manages scheduled downloads.
Definition: HttpDownloadManager.h:44
void replace(int i, const T &value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:42 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:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.