Diffstat (limited to 'noncore/todayplugins/weather/weatherpluginwidget.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/todayplugins/weather/weatherpluginwidget.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/noncore/todayplugins/weather/weatherpluginwidget.cpp b/noncore/todayplugins/weather/weatherpluginwidget.cpp index 8c41189..fe54051 100644 --- a/noncore/todayplugins/weather/weatherpluginwidget.cpp +++ b/noncore/todayplugins/weather/weatherpluginwidget.cpp | |||
@@ -25,18 +25,17 @@ _;:, .> :=|. This file is free software; you can | |||
25 | Boston, MA 02111-1307, USA. | 25 | Boston, MA 02111-1307, USA. |
26 | 26 | ||
27 | */ | 27 | */ |
28 | 28 | ||
29 | #include <opie2/oprocess.h> | 29 | #include <opie2/oprocess.h> |
30 | 30 | ||
31 | #include <qpe/applnk.h> | 31 | #include <opie2/oresource.h> |
32 | |||
32 | #include <qpe/config.h> | 33 | #include <qpe/config.h> |
33 | #include <qpe/resource.h> | ||
34 | 34 | ||
35 | #include <qfile.h> | 35 | #include <qfile.h> |
36 | #include <qimage.h> | ||
37 | #include <qlabel.h> | 36 | #include <qlabel.h> |
38 | #include <qlayout.h> | 37 | #include <qlayout.h> |
39 | #include <qpixmap.h> | 38 | #include <qpixmap.h> |
40 | #include <qtextstream.h> | 39 | #include <qtextstream.h> |
41 | 40 | ||
42 | #include "weatherpluginwidget.h" | 41 | #include "weatherpluginwidget.h" |
@@ -46,15 +45,13 @@ WeatherPluginWidget::WeatherPluginWidget( QWidget *parent, const char* name ) | |||
46 | : QWidget( parent, name ) | 45 | : QWidget( parent, name ) |
47 | { | 46 | { |
48 | QHBoxLayout *layout = new QHBoxLayout( this, 1, 2 ); | 47 | QHBoxLayout *layout = new QHBoxLayout( this, 1, 2 ); |
49 | layout->setAutoAdd( true ); | 48 | layout->setAutoAdd( true ); |
50 | 49 | ||
51 | weatherIcon = new QLabel( this ); | 50 | weatherIcon = new QLabel( this ); |
52 | QPixmap pic; | 51 | weatherIcon->setPixmap( Opie::Core::OResource::loadPixmap( "Clock", Opie::Core::OResource::SmallIcon ) ); |
53 | pic.convertFromImage( Resource::loadImage( "Clock" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | ||
54 | weatherIcon->setPixmap( pic ); | ||
55 | 52 | ||
56 | weatherLabel = new QLabel( tr( "Retreiving current weather information." ), this ); | 53 | weatherLabel = new QLabel( tr( "Retreiving current weather information." ), this ); |
57 | weatherLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ) ); | 54 | weatherLabel->setSizePolicy( QSizePolicy( QSizePolicy::Expanding, QSizePolicy::Preferred ) ); |
58 | 55 | ||
59 | weatherIcon->setFixedSize( weatherLabel->height(), weatherLabel->height() ); | 56 | weatherIcon->setFixedSize( weatherLabel->height(), weatherLabel->height() ); |
60 | 57 | ||
@@ -142,15 +139,13 @@ void WeatherPluginWidget::displayWeather() | |||
142 | 139 | ||
143 | weatherLabel->setText( tmpstr ); | 140 | weatherLabel->setText( tmpstr ); |
144 | 141 | ||
145 | tmpstr = "todayweatherplugin/"; | 142 | tmpstr = "todayweatherplugin/"; |
146 | getIcon( weatherData ); | 143 | getIcon( weatherData ); |
147 | tmpstr.append( dataStr ); | 144 | tmpstr.append( dataStr ); |
148 | QPixmap pic; | 145 | weatherIcon->setPixmap( Opie::Core::OResource::loadPixmap( tmpstr, Opie::Core::OResource::SmallIcon ) ); |
149 | pic.convertFromImage( Resource::loadImage( tmpstr ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) ); | ||
150 | weatherIcon->setPixmap( pic ); | ||
151 | } | 146 | } |
152 | else | 147 | else |
153 | { | 148 | { |
154 | weatherLabel->setText( tr( "Current weather data not available." ) ); | 149 | weatherLabel->setText( tr( "Current weather data not available." ) ); |
155 | } | 150 | } |
156 | } | 151 | } |