Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

weatherpluginwidget.h

Go to the documentation of this file.
00001 /*
00002                              This file is part of the OPIE Project
00003                =.
00004              .=l.            Copyright (c)  2002 Dan Williams <williamsdr@acm.org>
00005            .>+-=
00006  _;:,     .>    :=|.         This file is free software; you can
00007 .> <`_,   >  .   <=          redistribute it and/or modify it under
00008 :`=1 )Y*s>-.--   :           the terms of the GNU General Public
00009 .="- .-=="i,     .._         License as published by the Free Software
00010  - .   .-<_>     .<>         Foundation; either version 2 of the License,
00011      ._= =}       :          or (at your option) any later version.
00012     .%`+i>       _;_.
00013     .i_,=:_.      -<s.       This file is distributed in the hope that
00014      +  .  -:.       =       it will be useful, but WITHOUT ANY WARRANTY;
00015     : ..    .:,     . . .    without even the implied warranty of
00016     =_        +     =;=|`    MERCHANTABILITY or FITNESS FOR A
00017   _.=:.       :    :=>`:     PARTICULAR PURPOSE. See the GNU General
00018 ..}^=.=       =       ;      Public License for more details.
00019 ++=   -.     .`     .:
00020  :     =  ...= . :.=-        You should have received a copy of the GNU
00021  -.   .:....=;==+<;          General Public License along with this file;
00022   -_. . .   )=.  =           see the file COPYING. If not, write to the
00023     --        :-=`           Free Software Foundation, Inc.,
00024                              59 Temple Place - Suite 330,
00025                              Boston, MA 02111-1307, USA.
00026 
00027 */
00028 
00029 #ifndef WEATHER_PLUGIN_WIDGET_H
00030 #define WEATHER_PLUGIN_WIDGET_H
00031 
00032 #include <qstring.h>
00033 #include <qwidget.h>
00034 
00035 namespace Opie {namespace Core {class OProcess;}}
00036 class QLabel;
00037 class QTimer;
00038 
00039 class WeatherPluginWidget : public QWidget {
00040 
00041     Q_OBJECT
00042 
00043         public:
00044                 WeatherPluginWidget( QWidget *parent,  const char *name );
00045                 ~WeatherPluginWidget();
00046 
00047         private:
00048                 QString location;
00049                 QString remoteFile;
00050                 QString localFile;
00051                 QString weatherData;
00052                 QString dataStr;
00053                 bool    useMetric;
00054                 int     frequency;
00055 
00056                 QLabel *weatherLabel;
00057                 QLabel *weatherIcon;
00058 
00059                 void timerEvent( QTimerEvent * );
00060                 void retreiveData();
00061                 void displayWeather();
00062                 void getTemp( const QString & );
00063                 void getWind( const QString & );
00064                 void getPressure( const QString & );
00065                 void getIcon( const QString & );
00066 
00067         private slots:
00068                 void dataRetrieved( Opie::Core::OProcess * );
00069 };
00070 
00071 #endif

Generated on Sat Nov 5 16:18:01 2005 for OPIE by  doxygen 1.4.2