Diffstat (limited to 'core/settings/citytime/zonemap.h') (more/less context) (show whitespace changes)
-rw-r--r-- | core/settings/citytime/zonemap.h | 10 |
1 files changed, 9 insertions, 1 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 | |||
@@ -31,13 +31,14 @@ extern const int iCITYOFFSET; | |||
31 | 31 | ||
32 | class QImage; | 32 | class QImage; |
33 | class QComboBox; | 33 | class QComboBox; |
34 | class QLabel; | 34 | class QLabel; |
35 | class QTimer; | 35 | class QTimer; |
36 | class QToolButton; | 36 | class QToolButton; |
37 | 37 | class QListViewItem; | |
38 | class QListView; | ||
38 | 39 | ||
39 | 40 | ||
40 | class ZoneField | 41 | class ZoneField |
41 | { | 42 | { |
42 | public: | 43 | public: |
43 | ZoneField( const QString & ); | 44 | ZoneField( const QString & ); |
@@ -60,12 +61,13 @@ class ZoneMap : public QScrollView | |||
60 | { | 61 | { |
61 | Q_OBJECT | 62 | Q_OBJECT |
62 | public: | 63 | public: |
63 | ZoneMap( QWidget *parent = 0, const char *name = 0 ); | 64 | ZoneMap( QWidget *parent = 0, const char *name = 0 ); |
64 | ~ZoneMap(); | 65 | ~ZoneMap(); |
65 | void showZones( void ) const; | 66 | void showZones( void ) const; |
67 | QWidget* selectionWidget( QWidget* parent ); | ||
66 | // convert between the pixels on the image and the coordinates in the | 68 | // convert between the pixels on the image and the coordinates in the |
67 | // database | 69 | // database |
68 | inline bool zoneToWin( int zoneX, int zoneY, int &winX, int &winY ) const; | 70 | inline bool zoneToWin( int zoneX, int zoneY, int &winX, int &winY ) const; |
69 | inline bool winToZone( int winX, int winY, int &zoneX, int &zoneY ) const; | 71 | inline bool winToZone( int winX, int winY, int &zoneX, int &zoneY ) const; |
70 | 72 | ||
71 | public slots: | 73 | public slots: |
@@ -84,12 +86,15 @@ protected: | |||
84 | virtual void viewportMousePressEvent( QMouseEvent *event ); | 86 | virtual void viewportMousePressEvent( QMouseEvent *event ); |
85 | virtual void viewportMouseReleaseEvent( QMouseEvent *event ); | 87 | virtual void viewportMouseReleaseEvent( QMouseEvent *event ); |
86 | virtual void keyPressEvent( QKeyEvent * ); | 88 | virtual void keyPressEvent( QKeyEvent * ); |
87 | virtual void resizeEvent( QResizeEvent *); | 89 | virtual void resizeEvent( QResizeEvent *); |
88 | virtual void drawContents( QPainter *p, int cx, int cy, int cw, int ch ); | 90 | virtual void drawContents( QPainter *p, int cx, int cy, int cw, int ch ); |
89 | 91 | ||
92 | private slots: | ||
93 | void slotGetCities( QListViewItem * ); | ||
94 | void slotCitySelected( QListViewItem * ); | ||
90 | private: | 95 | private: |
91 | ZoneField *findCityNear( ZoneField *city, int key ); | 96 | ZoneField *findCityNear( ZoneField *city, int key ); |
92 | void showCity( ZoneField *city ); | 97 | void showCity( ZoneField *city ); |
93 | void drawCities( QPainter *p );// put all the cities on the map (ugly) | 98 | void drawCities( QPainter *p );// put all the cities on the map (ugly) |
94 | void drawCity( QPainter *p, const ZoneField *pCity ); // draw the given city on the map | 99 | void drawCity( QPainter *p, const ZoneField *pCity ); // draw the given city on the map |
95 | void readZones( void ); // Read in the zone information from the file | 100 | void readZones( void ); // Read in the zone information from the file |
@@ -101,12 +106,15 @@ private: | |||
101 | QTimer*tHide; // the timer to hide the "tool tip" | 106 | QTimer*tHide; // the timer to hide the "tool tip" |
102 | ZoneField *pLast; // the last known good city that was found... | 107 | ZoneField *pLast; // the last known good city that was found... |
103 | ZoneField *pRepaint; // save the location to maximize the repaint... | 108 | ZoneField *pRepaint; // save the location to maximize the repaint... |
104 | QList<ZoneField> zones; // a linked list to hold all this information | 109 | QList<ZoneField> zones; // a linked list to hold all this information |
105 | StylusNormalizer norm; | 110 | StylusNormalizer norm; |
106 | 111 | ||
112 | QListView *cityView; | ||
113 | QString selectedCont; | ||
114 | |||
107 | //the True width and height of the map... | 115 | //the True width and height of the map... |
108 | int wImg; | 116 | int wImg; |
109 | int hImg; | 117 | int hImg; |
110 | // the pixel points that correspond to (0, 0); | 118 | // the pixel points that correspond to (0, 0); |
111 | int ox; | 119 | int ox; |
112 | int oy; | 120 | int oy; |