Diffstat (limited to 'noncore/todayplugins/weather') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/todayplugins/weather/config.in | 2 | ||||
-rw-r--r-- | noncore/todayplugins/weather/opie-today-weatherplugin.control | 2 | ||||
-rw-r--r-- | noncore/todayplugins/weather/weather.pro | 2 | ||||
-rw-r--r-- | noncore/todayplugins/weather/weatherconfig.cpp | 13 | ||||
-rw-r--r-- | noncore/todayplugins/weather/weatherconfig.h | 2 | ||||
-rw-r--r-- | noncore/todayplugins/weather/weatherplugin.h | 6 | ||||
-rw-r--r-- | noncore/todayplugins/weather/weatherpluginimpl.h | 2 | ||||
-rw-r--r-- | noncore/todayplugins/weather/weatherpluginwidget.cpp | 6 |
8 files changed, 17 insertions, 18 deletions
diff --git a/noncore/todayplugins/weather/config.in b/noncore/todayplugins/weather/config.in index 7202983..ae35a59 100644 --- a/noncore/todayplugins/weather/config.in +++ b/noncore/todayplugins/weather/config.in @@ -1,4 +1,4 @@ config TODAY_WEATHER boolean "opie-today-weatherplugin (current weather report)" default "y" - depends (LIBQPE || LIBQPE-X11) && LIBOPIE + depends (LIBQPE || LIBQPE-X11) && LIBOPIE2CORE && LIBOPIE2PIM diff --git a/noncore/todayplugins/weather/opie-today-weatherplugin.control b/noncore/todayplugins/weather/opie-today-weatherplugin.control index 80b7d2b..7dbd315 100644 --- a/noncore/todayplugins/weather/opie-today-weatherplugin.control +++ b/noncore/todayplugins/weather/opie-today-weatherplugin.control @@ -1,10 +1,10 @@ Package: opie-today-weatherplugin Files: plugins/today/libtodayweatherplugin.so* pics/todayweatherplugin Priority: optional Section: opie/applications Maintainer: Dan Williams <drw@handhelds.org> Architecture: arm -Depends: libqte2, opie-today +Depends: libqte2, libopiecore2, libopiepim2, opie-today Description: Weather plugin for Today Displays current weather conditions. Version: $QPE_VERSION$EXTRAVERSION diff --git a/noncore/todayplugins/weather/weather.pro b/noncore/todayplugins/weather/weather.pro index 5ad14e1..d1f8edd 100644 --- a/noncore/todayplugins/weather/weather.pro +++ b/noncore/todayplugins/weather/weather.pro @@ -8,18 +8,18 @@ HEADERS = weatherplugin.h \ weatherconfig.h SOURCES = weatherplugin.cpp \ weatherpluginimpl.cpp \ weatherpluginwidget.cpp \ weatherconfig.cpp INCLUDEPATH += $(OPIEDIR)/include \ ../ ../library DEPENDPATH += $(OPIEDIR)/include \ ../ ../library -LIBS+= -lqpe -lopie +LIBS+= -lqpe -lopiecore2 -lopiepim2 DESTDIR = $(OPIEDIR)/plugins/today TARGET = todayweatherplugin include ( $(OPIEDIR)/include.pro ) diff --git a/noncore/todayplugins/weather/weatherconfig.cpp b/noncore/todayplugins/weather/weatherconfig.cpp index 99ee2a0..4663549 100644 --- a/noncore/todayplugins/weather/weatherconfig.cpp +++ b/noncore/todayplugins/weather/weatherconfig.cpp @@ -17,43 +17,42 @@ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General ..}^=.= = ; Public License for more details. ++= -. .` .: : = ...= . :.=- You should have received a copy of the GNU -. .:....=;==+<; General Public License along with this file; -_. . . )=. = see the file COPYING. If not, write to the -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include <stdlib.h> +#include "weatherconfig.h" + +#include <qpe/config.h> +#include <qpe/qpeapplication.h> +#include <qpe/resource.h> #include <qcheckbox.h> #include <qclipboard.h> #include <qfontmetrics.h> #include <qlabel.h> #include <qlayout.h> #include <qlineedit.h> #include <qlayout.h> #include <qpushbutton.h> #include <qspinbox.h> #include <qwhatsthis.h> -#include <qpe/config.h> -#include <qpe/qpeapplication.h> -#include <qpe/resource.h> -#include <opie/todayconfigwidget.h> - -#include "weatherconfig.h" +#include <stdlib.h> WeatherPluginConfig::WeatherPluginConfig( QWidget *parent, const char* name) : TodayConfigWidget(parent, name ) { Config config( "todayweatherplugin"); config.setGroup( "Config" ); QFontMetrics fm = fontMetrics(); int fh = fm.height(); QGridLayout *layout = new QGridLayout( this ); layout->setSpacing( 4 ); diff --git a/noncore/todayplugins/weather/weatherconfig.h b/noncore/todayplugins/weather/weatherconfig.h index d9ffec2..1780c7f 100644 --- a/noncore/todayplugins/weather/weatherconfig.h +++ b/noncore/todayplugins/weather/weatherconfig.h @@ -23,25 +23,25 @@ -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef WEATHER_PLUGIN_CONFIG_H #define WEATHER_PLUGIN_CONFIG_H #include <qstring.h> #include <qwidget.h> -#include <opie/todayconfigwidget.h> +#include <opie2/todayconfigwidget.h> class QCheckBox; class QLineEdit; class QPushButton; class QSpinBox; class WeatherPluginConfig : public TodayConfigWidget { Q_OBJECT public: WeatherPluginConfig( QWidget *parent, const char *name ); ~WeatherPluginConfig(); diff --git a/noncore/todayplugins/weather/weatherplugin.h b/noncore/todayplugins/weather/weatherplugin.h index 480d220..73e7104 100644 --- a/noncore/todayplugins/weather/weatherplugin.h +++ b/noncore/todayplugins/weather/weatherplugin.h @@ -20,30 +20,30 @@ : = ...= . :.=- You should have received a copy of the GNU -. .:....=;==+<; General Public License along with this file; -_. . . )=. = see the file COPYING. If not, write to the -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef WEATHER_PLUGIN_H #define WEATHER_PLUGIN_H +#include <opie2/todayplugininterface.h> +#include <opie2/todayconfigwidget.h> + #include <qstring.h> #include <qwidget.h> -#include <opie/todayplugininterface.h> -#include <opie/todayconfigwidget.h> - class WeatherPlugin : public TodayPluginObject { public: WeatherPlugin(); ~WeatherPlugin(); QString pluginName() const; double versionNumber() const; QString pixmapNameWidget() const; QWidget *widget(QWidget *); QString pixmapNameConfig() const; QString appName() const; diff --git a/noncore/todayplugins/weather/weatherpluginimpl.h b/noncore/todayplugins/weather/weatherpluginimpl.h index eaaae1d..d1a7400 100644 --- a/noncore/todayplugins/weather/weatherpluginimpl.h +++ b/noncore/todayplugins/weather/weatherpluginimpl.h @@ -20,25 +20,25 @@ : = ...= . :.=- You should have received a copy of the GNU -. .:....=;==+<; General Public License along with this file; -_. . . )=. = see the file COPYING. If not, write to the -- :-=` Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef WEATHER_PLUGIN_IMPL_H #define WEATHER_PLUGIN_IMPL_H -#include <opie/todayplugininterface.h> +#include <opie2/todayplugininterface.h> class WeatherPlugin; class WeatherPluginImpl : public TodayPluginInterface { public: WeatherPluginImpl(); virtual ~WeatherPluginImpl(); QRESULT queryInterface( const QUuid &, QUnknownInterface ** ); Q_REFCOUNT diff --git a/noncore/todayplugins/weather/weatherpluginwidget.cpp b/noncore/todayplugins/weather/weatherpluginwidget.cpp index 15d1c6e..ad99a43 100644 --- a/noncore/todayplugins/weather/weatherpluginwidget.cpp +++ b/noncore/todayplugins/weather/weatherpluginwidget.cpp @@ -24,25 +24,25 @@ 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qfile.h> #include <qimage.h> #include <qlabel.h> #include <qlayout.h> #include <qpixmap.h> #include <qtextstream.h> -#include <opie/oprocess.h> +#include <opie2/oprocess.h> #include <qpe/config.h> #include <qpe/resource.h> #include "weatherpluginwidget.h" WeatherPluginWidget::WeatherPluginWidget( QWidget *parent, const char* name ) : QWidget( parent, name ) { QHBoxLayout *layout = new QHBoxLayout( this ); layout->setAutoAdd( TRUE ); layout->setSpacing( 2 ); @@ -76,25 +76,25 @@ void WeatherPluginWidget::timerEvent( QTimerEvent *e ) } void WeatherPluginWidget::retreiveData() { Config config( "todayweatherplugin"); config.setGroup( "Config" ); location = config.readEntry( "Location", "" ); useMetric = config.readBoolEntry( "Metric", TRUE ); frequency = config.readNumEntry( "Frequency", 5 ); - + startTimer( frequency * 60000 ); localFile = "/tmp/"; localFile.append( location ); localFile.append( ".TXT" ); remoteFile = "http://weather.noaa.gov/pub/data/observations/metar/stations/"; remoteFile.append( location ); remoteFile.append( ".TXT" ); QFile file( localFile ); if ( file.exists() ) @@ -105,25 +105,25 @@ void WeatherPluginWidget::retreiveData() OProcess *proc = new OProcess; *proc << "wget" << "-q" << remoteFile << "-O" << localFile; connect( proc, SIGNAL( processExited(OProcess*) ), this, SLOT( dataRetrieved(OProcess*) ) ); proc->start(); } void WeatherPluginWidget::displayWeather() { weatherData = QString::null; QFile file( localFile ); - + if ( file.size() > 0 && file.open( IO_ReadOnly ) ) { QTextStream data( &file ); while ( !data.eof() ) { weatherData.append( data.readLine() ); } file.close(); weatherData = weatherData.simplifyWhiteSpace(); QString tmpstr; |