summaryrefslogtreecommitdiff
path: root/core/settings
authordrw <drw>2005-05-04 22:11:13 (UTC)
committer drw <drw>2005-05-04 22:11:13 (UTC)
commit4d719fdcf636f855cb2def7c715a13420ce8a1b6 (patch) (unidiff)
treeafc8110e06cb32fa8218d281b84fb69b1d68ece2 /core/settings
parent6378f86d96d8d0003cdb9242871066b2db640cec (diff)
downloadopie-4d719fdcf636f855cb2def7c715a13420ce8a1b6.zip
opie-4d719fdcf636f855cb2def7c715a13420ce8a1b6.tar.gz
opie-4d719fdcf636f855cb2def7c715a13420ce8a1b6.tar.bz2
Resource -> OResource and add missing lib dependencies
Diffstat (limited to 'core/settings') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/citytime/opie-citytime.control2
-rw-r--r--core/settings/citytime/zonemap.cpp10
2 files changed, 7 insertions, 5 deletions
diff --git a/core/settings/citytime/opie-citytime.control b/core/settings/citytime/opie-citytime.control
index 03fa555..71ee7d0 100644
--- a/core/settings/citytime/opie-citytime.control
+++ b/core/settings/citytime/opie-citytime.control
@@ -1,10 +1,10 @@
1Package: opie-citytime 1Package: opie-citytime
2Files: plugins/application/libcitytime.so* bin/citytime apps/Settings/citytime.desktop pics/citytime 2Files: plugins/application/libcitytime.so* bin/citytime apps/Settings/citytime.desktop pics/citytime
3Priority: optional 3Priority: optional
4Section: opie/settings 4Section: opie/settings
5Maintainer: Maximilian Reiss <harlekin@handhelds.org> 5Maintainer: Maximilian Reiss <harlekin@handhelds.org>
6Architecture: arm 6Architecture: arm
7Depends: task-opie-minimal 7Depends: task-opie-minimal, libopiecore2
8Description: Time-zone / world clock settings 8Description: Time-zone / world clock settings
9 The time-zone manager for the Opie environment. 9 The time-zone manager for the Opie environment.
10Version: $QPE_VERSION$EXTRAVERSION 10Version: $QPE_VERSION$EXTRAVERSION
diff --git a/core/settings/citytime/zonemap.cpp b/core/settings/citytime/zonemap.cpp
index e4a25ef..7edc45f 100644
--- a/core/settings/citytime/zonemap.cpp
+++ b/core/settings/citytime/zonemap.cpp
@@ -15,27 +15,28 @@
15** 15**
16** Contact info@trolltech.com if any conditions of this licensing are 16** Contact info@trolltech.com if any conditions of this licensing are
17** not clear to you. 17** not clear to you.
18** 18**
19**********************************************************************/ 19**********************************************************************/
20 20
21// changes by Maximilian Reiss <harlekin@handhelds.org> 21// changes by Maximilian Reiss <harlekin@handhelds.org>
22 22
23#include "sun.h" 23#include "sun.h"
24#include "zonemap.h" 24#include "zonemap.h"
25 25
26/* OPIE */ 26/* OPIE */
27#include <qpe/resource.h>
28#include <qpe/qpeapplication.h>
29#include <opie2/odebug.h> 27#include <opie2/odebug.h>
28#include <opie2/oresource.h>
29
30#include <qpe/qpeapplication.h>
30 31
31/* QT */ 32/* QT */
32#include <qfile.h> 33#include <qfile.h>
33#include <qlabel.h> 34#include <qlabel.h>
34#include <qmessagebox.h> 35#include <qmessagebox.h>
35#include <qtextstream.h> 36#include <qtextstream.h>
36#include <qtimer.h> 37#include <qtimer.h>
37#include <qtoolbutton.h> 38#include <qtoolbutton.h>
38#include <qlayout.h> 39#include <qlayout.h>
39#include <qhbox.h> 40#include <qhbox.h>
40#include <qlistview.h> 41#include <qlistview.h>
41#include <qwhatsthis.h> 42#include <qwhatsthis.h>
@@ -151,27 +152,28 @@ ZoneMap::ZoneMap( QWidget *parent, const char* name )
151 bZoom( FALSE ), 152 bZoom( FALSE ),
152 bIllum( TRUE ), 153 bIllum( TRUE ),
153 cursor( 0 ) 154 cursor( 0 )
154{ 155{
155 viewport()->setFocusPolicy( StrongFocus ); 156 viewport()->setFocusPolicy( StrongFocus );
156 157
157 // set mouse tracking so we can use the mouse move event 158 // set mouse tracking so we can use the mouse move event
158 zones.setAutoDelete( true ); 159 zones.setAutoDelete( true );
159 // get the map loaded 160 // get the map loaded
160 // just set the current image to point 161 // just set the current image to point
161 pixCurr = new QPixmap(); 162 pixCurr = new QPixmap();
162 163
163 QPixmap pixZoom = Resource::loadPixmap( "mag" ); 164 QPixmap pixZoom = Opie::Core::OResource::loadPixmap( "mag", Opie::Core::OResource::SmallIcon );
164 165
165 cmdZoom = new QToolButton( this, "Zoom command" ); 166 cmdZoom = new QToolButton( this, "Zoom command" );
167 cmdZoom->setUsesBigPixmap( qApp->desktop()->size().width() > 330 );
166 cmdZoom->setPixmap( pixZoom ); 168 cmdZoom->setPixmap( pixZoom );
167 cmdZoom->setToggleButton( true ); 169 cmdZoom->setToggleButton( true );
168 170
169 cmdZoom->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, 171 cmdZoom->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0,
170 (QSizePolicy::SizeType)0, 172 (QSizePolicy::SizeType)0,
171 cmdZoom->sizePolicy().hasHeightForWidth() ) ); 173 cmdZoom->sizePolicy().hasHeightForWidth() ) );
172 cmdZoom->setMaximumSize( cmdZoom->sizeHint() ); 174 cmdZoom->setMaximumSize( cmdZoom->sizeHint() );
173 // probably don't need this, but just in case... 175 // probably don't need this, but just in case...
174 cmdZoom->move( width() - cmdZoom->width(), height() - cmdZoom->height() ); 176 cmdZoom->move( width() - cmdZoom->width(), height() - cmdZoom->height() );
175 177
176 178
177 lblCity = new QLabel( tr( "CITY" ), this, "City Label" ); 179 lblCity = new QLabel( tr( "CITY" ), this, "City Label" );
@@ -593,25 +595,25 @@ static inline void darken( QImage *pImage, int start, int stop, int row )
593 // assume that the image is similar to the one we have... 595 // assume that the image is similar to the one we have...
594 colors = pImage->numColors() / 2; 596 colors = pImage->numColors() / 2;
595 597
596 p = pImage->scanLine( row ); 598 p = pImage->scanLine( row );
597 for ( j = start; j <= stop; j++ ) { 599 for ( j = start; j <= stop; j++ ) {
598 if ( p[j] < colors ) 600 if ( p[j] < colors )
599 p[j] += colors; 601 p[j] += colors;
600 } 602 }
601} 603}
602 604
603void ZoneMap::makeMap( int w, int h ) 605void ZoneMap::makeMap( int w, int h )
604{ 606{
605 QImage imgOrig = Resource::loadImage( strMAP ); 607 QImage imgOrig = Opie::Core::OResource::loadImage( strMAP );
606 if ( imgOrig.isNull() ) { 608 if ( imgOrig.isNull() ) {
607 QMessageBox::warning( this, 609 QMessageBox::warning( this,
608 tr( "Couldn't Find Map" ), 610 tr( "Couldn't Find Map" ),
609 tr( "<p>Couldn't load map: %1, exiting") 611 tr( "<p>Couldn't load map: %1, exiting")
610 .arg( strMAP ) ); 612 .arg( strMAP ) );
611 exit(-1); 613 exit(-1);
612 } 614 }
613 615
614 // set up the color table for darkening... 616 // set up the color table for darkening...
615 imgOrig = imgOrig.convertDepth( 8 ); 617 imgOrig = imgOrig.convertDepth( 8 );
616 int numColors = imgOrig.numColors(); 618 int numColors = imgOrig.numColors();
617 // double the colors 619 // double the colors