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

Plasma

ion.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Copyright (C) 2007-2008 by Shawn Starr <shawn.starr@rogers.com>           *
00003  *                                                                           *
00004  * This library is free software; you can redistribute it and/or             *
00005  * modify it under the terms of the GNU Library General Public               *
00006  * License as published by the Free Software Foundation; either              *
00007  * version 2 of the License, or (at your option) any later version.          *
00008  *                                                                           *
00009  * This library is distributed in the hope that it will be useful,           *
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00012  * Library General Public License for more details.                          *
00013  *                                                                           *
00014  * You should have received a copy of the GNU Library General Public License *
00015  * along with this library; see the file COPYING.LIB.  If not, write to      *
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,      *
00017  * Boston, MA 02110-1301, USA.                                               *
00018  *****************************************************************************/
00019 
00020 #ifndef _ION_H
00021 #define _ION_H
00022 
00023 #include <QtCore/QObject>
00024 #include <KDE/KGenericFactory>
00025 #include <plasma/dataengine.h>
00026 
00027 #include "ion_export.h"
00028 
00036 class ION_EXPORT IonInterface : public Plasma::DataEngine
00037 {
00038     Q_OBJECT
00039 
00040 public:
00041 
00042     enum ConditionIcons { ClearDay = 1, FewCloudsDay, PartlyCloudyDay, Overcast,
00043                           Rain, LightRain, Showers, ChanceShowersDay, Thunderstorm, Hail,
00044                           Snow, LightSnow, Flurries, FewCloudsNight, ChanceShowersNight,
00045                           PartlyCloudyNight, ClearNight, Mist, Haze, FreezingRain, 
00046                           RainSnow, FreezingDrizzle, ChanceThunderstormDay, ChanceThunderstormNight,
00047                           ChanceSnowDay, ChanceSnowNight, NotAvailable
00048                         };
00049 
00050     enum WindDirections { N, NNE, NE, ENE, E, SSE, SE, ESE, S, NNW, NW, WNW, W, SSW, SW, WSW, VR };
00051 
00052     typedef QHash<QString, IonInterface*> IonDict; // Define Dict as a QHash for Ions
00053 
00059     explicit IonInterface(QObject *parent = 0, const QVariantList &args = QVariantList());
00063     virtual ~IonInterface() {}
00064 
00068     void ref();
00069 
00073     void deref();
00074 
00079     bool isUsed() const;
00080 
00087     QString getWeatherIcon(const QMap<QString, ConditionIcons> &conditionList, const QString& condition);
00088 
00095     QString getWindDirectionIcon(const QMap<QString, WindDirections> &windDirList, const QString& windDirection);
00096 
00097 public Q_SLOTS:
00098 
00103     bool updateSourceEvent(const QString& source);
00104 
00105 protected:
00112     void setInitialized(bool initialized);
00113 
00118     bool sourceRequestEvent(const QString &source);
00119 
00125     virtual bool updateIonSource(const QString &source) = 0;
00126 
00127     friend class WeatherEngine;
00128 
00129 private:
00130     class Private;
00131     Private* const d;
00132 };
00133 
00134 #endif
00135 

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
Generated for API Reference by doxygen 1.5.7
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