• 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
FakeWeatherService.cpp
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 // Self
12 #include "FakeWeatherService.h"
13 
14 // Marble
15 #include "FakeWeatherItem.h"
16 #include "GeoDataCoordinates.h"
17 #include "GeoDataLatLonAltBox.h"
18 #include "WeatherData.h"
19 #include "WeatherModel.h"
20 
21 using namespace Marble;
22 
23 FakeWeatherService::FakeWeatherService( const MarbleModel *model, QObject *parent )
24  : AbstractWeatherService( model, parent )
25 {
26 }
27 
28 FakeWeatherService::~FakeWeatherService()
29 {
30 }
31 
32 void FakeWeatherService::getAdditionalItems( const GeoDataLatLonAltBox& box,
33  qint32 number )
34 {
35  Q_UNUSED( box );
36  Q_UNUSED( number );
37 
38  FakeWeatherItem *item = new FakeWeatherItem( this );
39  item->setStationName( "Fake" );
40  item->setPriority( 0 );
41  item->setCoordinate( GeoDataCoordinates( 1, 1 ) );
42  item->setTarget( "earth" );
43  item->setId( "fake1" );
44 
45  WeatherData data;
46  data.setCondition( WeatherData::ClearDay );
47  data.setTemperature( 14.0, WeatherData::Celsius );
48  item->setCurrentWeather( data );
49 
50  emit createdItems( QList<AbstractDataPluginItem*>() << item );
51 }
52 
53 void FakeWeatherService::getItem( const QString & )
54 {
55  getAdditionalItems( GeoDataLatLonAltBox(), 1 );
56 }
57 
58 #include "FakeWeatherService.moc"
GeoDataCoordinates.h
Marble::AbstractDataPluginItem::setTarget
void setTarget(const QString &target)
Definition: AbstractDataPluginItem.cpp:66
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::WeatherData::setCondition
void setCondition(WeatherData::WeatherCondition condition)
Definition: WeatherData.cpp:348
Marble::FakeWeatherService::getItem
virtual void getItem(const QString &id)
Definition: FakeWeatherService.cpp:53
Marble::AbstractDataPluginItem::setId
void setId(const QString &id)
Definition: AbstractDataPluginItem.cpp:86
WeatherModel.h
Marble::AbstractWeatherService
Definition: AbstractWeatherService.h:27
FakeWeatherService.h
Marble::FakeWeatherService::getAdditionalItems
void getAdditionalItems(const GeoDataLatLonAltBox &box, qint32 number=10)
Definition: FakeWeatherService.cpp:32
Marble::FakeWeatherItem
Definition: FakeWeatherItem.h:21
Marble::WeatherData
Definition: WeatherData.h:26
Marble::WeatherItem::setStationName
void setStationName(const QString &name)
Definition: WeatherItem.cpp:384
QObject
Marble::FakeWeatherService::~FakeWeatherService
~FakeWeatherService()
Definition: FakeWeatherService.cpp:28
Marble::WeatherData::ClearDay
Definition: WeatherData.h:33
Marble::WeatherItem::setPriority
void setPriority(quint8 priority)
Definition: WeatherItem.cpp:460
Marble::AbstractWeatherService::createdItems
void createdItems(QList< AbstractDataPluginItem * > items)
Marble::WeatherData::Celsius
Definition: WeatherData.h:110
QString
QList< AbstractDataPluginItem * >
FakeWeatherItem.h
Marble::WeatherData::setTemperature
void setTemperature(qreal temp, WeatherData::TemperatureUnit format=WeatherData::Kelvin)
Definition: WeatherData.cpp:621
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
Marble::FakeWeatherService::FakeWeatherService
FakeWeatherService(const MarbleModel *model, QObject *parent)
Definition: FakeWeatherService.cpp:23
GeoDataLatLonAltBox.h
Marble::BillboardGraphicsItem::setCoordinate
void setCoordinate(const GeoDataCoordinates &coordinates)
Definition: BillboardGraphicsItem.cpp:98
WeatherData.h
Marble::GeoDataLatLonAltBox
A class that defines a 3D bounding box for geographic data.
Definition: GeoDataLatLonAltBox.h:49
Marble::WeatherItem::setCurrentWeather
void setCurrentWeather(const WeatherData &weather)
Definition: WeatherItem.cpp:400
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:39 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