• 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
  • 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  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 
84  void loadSettings( const QHash<QString, QVariant> &settings );
85 
91  void downloadFile( const QUrl &url, const QString &id );
92 
100  virtual void parseFile( const QString &id, const QByteArray &file );
101 
102 Q_SIGNALS:
103  void itemUpdateStarted();
104  void itemUpdateEnded();
105  void fileParsed( const QString &id );
106 
107 private:
108  TrackerPluginModelPrivate *d;
109  Q_PRIVATE_SLOT( d, void downloaded( const QString &, const QString & ) );
110  Q_PRIVATE_SLOT( d, void update() );
111 };
112 
113 } // namespace Marble
114 
115 #endif // MARBLE_TRACKERPLUGINMODEL_H
Marble::TrackerPluginModel::itemUpdateEnded
void itemUpdateEnded()
Marble::TrackerPluginModel::enable
void enable(bool enabled)
Definition: TrackerPluginModel.cpp:107
Marble::GeoDataTreeModel
The representation of GeoData in a model This class represents all available data given by kml-data f...
Definition: GeoDataTreeModel.h:32
QObject
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:170
Marble::TrackerPluginModel::itemUpdateStarted
void itemUpdateStarted()
Marble::TrackerPluginModel::fileParsed
void fileParsed(const QString &id)
Marble::TrackerPluginModel::items
QVector< TrackerPluginItem * > items() const
Return all available items.
Definition: TrackerPluginModel.cpp:126
Marble::TrackerPluginModel::endUpdateItems
void endUpdateItems()
End a series of add or remove items operations on the model.
Definition: TrackerPluginModel.cpp:150
Marble::TrackerPluginModel::~TrackerPluginModel
virtual ~TrackerPluginModel()
Definition: TrackerPluginModel.cpp:99
Marble::TrackerPluginItem
Subclass this to represent items in your TrackerPluginModel.
Definition: TrackerPluginItem.h:29
Marble::TrackerPluginModel::beginUpdateItems
void beginUpdateItems()
Begin a series of add or remove items operations on the model.
Definition: TrackerPluginModel.cpp:141
Marble::TrackerPluginModel
A model used to download, store and update items.
Definition: TrackerPluginModel.h:29
Marble::TrackerPluginModel::loadSettings
void loadSettings(const QHash< QString, QVariant > &settings)
Load settings.
Definition: TrackerPluginModel.cpp:160
Marble::TrackerPluginModel::TrackerPluginModel
TrackerPluginModel(GeoDataTreeModel *treeModel)
Constructs a model with the given treeModel and pluginManager.
Definition: TrackerPluginModel.cpp:85
Marble::TrackerPluginModel::clear
void clear()
Remove all items from the model.
Definition: TrackerPluginModel.cpp:131
Marble::TrackerPluginModel::addItem
void addItem(TrackerPluginItem *mark)
Add the item mark to the model.
Definition: TrackerPluginModel.cpp:120
Marble::TrackerPluginModel::downloadFile
void downloadFile(const QUrl &url, const QString &id)
Adds url to the download queue.
Definition: TrackerPluginModel.cpp:165
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:53 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