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

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • plugins
  • render
  • annotate
AnnotatePlugin.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 2009 Andrew Manson <g.real.ate@gmail.com>
9 // Copyright 2013 Thibaut Gridel <tgridel@free.fr>
10 //
11 
12 //
13 // This class provides a Marble plugin to annotate maps with polygons
14 // and placemarks
15 //
16 
17 #ifndef MARBLE_ANNOTATEPLUGIN_H
18 #define MARBLE_ANNOTATEPLUGIN_H
19 
20 #include "RenderPlugin.h"
21 #include "SceneGraphicsItem.h"
22 
23 #include <QObject>
24 #include <QErrorMessage>
25 
26 class QNetworkAccessManager;
27 class QNetworkReply;
28 
29 
30 namespace Marble
31 {
32 class MarbleWidget;
33 class PlacemarkTextAnnotation;
34 class GeoDataDocument;
35 class GeoDataLinearRing;
36 class GeoDataLineString;
37 
43 class AnnotatePlugin : public RenderPlugin
44 {
45  Q_OBJECT
46  Q_PLUGIN_METADATA( IID "org.kde.edu.marble.AnnotatePlugin" )
47  Q_INTERFACES( Marble::RenderPluginInterface )
48  MARBLE_PLUGIN( AnnotatePlugin )
49 
50  public:
51  explicit AnnotatePlugin(const MarbleModel *model = 0);
52  virtual ~AnnotatePlugin();
53 
54  QStringList backendTypes() const;
55 
56  QString renderPolicy() const;
57 
58  QStringList renderPosition() const;
59 
60  QString name() const;
61 
62  QString guiString() const;
63 
64  QString nameId() const;
65 
66  QString version() const;
67 
68  QString description() const;
69 
70  QIcon icon () const;
71 
72  QString copyrightYears() const;
73 
74  QList<PluginAuthor> pluginAuthors() const;
75 
76  void initialize ();
77 
78  bool isInitialized () const;
79 
80  virtual QString runtimeTrace() const;
81 
82  virtual const QList<QActionGroup*>* actionGroups() const;
83  virtual const QList<QActionGroup*>* toolbarActionGroups() const;
84 
85  bool render( GeoPainter *painter, ViewportParams *viewport,
86  const QString& renderPos, GeoSceneLayer * layer = 0 );
87 
88 signals:
89  void placemarkAdded();
90  void itemRemoved();
91 
92 public slots:
93  void enableModel( bool enabled );
94 
95  void setAddingPlacemark( bool );
96  void setDrawingPolygon( bool );
97  void setRemovingItems( bool );
98 
99  // void receiveNetworkReply( QNetworkReply* );
100  // void downloadOsmFile();
101 
102  void clearAnnotations();
103  void saveAnnotationFile();
104  void loadAnnotationFile();
105 
106 protected:
107  bool eventFilter(QObject* watched, QEvent* event);
108 private:
109  void setupActions(MarbleWidget* m);
110  // void readOsmFile( QIODevice* device, bool flyToFile );
111 
112  bool m_widgetInitialized;
113  MarbleWidget* m_marbleWidget;
114 
115  QList<QActionGroup*> m_actions;
116  QList<QActionGroup*> m_toolbarActions;
117 
118  GeoDataDocument *m_annotationDocument;
119  QList<SceneGraphicsItem*> m_graphicsItems;
120 
121  //used while creating new polygons
122  GeoDataPlacemark* m_polygon_placemark;
123  SceneGraphicsItem *m_selectedItem;
124 
125  bool m_addingPlacemark;
126  bool m_drawingPolygon;
127  bool m_removingItem;
128  // QNetworkAccessManager* m_networkAccessManager;
129  // QErrorMessage m_errorMessage;
130  bool m_isInitialized;
131 };
132 
133 }
134 
135 #endif // MARBLE_ANNOTATEPLUGIN_H
Marble::AnnotatePlugin::name
QString name() const
Returns the user-visible name of the plugin.
Definition: AnnotatePlugin.cpp:97
Marble::AnnotatePlugin::~AnnotatePlugin
virtual ~AnnotatePlugin()
Definition: AnnotatePlugin.cpp:73
Marble::AnnotatePlugin::itemRemoved
void itemRemoved()
Marble::RenderPluginInterface
The class that specifies the Marble layer interface of a plugin.
Definition: RenderPluginInterface.h:30
Marble::GeoDataDocument
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:64
Marble::AnnotatePlugin::isInitialized
bool isInitialized() const
Definition: AnnotatePlugin.cpp:155
Marble::AnnotatePlugin::nameId
QString nameId() const
Returns the unique name of the plugin.
Definition: AnnotatePlugin.cpp:107
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
Marble::AnnotatePlugin::pluginAuthors
QList< PluginAuthor > pluginAuthors() const
Definition: AnnotatePlugin.cpp:127
Marble::AnnotatePlugin::loadAnnotationFile
void loadAnnotationFile()
Definition: AnnotatePlugin.cpp:344
QObject
Marble::MarbleWidget
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:102
Marble::AnnotatePlugin::actionGroups
virtual const QList< QActionGroup * > * actionGroups() const
Getting all actions.
Definition: AnnotatePlugin.cpp:164
Marble::AnnotatePlugin::placemarkAdded
void placemarkAdded()
Marble::AnnotatePlugin::setRemovingItems
void setRemovingItems(bool)
Definition: AnnotatePlugin.cpp:233
Marble::AnnotatePlugin
The class that specifies the Marble layer interface of a plugin.
Definition: AnnotatePlugin.h:43
Marble::GeoSceneLayer
Layer of a GeoScene document.
Definition: GeoSceneLayer.h:43
Marble::AnnotatePlugin::setDrawingPolygon
void setDrawingPolygon(bool)
Definition: AnnotatePlugin.cpp:207
Marble::SceneGraphicsItem
Definition: SceneGraphicsItem.h:28
Marble::AnnotatePlugin::eventFilter
bool eventFilter(QObject *watched, QEvent *event)
Definition: AnnotatePlugin.cpp:393
Marble::AnnotatePlugin::render
bool render(GeoPainter *painter, ViewportParams *viewport, const QString &renderPos, GeoSceneLayer *layer=0)
Renders the content provided by the layer on the viewport.
Definition: AnnotatePlugin.cpp:174
Marble::AnnotatePlugin::renderPolicy
QString renderPolicy() const
Return how the plugin settings should be used.
Definition: AnnotatePlugin.cpp:87
Marble::AnnotatePlugin::renderPosition
QStringList renderPosition() const
Preferred level in the layer stack for the rendering.
Definition: AnnotatePlugin.cpp:92
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
Marble::AnnotatePlugin::clearAnnotations
void clearAnnotations()
Definition: AnnotatePlugin.cpp:307
SceneGraphicsItem.h
Marble::AnnotatePlugin::copyrightYears
QString copyrightYears() const
Definition: AnnotatePlugin.cpp:122
Marble::AnnotatePlugin::description
QString description() const
Returns a user description of the plugin.
Definition: AnnotatePlugin.cpp:112
Marble::AnnotatePlugin::setAddingPlacemark
void setAddingPlacemark(bool)
Definition: AnnotatePlugin.cpp:202
Marble::AnnotatePlugin::initialize
void initialize()
Definition: AnnotatePlugin.cpp:140
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:96
Marble::AnnotatePlugin::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: AnnotatePlugin.cpp:82
RenderPlugin.h
Marble::AnnotatePlugin::toolbarActionGroups
virtual const QList< QActionGroup * > * toolbarActionGroups() const
Getting all actions which should be placed in the toolbar.
Definition: AnnotatePlugin.cpp:169
Marble::AnnotatePlugin::enableModel
void enableModel(bool enabled)
Definition: AnnotatePlugin.cpp:187
Marble::AnnotatePlugin::icon
QIcon icon() const
Returns an icon for the plugin.
Definition: AnnotatePlugin.cpp:134
Marble::AnnotatePlugin::saveAnnotationFile
void saveAnnotationFile()
Definition: AnnotatePlugin.cpp:327
Marble::AnnotatePlugin::AnnotatePlugin
AnnotatePlugin(const MarbleModel *model=0)
Definition: AnnotatePlugin.cpp:42
Marble::RenderPlugin::enabled
bool enabled() const
is enabled
MarbleWidget
Wraps a Marble::MarbleWidget, providing access to important properties and methods.
Definition: MarbleDeclarativeWidget.h:50
Marble::AnnotatePlugin::runtimeTrace
virtual QString runtimeTrace() const
Returns a debug line for perfo/tracing issues.
Definition: AnnotatePlugin.cpp:160
Marble::AnnotatePlugin::version
QString version() const
Definition: AnnotatePlugin.cpp:117
Marble::GeoDataPlacemark
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
Marble::RenderPlugin
The abstract class that creates a renderable item.
Definition: RenderPlugin.h:43
Marble::AnnotatePlugin::guiString
QString guiString() const
String that should be displayed in GUI.
Definition: AnnotatePlugin.cpp:102
MARBLE_PLUGIN
#define MARBLE_PLUGIN(T)
Definition: RenderPlugin.h:337
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:48 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
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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