• 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
  • plugins
  • render
  • twitter
twitterPlugin.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 2008 Shashank Singh <shashank.personal@gmail.com>
9 //
10 
11 //
12 // This class is a test plugin.
13 //
14 
15 #ifndef MARBLETWITTERPLUGIN_H
16 #define MARBLETWITTERPLUGIN_H
17 #define RADIANSTODEGREES 57.2957795
18 
19 #include <QObject>
20 #include <QFile>
21 #include <QTextStream>
22 #include "../lib/HttpDownloadManager.h"
23 #include "../lib/CacheStoragePolicy.h"
24 #include "jsonparser.h"
25 #include "RenderPlugin.h"
26 #include "MarbleDirs.h"
27 #include "GeoPainter.h"
28 #include "GeoDataCoordinates.h"
29 
30 namespace Marble
31 {
32 
37 struct twitterStructure
38 {
39  QString twit ;
40  GeoDataCoordinates location;
41 };
42 
43 class twitterPlugin : public RenderPlugin
44 {
45  Q_OBJECT
46  Q_PLUGIN_METADATA( IID "org.kde.edu.marble.twitterPlugin" )
47  Q_INTERFACES(Marble::RenderPluginInterface)
48  MARBLE_PLUGIN(twitterPlugin)
49 
50 public:
51  QStringList backendTypes() const;
52 
53  QString renderPolicy() const;
54 
55  QStringList renderPosition() const;
56 
57  QString name() const;
58 
59  QString guiString() const;
60 
61  QString nameId() const;
62 
63  QString description() const;
64 
65  QIcon icon() const;
66 
67 
68  void initialize();
69 
70  bool isInitialized() const;
71 
72  bool render(GeoPainter *painter, ViewportParams *viewport, const QString& renderPos, GeoSceneLayer * layer = 0);
73 
74  ~twitterPlugin();
75 
76 public slots:
77  void slotJsonDownloadComplete(QString , QString); //completed download of json reply fom panoramio
78  void slotGeoCodingReplyRecieved(QString , QString); //completed download of image
79 
80 signals:
81  void statusMessageForImageDownloadingProcess(QString);
82 private:
83  CacheStoragePolicy *m_storagePolicy;
84  HttpDownloadManager *m_downloadManager;
85  jsonParser twitterJsonParser;
86  void downloadtwitter(int, int, qreal, qreal, qreal, qreal);
87  QList <twitterStructure > twitsWithLocation;//this list will hold pointers to TWITT we have downloaded successfully figured out :)
88  QList <twitterDataStructure> parsedData;
89  void findLatLonOfStreetAddress(QString streetAddress);
90  int privateFlagForRenderingTwitts;//this flag is one when globe has an Image (downloaded or already there in cache)
91 
92 };
93 
94 }
95 
96 #endif
GeoDataCoordinates.h
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::RenderPluginInterface
The class that specifies the Marble layer interface of a plugin.
Definition: RenderPluginInterface.h:30
Marble::twitterPlugin::guiString
QString guiString() const
String that should be displayed in GUI.
Definition: twitterPlugin.cpp:50
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
Marble::twitterPlugin::backendTypes
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
Marble::twitterStructure
The class that specifies the a simple panormaio plugin.
Definition: twitterPlugin.h:37
jsonparser.h
Marble::twitterPlugin::slotGeoCodingReplyRecieved
void slotGeoCodingReplyRecieved(QString, QString)
Definition: twitterPlugin.cpp:148
Marble::twitterPlugin::icon
QIcon icon() const
Returns an icon for the plugin.
Definition: twitterPlugin.cpp:65
Marble::twitterPlugin::nameId
QString nameId() const
Returns the unique name of the plugin.
Definition: twitterPlugin.cpp:55
Marble::CacheStoragePolicy
Definition: CacheStoragePolicy.h:25
Marble::twitterStructure::location
GeoDataCoordinates location
Definition: twitterPlugin.h:40
Marble::twitterPlugin::renderPolicy
QString renderPolicy() const
Return how the plugin settings should be used.
Definition: twitterPlugin.cpp:35
Marble::twitterPlugin::description
QString description() const
Returns a user description of the plugin.
Definition: twitterPlugin.cpp:60
Marble::GeoSceneLayer
Layer of a GeoScene document.
Definition: GeoSceneLayer.h:43
Marble::twitterPlugin::slotJsonDownloadComplete
void slotJsonDownloadComplete(QString, QString)
Definition: twitterPlugin.cpp:110
Marble::twitterStructure::twit
QString twit
Definition: twitterPlugin.h:39
Marble::twitterPlugin
Definition: twitterPlugin.h:43
MarbleDirs.h
Marble::twitterPlugin::isInitialized
bool isInitialized() const
Definition: twitterPlugin.cpp:80
Marble::twitterPlugin::~twitterPlugin
~twitterPlugin()
Right now this plugin displays public twit from Twitter , and gecocodes [i.e getting lat lon from a g...
Definition: twitterPlugin.cpp:25
QString
QList
GeoPainter.h
Marble::twitterPlugin::render
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
QStringList
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
Marble::twitterPlugin::renderPosition
QStringList renderPosition() const
Preferred level in the layer stack for the rendering.
Definition: twitterPlugin.cpp:40
Marble::twitterPlugin::initialize
void initialize()
Definition: twitterPlugin.cpp:71
RenderPlugin.h
jsonParser
Definition: panoramio/jsonparser.h:46
Marble::twitterPlugin::statusMessageForImageDownloadingProcess
void statusMessageForImageDownloadingProcess(QString)
Marble::RenderPlugin
The abstract class that creates a renderable item.
Definition: RenderPlugin.h:43
QIcon
Marble::twitterPlugin::name
QString name() const
Returns the user-visible name of the plugin.
Definition: twitterPlugin.cpp:45
Marble::HttpDownloadManager
This class manages scheduled downloads.
Definition: HttpDownloadManager.h:44
MARBLE_PLUGIN
#define MARBLE_PLUGIN(T)
Definition: RenderPlugin.h:340
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

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