Diffstat (limited to 'core/settings/citytime/zonemap.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | core/settings/citytime/zonemap.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/settings/citytime/zonemap.cpp b/core/settings/citytime/zonemap.cpp index b6843d2..e4a25ef 100644 --- a/core/settings/citytime/zonemap.cpp +++ b/core/settings/citytime/zonemap.cpp | |||
@@ -14,38 +14,42 @@ | |||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | 14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. |
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 | #include <qpe/resource.h> | 27 | #include <qpe/resource.h> |
27 | #include <qpe/qpeapplication.h> | 28 | #include <qpe/qpeapplication.h> |
29 | #include <opie2/odebug.h> | ||
28 | 30 | ||
31 | /* QT */ | ||
29 | #include <qfile.h> | 32 | #include <qfile.h> |
30 | #include <qlabel.h> | 33 | #include <qlabel.h> |
31 | #include <qmessagebox.h> | 34 | #include <qmessagebox.h> |
32 | #include <qtextstream.h> | 35 | #include <qtextstream.h> |
33 | #include <qtimer.h> | 36 | #include <qtimer.h> |
34 | #include <qtoolbutton.h> | 37 | #include <qtoolbutton.h> |
35 | #include <qlayout.h> | 38 | #include <qlayout.h> |
36 | #include <qhbox.h> | 39 | #include <qhbox.h> |
37 | #include <qlistview.h> | 40 | #include <qlistview.h> |
38 | #include <qwhatsthis.h> | 41 | #include <qwhatsthis.h> |
39 | 42 | ||
43 | /* STD */ | ||
40 | #include <limits.h> | 44 | #include <limits.h> |
41 | 45 | ||
42 | // the map file... | 46 | // the map file... |
43 | static const char strZONEINFO[] = "/usr/share/zoneinfo/zone.tab"; | 47 | static const char strZONEINFO[] = "/usr/share/zoneinfo/zone.tab"; |
44 | static const char strMAP[] = "citytime/simple_grid_400"; | 48 | static const char strMAP[] = "citytime/simple_grid_400"; |
45 | 49 | ||
46 | // the maximum distance we'll allow the pointer to be away from a city | 50 | // the maximum distance we'll allow the pointer to be away from a city |
47 | // and still show the city's time | 51 | // and still show the city's time |
48 | static const int iTHRESHOLD = 50000; | 52 | static const int iTHRESHOLD = 50000; |
49 | 53 | ||
50 | // The label offset (how far away from pointer) | 54 | // The label offset (how far away from pointer) |
51 | static const int iLABELOFFSET = 8; | 55 | static const int iLABELOFFSET = 8; |
@@ -121,28 +125,28 @@ ZoneField::ZoneField( const QString& strLine ) | |||
121 | iLen = (iStop - iStart) + 1; | 125 | iLen = (iStop - iStart) + 1; |
122 | strCountry = strLine.mid( iStart, iLen ); | 126 | strCountry = strLine.mid( iStart, iLen ); |
123 | } | 127 | } |
124 | // now match the city... | 128 | // now match the city... |
125 | iStart = regCity.match( strLine, iStart + iLen, &iLen ); | 129 | iStart = regCity.match( strLine, iStart + iLen, &iLen ); |
126 | if ( iStart >= 0 ) { | 130 | if ( iStart >= 0 ) { |
127 | strCity = strLine.mid( iStart, iLen ); | 131 | strCity = strLine.mid( iStart, iLen ); |
128 | } | 132 | } |
129 | } | 133 | } |
130 | 134 | ||
131 | void ZoneField::showStructure( void ) const | 135 | void ZoneField::showStructure( void ) const |
132 | { | 136 | { |
133 | qDebug( "Country: %s", strCountry.latin1() ); | 137 | odebug << "Country: " << strCountry << "" << oendl; |
134 | qDebug( "City: %s", strCity.latin1() ); | 138 | odebug << "City: " << strCity << "" << oendl; |
135 | qDebug( "x: %d", _x ); | 139 | odebug << "x: " << _x << "" << oendl; |
136 | qDebug( "y: %d\n", _y ); | 140 | odebug << "y: " << _y << "\n" << oendl; |
137 | } | 141 | } |
138 | 142 | ||
139 | ZoneMap::ZoneMap( QWidget *parent, const char* name ) | 143 | ZoneMap::ZoneMap( QWidget *parent, const char* name ) |
140 | : QScrollView( parent, name ), | 144 | : QScrollView( parent, name ), |
141 | pLast( 0 ), | 145 | pLast( 0 ), |
142 | pRepaint( 0 ), | 146 | pRepaint( 0 ), |
143 | ox( 0 ), | 147 | ox( 0 ), |
144 | oy( 0 ), | 148 | oy( 0 ), |
145 | drawableW( -1 ), | 149 | drawableW( -1 ), |
146 | drawableH( -1 ), | 150 | drawableH( -1 ), |
147 | bZoom( FALSE ), | 151 | bZoom( FALSE ), |
148 | bIllum( TRUE ), | 152 | bIllum( TRUE ), |