• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

Plasma

IonInterface Class Reference

#include <ion.h>

Inheritance diagram for IonInterface:
Inheritance graph
[legend]

List of all members.

Public Types

enum  ConditionIcons {
  ClearDay = 1, FewCloudsDay, PartlyCloudyDay, Overcast,
  Rain, LightRain, Showers, ChanceShowersDay,
  Thunderstorm, Hail, Snow, LightSnow,
  Flurries, FewCloudsNight, ChanceShowersNight, PartlyCloudyNight,
  ClearNight, Mist, Haze, FreezingRain,
  RainSnow, FreezingDrizzle, ChanceThunderstormDay, ChanceThunderstormNight,
  ChanceSnowDay, ChanceSnowNight, NotAvailable
}
enum  WindDirections {
  N, NNE, NE, ENE,
  E, SSE, SE, ESE,
  S, NNW, NW, WNW,
  W, SSW, SW, WSW,
  VR
}

Public Slots

virtual void reset ()=0
bool updateSourceEvent (const QString &source)

Signals

void resetCompleted (IonInterface *, bool)

Public Member Functions

 IonInterface (QObject *parent=0, const QVariantList &args=QVariantList())
virtual ~IonInterface ()
QString getWeatherIcon (const QMap< QString, ConditionIcons > &conditionList, const QString &condition) const
QString getWeatherIcon (ConditionIcons condition) const
QString getWindDirectionIcon (const QMap< QString, WindDirections > &windDirList, const QString &windDirection) const

Protected Member Functions

void setInitialized (bool initialized)
bool sourceRequestEvent (const QString &source)
virtual bool updateIonSource (const QString &source)=0

Detailed Description

Author:
Shawn Starr This is the base class to be used to implement new ions for the WeatherEngine. The idea is that you can have multiple ions which provide weather information from different services to the engine from which an applet will request the data from.

Basically an ion is a Plasma::DataEngine, which is queried by the WeatherEngine instead of some applet.

Definition at line 36 of file ion.h.


Member Enumeration Documentation

enum IonInterface::ConditionIcons
Enumerator:
ClearDay 
FewCloudsDay 
PartlyCloudyDay 
Overcast 
Rain 
LightRain 
Showers 
ChanceShowersDay 
Thunderstorm 
Hail 
Snow 
LightSnow 
Flurries 
FewCloudsNight 
ChanceShowersNight 
PartlyCloudyNight 
ClearNight 
Mist 
Haze 
FreezingRain 
RainSnow 
FreezingDrizzle 
ChanceThunderstormDay 
ChanceThunderstormNight 
ChanceSnowDay 
ChanceSnowNight 
NotAvailable 

Definition at line 42 of file ion.h.

enum IonInterface::WindDirections
Enumerator:
N 
NNE 
NE 
ENE 
E 
SSE 
SE 
ESE 
S 
NNW 
NW 
WNW 
W 
SSW 
SW 
WSW 
VR 

Definition at line 50 of file ion.h.


Constructor & Destructor Documentation

IonInterface::IonInterface ( QObject *  parent = 0,
const QVariantList &  args = QVariantList() 
) [explicit]

Constructor for the ion.

Parameters:
parent The parent object. args The argument list.

Definition at line 34 of file ion.cpp.

IonInterface::~IonInterface (  )  [virtual]

Destructor for the ion.

Definition at line 40 of file ion.cpp.


Member Function Documentation

QString IonInterface::getWeatherIcon ( const QMap< QString, ConditionIcons > &  conditionList,
const QString &  condition 
) const

Returns weather icon filename to display in applet.

Return weather icon to display in an applet when given a condition.

Parameters:
conditionList a QList map pair of icons mapped to a enumeration of conditions.
condition the current condition being reported.
Returns:
icon name

Definition at line 201 of file ion.cpp.

QString IonInterface::getWeatherIcon ( ConditionIcons  condition  )  const

Returns weather icon filename to display in applet.

Return weather icon to display in an applet when given a condition.

Parameters:
condition the current condition being reported.
Returns:
icon name

Definition at line 137 of file ion.cpp.

QString IonInterface::getWindDirectionIcon ( const QMap< QString, WindDirections > &  windDirList,
const QString &  windDirection 
) const

Returns wind icon element to display in applet.

Return wind direction svg element to display in applet when given a wind direction.

Parameters:
windDirList a QList map pair of wind directions mapped to a enumeration of directions.
windDirection the current wind direction.
Returns:
svg element for wind direction

Definition at line 91 of file ion.cpp.

virtual void IonInterface::reset (  )  [pure virtual, slot]

Reimplement for ion to reload data if network status comes back up.

Implemented in UKMETIon, EnvCanadaIon, and NOAAIon.

void IonInterface::resetCompleted ( IonInterface *  ,
bool   
) [signal]

Triggered when we get initial setup data for ions that provide a list of places.

void IonInterface::setInitialized ( bool  initialized  )  [protected]

Call this method to flush waiting source requests that may be pending initialization.

Set the ion to make sure it is ready to get real data.

  • initialized whether or not the ion is currently ready to fetch data

Definition at line 77 of file ion.cpp.

bool IonInterface::sourceRequestEvent ( const QString &  source  )  [protected]

Reimplemented from Plasma::DataEngine.

If the ion is not initialized just set the initial data source up even if it's empty, we'll retry once the initialization is done.

Parameters:
source The datasource being requested

Definition at line 48 of file ion.cpp.

virtual bool IonInterface::updateIonSource ( const QString &  source  )  [protected, pure virtual]

Reimplement to fetch the data from the ion.

  • source the name of the datasource.
    Returns:
    true if update was successful, false if failed

Implemented in UKMETIon, EnvCanadaIon, and NOAAIon.

bool IonInterface::updateSourceEvent ( const QString &  source  )  [slot]

Reimplemented from Plasma::DataEngine.

Update the ion's datasource.

Parameters:
source the name of the datasource to be updated

Triggered when a Plasma::DataEngine::connectSource() timeout occurs.

Definition at line 63 of file ion.cpp.


The documentation for this class was generated from the following files:
  • ion.h
  • ion.cpp

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •     Animators
  •     Applets
  •     Engines
  • Solid Modules
  • System Settings
  •   SystemSettingsView
Generated for API Reference by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal