• 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
  • lib
  • marble
AbstractDataPlugin.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 Bastian Holst <bastianholst@gmx.de>
9 //
10 
11 #ifndef MARBLE_ABSTRACTDATAPLUGIN_H
12 #define MARBLE_ABSTRACTDATAPLUGIN_H
13 
14 // Marble
15 #include "marble_export.h"
16 #include "RenderPlugin.h"
17 
18 #if QT_VERSION < 0x050000
19 class QDeclarativeComponent;
20 #else
21 class QQmlComponent;
22 #endif
23 class QGraphicsItem;
24 
25 namespace Marble
26 {
27 
28 class ViewportParams;
29 class GeoSceneLayer;
30 class AbstractDataPluginItem;
31 class AbstractDataPluginModel;
32 class AbstractDataPluginPrivate;
33 
45 class MARBLE_EXPORT AbstractDataPlugin : public RenderPlugin
46 {
47  Q_OBJECT
48 
49  Q_PROPERTY( bool favoriteItemsOnly READ isFavoriteItemsOnly WRITE setFavoriteItemsOnly NOTIFY favoriteItemsOnlyChanged )
51  Q_PROPERTY( QObject* favoritesModel READ favoritesModel NOTIFY favoritesModelChanged )
52  Q_PROPERTY( int numberOfItems READ numberOfItems WRITE setNumberOfItems NOTIFY changedNumberOfItems )
53 
54  public:
55  explicit AbstractDataPlugin( const MarbleModel *marbleModel );
56 
57  virtual ~AbstractDataPlugin();
58 
59  bool isInitialized() const;
60 
64  QStringList backendTypes() const;
65 
69  QString renderPolicy() const;
70 
74  QStringList renderPosition() const;
75 
80  bool render( GeoPainter *painter, ViewportParams *viewport,
81  const QString& renderPos = "NONE", GeoSceneLayer * layer = 0 );
82 
86  AbstractDataPluginModel *model();
87  const AbstractDataPluginModel *model() const;
88 
92  void setModel( AbstractDataPluginModel* model );
93 
97  void setNumberOfItems( quint32 number );
98 
102  quint32 numberOfItems() const;
103 
110  QList<AbstractDataPluginItem *> whichItemAt( const QPoint& curpos );
111 
118  virtual RenderType renderType() const;
119 
120 #if QT_VERSION < 0x050000
121  void setDelegate( QDeclarativeComponent* delegate, QGraphicsItem* parent );
122 #else
123  void setDelegate( QQmlComponent* delegate, QGraphicsItem* parent );
124 #endif
125 
127  void setFavoriteItemsOnly( bool favoriteOnly );
128 
129  bool isFavoriteItemsOnly() const;
130 
131  QObject* favoritesModel();
132 
133 public Q_SLOTS:
134  void handleViewportChange( const ViewportParams *viewport );
135 
136  private Q_SLOTS:
137  virtual void favoriteItemsChanged( const QStringList& favoriteItems );
138 
139  void delayedUpdate();
140 
141  Q_SIGNALS:
142  void changedNumberOfItems( quint32 number );
143 
144  void favoriteItemsOnlyChanged();
145 
146  void favoritesModelChanged();
147 
148  private:
149  AbstractDataPluginPrivate * const d;
150 };
151 
152 }
153 
154 #endif
Marble::AbstractDataPluginItem
Definition: AbstractDataPluginItem.h:28
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
Marble::AbstractDataPluginModel
An abstract data model (not based on QAbstractModel) for a AbstractDataPlugin.
Definition: AbstractDataPluginModel.h:45
QGraphicsItem
Marble::AbstractDataPlugin
An abstract class for plugins that show data that has a geo coordinate.
Definition: AbstractDataPlugin.h:45
QPoint
Marble::GeoSceneLayer
Layer of a GeoScene document.
Definition: GeoSceneLayer.h:43
QObject
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
QString
QList
QStringList
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
QDeclarativeComponent
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
marble_export.h
RenderPlugin.h
Marble::RenderPlugin::RenderType
RenderType
A Type of plugin.
Definition: RenderPlugin.h:59
Marble::RenderPlugin
The abstract class that creates a renderable item.
Definition: RenderPlugin.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:38 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