summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/todayplugins/weather/weatherpluginwidget.cpp69
1 files changed, 34 insertions, 35 deletions
diff --git a/noncore/todayplugins/weather/weatherpluginwidget.cpp b/noncore/todayplugins/weather/weatherpluginwidget.cpp
index 8e00c36..8c41189 100644
--- a/noncore/todayplugins/weather/weatherpluginwidget.cpp
+++ b/noncore/todayplugins/weather/weatherpluginwidget.cpp
@@ -1,24 +1,24 @@
1/* 1/*
2                This file is part of the OPIE Project 2 This file is part of the OPIE Project
3 =. 3 =.
4             .=l. Copyright (c) 2002 Dan Williams <williamsdr@acm.org> 4 .=l. Copyright (c) 2002 Dan Williams <williamsdr@acm.org>
5           .>+-= 5 .>+-=
6 _;:,     .>    :=|. This file is free software; you can 6_;:, .> :=|. This file is free software; you can
7.> <`_,   >  .   <= redistribute it and/or modify it under 7.> <`_, > . <= redistribute it and/or modify it under
8:`=1 )Y*s>-.--   : the terms of the GNU General Public 8:`=1 )Y*s>-.-- : the terms of the GNU General Public
9.="- .-=="i,     .._ License as published by the Free Software 9.="- .-=="i, .._ License as published by the Free Software
10 - .   .-<_>     .<> Foundation; either version 2 of the License, 10- . .-<_> .<> Foundation; either version 2 of the License,
11     ._= =}       : or (at your option) any later version. 11 ._= =} : or (at your option) any later version.
12    .%`+i>       _;_. 12 .%`+i> _;_.
13    .i_,=:_.      -<s. This file is distributed in the hope that 13 .i_,=:_. -<s. This file is distributed in the hope that
14     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY; 14 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
15    : ..    .:,     . . . without even the implied warranty of 15 : .. .:, . . . without even the implied warranty of
16    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 16 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
17  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU General 17 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU General
18..}^=.=       =       ; Public License for more details. 18..}^=.= = ; Public License for more details.
19++=   -.     .`     .: 19++= -. .` .:
20 :     =  ...= . :.=- You should have received a copy of the GNU 20: = ...= . :.=- You should have received a copy of the GNU
21 -.   .:....=;==+<; General Public License along with this file; 21-. .:....=;==+<; General Public License along with this file;
22  -_. . .   )=.  = see the file COPYING. If not, write to the 22 -_. . . )=. = see the file COPYING. If not, write to the
23    --        :-=` Free Software Foundation, Inc., 23 -- :-=` Free Software Foundation, Inc.,
24 59 Temple Place - Suite 330, 24 59 Temple Place - Suite 330,
@@ -28,2 +28,8 @@
28 28
29#include <opie2/oprocess.h>
30
31#include <qpe/applnk.h>
32#include <qpe/config.h>
33#include <qpe/resource.h>
34
29#include <qfile.h> 35#include <qfile.h>
@@ -35,7 +41,2 @@
35 41
36#include <opie2/oprocess.h>
37
38#include <qpe/config.h>
39#include <qpe/resource.h>
40
41#include "weatherpluginwidget.h" 42#include "weatherpluginwidget.h"
@@ -46,11 +47,8 @@ WeatherPluginWidget::WeatherPluginWidget( QWidget *parent, const char* name )
46{ 47{
47 QHBoxLayout *layout = new QHBoxLayout( this ); 48 QHBoxLayout *layout = new QHBoxLayout( this, 1, 2 );
48 layout->setAutoAdd( TRUE ); 49 layout->setAutoAdd( true );
49 layout->setSpacing( 2 );
50 50
51 weatherIcon = new QLabel( this ); 51 weatherIcon = new QLabel( this );
52 weatherIcon->setMaximumWidth( 32 );
53 QImage logo1 = Resource::loadImage( "Clock" );
54 QPixmap pic; 52 QPixmap pic;
55 pic.convertFromImage( logo1 ); 53 pic.convertFromImage( Resource::loadImage( "Clock" ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
56 weatherIcon->setPixmap( pic ); 54 weatherIcon->setPixmap( pic );
@@ -60,2 +58,4 @@ WeatherPluginWidget::WeatherPluginWidget( QWidget *parent, const char* name )
60 58
59 weatherIcon->setFixedSize( weatherLabel->height(), weatherLabel->height() );
60
61 startTimer(1000); 61 startTimer(1000);
@@ -86,3 +86,3 @@ void WeatherPluginWidget::retreiveData()
86 location = config.readEntry( "Location", "" ); 86 location = config.readEntry( "Location", "" );
87 useMetric = config.readBoolEntry( "Metric", TRUE ); 87 useMetric = config.readBoolEntry( "Metric", true );
88 frequency = config.readNumEntry( "Frequency", 5 ); 88 frequency = config.readNumEntry( "Frequency", 5 );
@@ -147,5 +147,4 @@ void WeatherPluginWidget::displayWeather()
147 tmpstr.append( dataStr ); 147 tmpstr.append( dataStr );
148 QImage logo1 = Resource::loadImage( tmpstr );
149 QPixmap pic; 148 QPixmap pic;
150 pic.convertFromImage( logo1 ); 149 pic.convertFromImage( Resource::loadImage( tmpstr ).smoothScale( AppLnk::smallIconSize(), AppLnk::smallIconSize() ) );
151 weatherIcon->setPixmap( pic ); 150 weatherIcon->setPixmap( pic );