• 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
  • satellites
TrackerPluginModel.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 2011 Guillaume Martres <smarter@ubuntu.com>
9 //
10 
11 #ifndef MARBLE_TRACKERPLUGINMODEL_H
12 #define MARBLE_TRACKERPLUGINMODEL_H
13 
14 #include <QObject>
15 #include <QHash>
16 
17 class QUrl;
18 
19 namespace Marble
20 {
21 
22 class GeoDataTreeModel;
23 class TrackerPluginItem;
24 class TrackerPluginModelPrivate;
25 
29 class TrackerPluginModel : public QObject
30 {
31  Q_OBJECT
32 
33 public:
40  explicit TrackerPluginModel( GeoDataTreeModel *treeModel );
41 
42  virtual ~TrackerPluginModel();
43 
44  void enable( bool enabled );
45 
51  void addItem( TrackerPluginItem *mark );
52 
56  QVector<TrackerPluginItem*> items() const;
57 
61  void clear();
62 
70  void beginUpdateItems();
71 
79  void endUpdateItems();
80 
86  void downloadFile( const QUrl &url, const QString &id );
87 
95  virtual void parseFile( const QString &id, const QByteArray &file );
96 
97 Q_SIGNALS:
98  void itemUpdateStarted();
99  void itemUpdateEnded();
100  void fileParsed( const QString &id );
101 
102 private:
103  TrackerPluginModelPrivate *d;
104  Q_PRIVATE_SLOT( d, void downloaded( const QString &, const QString & ) );
105  Q_PRIVATE_SLOT( d, void update() );
106 };
107 
108 } // namespace Marble
109 
110 #endif // MARBLE_TRACKERPLUGINMODEL_H
Marble::TrackerPluginModel::itemUpdateEnded
void itemUpdateEnded()
Marble::TrackerPluginModel::enable
void enable(bool enabled)
Definition: TrackerPluginModel.cpp:108
Marble::GeoDataTreeModel
The representation of GeoData in a model This class represents all available data given by kml-data f...
Definition: GeoDataTreeModel.h:32
QByteArray
Marble::TrackerPluginModel::parseFile
virtual void parseFile(const QString &id, const QByteArray &file)
This method is called whenever a file queued up for download by downloadFile() has finished downloadi...
Definition: TrackerPluginModel.cpp:166
Marble::TrackerPluginModel::itemUpdateStarted
void itemUpdateStarted()
QObject
Marble::TrackerPluginModel::fileParsed
void fileParsed(const QString &id)
Marble::TrackerPluginModel::items
QVector< TrackerPluginItem * > items() const
Return all available items.
Definition: TrackerPluginModel.cpp:127
Marble::TrackerPluginModel::endUpdateItems
void endUpdateItems()
End a series of add or remove items operations on the model.
Definition: TrackerPluginModel.cpp:151
Marble::TrackerPluginModel::~TrackerPluginModel
virtual ~TrackerPluginModel()
Definition: TrackerPluginModel.cpp:100
QString
Marble::TrackerPluginItem
Subclass this to represent items in your TrackerPluginModel.
Definition: TrackerPluginItem.h:29
QUrl
Marble::TrackerPluginModel::beginUpdateItems
void beginUpdateItems()
Begin a series of add or remove items operations on the model.
Definition: TrackerPluginModel.cpp:142
QVector
Marble::TrackerPluginModel
A model used to download, store and update items.
Definition: TrackerPluginModel.h:29
Marble::TrackerPluginModel::TrackerPluginModel
TrackerPluginModel(GeoDataTreeModel *treeModel)
Constructs a model with the given treeModel and pluginManager.
Definition: TrackerPluginModel.cpp:86
Marble::TrackerPluginModel::clear
void clear()
Remove all items from the model.
Definition: TrackerPluginModel.cpp:132
Marble::TrackerPluginModel::addItem
void addItem(TrackerPluginItem *mark)
Add the item mark to the model.
Definition: TrackerPluginModel.cpp:121
Marble::TrackerPluginModel::downloadFile
void downloadFile(const QUrl &url, const QString &id)
Adds url to the download queue.
Definition: TrackerPluginModel.cpp:161
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