marble
#include <TrackerPluginModel.h>
Signals | |
void | fileParsed (const QString &id) |
void | itemUpdateEnded () |
void | itemUpdateStarted () |
Public Member Functions | |
TrackerPluginModel (GeoDataTreeModel *treeModel) | |
virtual | ~TrackerPluginModel () |
void | addItem (TrackerPluginItem *mark) |
void | beginUpdateItems () |
void | clear () |
void | downloadFile (const QUrl &url, const QString &id) |
void | enable (bool enabled) |
void | endUpdateItems () |
QVector< TrackerPluginItem * > | items () const |
void | loadSettings (const QHash< QString, QVariant > &settings) |
virtual void | parseFile (const QString &id, const QByteArray &file) |
Detailed Description
A model used to download, store and update items.
Definition at line 29 of file TrackerPluginModel.h.
Constructor & Destructor Documentation
Marble::TrackerPluginModel::TrackerPluginModel | ( | GeoDataTreeModel * | treeModel | ) |
Constructs a model with the given treeModel
and pluginManager
.
These parameters can be obtained by calling treeModel() and pluginManager() on an instance of MarbleModel.
Definition at line 85 of file TrackerPluginModel.cpp.
|
virtual |
Definition at line 99 of file TrackerPluginModel.cpp.
Member Function Documentation
void Marble::TrackerPluginModel::addItem | ( | TrackerPluginItem * | mark | ) |
Add the item mark
to the model.
- See also
- beginUpdateItems, endUpdateItems
Definition at line 120 of file TrackerPluginModel.cpp.
void Marble::TrackerPluginModel::beginUpdateItems | ( | ) |
Begin a series of add or remove items operations on the model.
Always call this method before adding or removing items to the model and call endUpdateItems() once you're done updating the model.
- See also
- endUpdateItems(), addItem()
Definition at line 141 of file TrackerPluginModel.cpp.
void Marble::TrackerPluginModel::clear | ( | ) |
Remove all items from the model.
Definition at line 131 of file TrackerPluginModel.cpp.
void Marble::TrackerPluginModel::downloadFile | ( | const QUrl & | url, |
const QString & | id | ||
) |
Adds url
to the download queue.
Once the file is downloaded, parseFile() will be called with its first parameter equals to id
.
Definition at line 165 of file TrackerPluginModel.cpp.
void Marble::TrackerPluginModel::enable | ( | bool | enabled | ) |
Definition at line 107 of file TrackerPluginModel.cpp.
void Marble::TrackerPluginModel::endUpdateItems | ( | ) |
End a series of add or remove items operations on the model.
Always call this method once you're finished adding and removing items to the model.
- See also
- beginUpdateItems(), addItem(), removeItem()
Definition at line 150 of file TrackerPluginModel.cpp.
|
signal |
QVector< TrackerPluginItem * > Marble::TrackerPluginModel::items | ( | ) | const |
Return all available items.
Definition at line 126 of file TrackerPluginModel.cpp.
|
signal |
|
signal |
void Marble::TrackerPluginModel::loadSettings | ( | const QHash< QString, QVariant > & | settings | ) |
Load settings.
Definition at line 160 of file TrackerPluginModel.cpp.
|
virtual |
This method is called whenever a file queued up for download by downloadFile() has finished downloading, reimplement it to use it.
- Parameters
-
id The id
parameter passed to downloadFile()file The content of the file
Reimplemented in Marble::SatellitesModel.
Definition at line 170 of file TrackerPluginModel.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.