• 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
  • weather
WeatherModel.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 WEATHERMODEL_H
12 #define WEATHERMODEL_H
13 
14 #include "AbstractDataPluginModel.h"
15 
16 #include "WeatherData.h"
17 #include "GeoDataLatLonAltBox.h"
18 #include "MarbleWidget.h"
19 
20 #include <QStringList>
21 
22 class QByteArray;
23 class QTimer;
24 
25 namespace Marble
26 {
27 
28 class AbstractWeatherService;
29 class GeoDataLatLonAltBox;
30 class MarbleModel;
31 
32 class WeatherModel : public AbstractDataPluginModel
33 {
34  Q_OBJECT
35 
36  public:
37  explicit WeatherModel( const MarbleModel *marbleModel, QObject *parent );
38  ~WeatherModel();
39 
40  void setUpdateInterval( quint32 hours );
41 
42  void setFavoriteItems( const QStringList& list );
43 
44  public Q_SLOTS:
51  void downloadItemData( const QUrl& url, const QString& type, AbstractDataPluginItem *item );
52 
53  void downloadDescriptionFileRequested( const QUrl& url );
54 
55  void setMarbleWidget(MarbleWidget *widget);
56 
57  Q_SIGNALS:
58  void additionalItemsRequested( const GeoDataLatLonAltBox &,
59  qint32 number );
60  void favoriteItemChanged( const QString& id, bool isFavorite );
61  void parseFileRequested( const QByteArray& file );
62 
63  protected:
64  void getAdditionalItems( const GeoDataLatLonAltBox& box,
65  qint32 number = 10 );
66  virtual void getItem( const QString &id );
67  void parseFile( const QByteArray& file );
68 
69  private:
70  void addService( AbstractWeatherService *service );
71 
72  QList<AbstractWeatherService*> m_services;
73  QTimer *m_timer;
74 };
75 
76 } // namespace Marble
77 
78 #endif // WEATHERMODEL_H
Marble::WeatherModel::downloadItemData
void downloadItemData(const QUrl &url, const QString &type, AbstractDataPluginItem *item)
Downloads the file from url.
Definition: WeatherModel.cpp:68
AbstractDataPluginModel.h
Marble::WeatherModel::favoriteItemChanged
void favoriteItemChanged(const QString &id, bool isFavorite)
Marble::WeatherModel
Definition: WeatherModel.h:32
QByteArray
Marble::AbstractDataPluginItem
Definition: AbstractDataPluginItem.h:28
Marble::WeatherModel::setMarbleWidget
void setMarbleWidget(MarbleWidget *widget)
Definition: WeatherModel.cpp:116
Marble::AbstractWeatherService
Definition: AbstractWeatherService.h:27
Marble::AbstractDataPluginModel
An abstract data model (not based on QAbstractModel) for a AbstractDataPlugin.
Definition: AbstractDataPluginModel.h:45
Marble::AbstractDataPluginModel::marbleModel
const MarbleModel * marbleModel() const
Definition: AbstractDataPluginModel.cpp:269
Marble::MarbleWidget
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:104
Marble::WeatherModel::WeatherModel
WeatherModel(const MarbleModel *marbleModel, QObject *parent)
Definition: WeatherModel.cpp:29
Marble::WeatherModel::getItem
virtual void getItem(const QString &id)
Retrieve data for a specific item.
Definition: WeatherModel.cpp:99
Marble::WeatherModel::~WeatherModel
~WeatherModel()
Definition: WeatherModel.cpp:47
QTimer
QObject
Marble::WeatherModel::parseFile
void parseFile(const QByteArray &file)
Parse the file and generate items.
Definition: WeatherModel.cpp:106
QString
QList
Marble::WeatherModel::getAdditionalItems
void getAdditionalItems(const GeoDataLatLonAltBox &box, qint32 number=10)
Managing to get number additional items in box.
Definition: WeatherModel.cpp:93
QStringList
Marble::WeatherModel::setUpdateInterval
void setUpdateInterval(quint32 hours)
Definition: WeatherModel.cpp:62
QUrl
Marble::WeatherModel::downloadDescriptionFileRequested
void downloadDescriptionFileRequested(const QUrl &url)
Definition: WeatherModel.cpp:111
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
Marble::WeatherModel::setFavoriteItems
void setFavoriteItems(const QStringList &list)
Definition: WeatherModel.cpp:51
GeoDataLatLonAltBox.h
MarbleWidget.h
This file contains the headers for MarbleWidget.
QObject::parent
QObject * parent() const
Marble::WeatherModel::parseFileRequested
void parseFileRequested(const QByteArray &file)
WeatherData.h
Marble::GeoDataLatLonAltBox
A class that defines a 3D bounding box for geographic data.
Definition: GeoDataLatLonAltBox.h:49
Marble::WeatherModel::additionalItemsRequested
void additionalItemsRequested(const GeoDataLatLonAltBox &, qint32 number)
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