summaryrefslogtreecommitdiff
path: root/core/settings/citytime/zonemap.h
authorharlekin <harlekin>2002-10-12 13:43:58 (UTC)
committer harlekin <harlekin>2002-10-12 13:43:58 (UTC)
commit4f1cf7f8c9925f31f2940207b8f7b5771533b734 (patch) (side-by-side diff)
tree95656286280ec923b6262bcdfb55a986c8fc4ab8 /core/settings/citytime/zonemap.h
parentd442e7bcc977c46a77749c0d2508a755a8d9db7a (diff)
downloadopie-4f1cf7f8c9925f31f2940207b8f7b5771533b734.zip
opie-4f1cf7f8c9925f31f2940207b8f7b5771533b734.tar.gz
opie-4f1cf7f8c9925f31f2940207b8f7b5771533b734.tar.bz2
first step to make citytime more usable
Diffstat (limited to 'core/settings/citytime/zonemap.h') (more/less context) (ignore whitespace changes)
-rw-r--r--core/settings/citytime/zonemap.h18
1 files changed, 13 insertions, 5 deletions
diff --git a/core/settings/citytime/zonemap.h b/core/settings/citytime/zonemap.h
index c9c2035..ea0142b 100644
--- a/core/settings/citytime/zonemap.h
+++ b/core/settings/citytime/zonemap.h
@@ -16,7 +16,7 @@
** Contact info@trolltech.com if any conditions of this licensing are
** not clear to you.
**
-**********************************************************************/
+**********************************************************************/
#ifndef ZONEMAP_H
#define ZONEMAP_H
@@ -34,7 +34,8 @@ class QComboBox;
class QLabel;
class QTimer;
class QToolButton;
-
+class QListViewItem;
+class QListView;
class ZoneField
@@ -63,6 +64,7 @@ public:
ZoneMap( QWidget *parent = 0, const char *name = 0 );
~ZoneMap();
void showZones( void ) const;
+ QWidget* selectionWidget( QWidget* parent );
// convert between the pixels on the image and the coordinates in the
// database
inline bool zoneToWin( int zoneX, int zoneY, int &winX, int &winY ) const;
@@ -87,6 +89,9 @@ protected:
virtual void resizeEvent( QResizeEvent *);
virtual void drawContents( QPainter *p, int cx, int cy, int cw, int ch );
+private slots:
+ void slotGetCities( QListViewItem * );
+ void slotCitySelected( QListViewItem * );
private:
ZoneField *findCityNear( ZoneField *city, int key );
void showCity( ZoneField *city );
@@ -104,6 +109,9 @@ private:
QList<ZoneField> zones; // a linked list to hold all this information
StylusNormalizer norm;
+ QListView *cityView;
+ QString selectedCont;
+
//the True width and height of the map...
int wImg;
int hImg;
@@ -143,8 +151,8 @@ inline bool ZoneMap::zoneToWin( int zoneX, int zoneY,
// for now just return true...
return true;
}
-
-inline bool ZoneMap::winToZone( int winX, int winY,
+
+inline bool ZoneMap::winToZone( int winX, int winY,
int &zoneX, int &zoneY ) const
{
zoneY = ( 648000 * ( oy - winY ) ) / hImg;
@@ -152,6 +160,6 @@ inline bool ZoneMap::winToZone( int winX, int winY,
// perhaps in the future there will be some real error checking
// for now just return true...
return true;
-}
+}
#endif