Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ZoneMap Class Reference

#include </home/clem/local/src/opie/core/settings/citytime/zonemap.h>

Collaboration diagram for ZoneMap:

Collaboration graph
[legend]
List of all members.

Public Slots

void slotZoom (bool setZoom)
void slotIllum (bool setIllum)
void slotUpdate (void)
void slotRedraw (void)
void slotFindCity (const QPoint &pos)
void changeClock (bool)

Signals

void signalTz (const QString &newCountry, const QString &newCity)

Public Member Functions

 ZoneMap (QWidget *parent=0, const char *name=0)
 ~ZoneMap ()
void showZones (void) const
QWidget * selectionWidget (QWidget *parent)
bool zoneToWin (int zoneX, int zoneY, int &winX, int &winY) const
bool winToZone (int winX, int winY, int &zoneX, int &zoneY) const

Protected Member Functions

virtual void viewportMouseMoveEvent (QMouseEvent *event)
virtual void viewportMousePressEvent (QMouseEvent *event)
virtual void viewportMouseReleaseEvent (QMouseEvent *event)
virtual void keyPressEvent (QKeyEvent *)
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 Member Functions

ZoneFieldfindCityNear (ZoneField *city, int key)
void showCity (ZoneField *city)
void drawCities (QPainter *p)
void drawCity (QPainter *p, const ZoneField *pCity)
void readZones (void)
void zoom (void)
void makeMap (int width, int height)

Private Attributes

QPixmap * pixCurr
QLabel * lblCity
QToolButton * cmdZoom
QTimer * tHide
ZoneFieldpLast
ZoneFieldpRepaint
QList< ZoneFieldzones
StylusNormalizer norm
QListView * cityView
QString selectedCont
int wImg
int hImg
int ox
int oy
int drawableW
int drawableH
bool bZoom
bool bIllum
bool ampm
ZoneFieldcursor

Constructor & Destructor Documentation

ZoneMap::ZoneMap QWidget *  parent = 0,
const char *  name = 0
 

Definition at line 144 of file zonemap.cpp.

References changeClock(), cmdZoom, height, lblCity, Opie::Core::OResource::loadPixmap(), norm, pixCurr, qApp, readZones(), slotFindCity(), slotRedraw(), slotUpdate(), slotZoom(), Opie::Core::OResource::SmallIcon, tHide, tr, width, and zones.

ZoneMap::~ZoneMap  ) 
 

Definition at line 208 of file zonemap.cpp.


Member Function Documentation

void ZoneMap::changeClock bool   )  [slot]
 

Definition at line 727 of file zonemap.cpp.

References ampm.

Referenced by CityTime::CityTime(), and ZoneMap().

void ZoneMap::drawCities QPainter *  p  )  [private]
 

Definition at line 522 of file zonemap.cpp.

References iCITYOFFSET, iCITYSIZE, wImg, ZoneField::x(), Opie::MM::x, ZoneField::y(), Opie::MM::y, zones, and zoneToWin().

void ZoneMap::drawCity QPainter *  p,
const ZoneField pCity
[private]
 

Definition at line 642 of file zonemap.cpp.

References iCITYOFFSET, iCITYSIZE, ZoneField::x(), Opie::MM::x, ZoneField::y(), Opie::MM::y, and zoneToWin().

Referenced by drawContents().

void ZoneMap::drawContents QPainter *  p,
int  cx,
int  cy,
int  cw,
int  ch
[protected, virtual]
 

Definition at line 652 of file zonemap.cpp.

References bZoom, drawableH, drawableW, drawCity(), height, makeMap(), pixCurr, pLast, and width.

ZoneField * ZoneMap::findCityNear ZoneField city,
int  key
[private]
 

Definition at line 293 of file zonemap.cpp.

References ZoneField::x(), ZoneField::y(), and zones.

Referenced by keyPressEvent().

void ZoneMap::keyPressEvent QKeyEvent *   )  [protected, virtual]
 

Definition at line 260 of file zonemap.cpp.

References cursor, findCityNear(), showCity(), signalTz(), slotFindCity(), tHide, ZoneField::x(), ZoneField::y(), and zoneToWin().

void ZoneMap::makeMap int  width,
int  height
[private]
 

Definition at line 605 of file zonemap.cpp.

References bIllum, dayNight(), hImg, i, Opie::Core::OResource::loadImage(), numColors, ox, oy, pixCurr, strMAP, tr, warning(), and wImg.

Referenced by drawContents(), resizeEvent(), slotIllum(), slotUpdate(), and slotZoom().

void ZoneMap::readZones void   )  [private]
 

Definition at line 212 of file zonemap.cpp.

References QTextStream::atEnd(), QFile::close(), IO_ReadOnly, QFile::open(), QTextStream::readLine(), strZONEINFO, tr, warning(), and zones.

Referenced by ZoneMap().

void ZoneMap::resizeEvent QResizeEvent *   )  [protected, virtual]
 

Definition at line 441 of file zonemap.cpp.

References bZoom, cmdZoom, drawableH, drawableW, height, makeMap(), and width.

QWidget * ZoneMap::selectionWidget QWidget *  parent  ) 
 

Definition at line 466 of file zonemap.cpp.

References add, QValueList< T >::append(), cityView, QValueList< T >::contains(), ZoneField::country(), name, slotGetCities(), tr, and zones.

Referenced by CityTime::CityTime().

void ZoneMap::showCity ZoneField city  )  [private]
 

Definition at line 377 of file zonemap.cpp.

References ampm, ZoneField::city(), ZoneField::country(), drawableH, drawableW, iCITYOFFSET, iCITYSIZE, iLABELOFFSET, lblCity, p, pLast, pRepaint, QString::replace(), TimeString::shortTime(), ZoneField::x(), Opie::MM::x, ZoneField::y(), Opie::MM::y, and zoneToWin().

Referenced by keyPressEvent(), and slotFindCity().

void ZoneMap::showZones void   )  const
 

Definition at line 455 of file zonemap.cpp.

References ZoneField::showStructure(), and zones.

void ZoneMap::signalTz const QString newCountry,
const QString newCity
[signal]
 

Referenced by keyPressEvent(), slotCitySelected(), and viewportMouseReleaseEvent().

void ZoneMap::slotCitySelected QListViewItem *   )  [private, slot]
 

Definition at line 516 of file zonemap.cpp.

References selectedCont, and signalTz().

Referenced by slotGetCities().

void ZoneMap::slotFindCity const QPoint &  pos  )  [slot]
 

Definition at line 335 of file zonemap.cpp.

References cursor, iTHRESHOLD, lblCity, showCity(), tHide, winToZone(), ZoneField::x(), Opie::MM::x, ZoneField::y(), Opie::MM::y, and zones.

Referenced by keyPressEvent(), and ZoneMap().

void ZoneMap::slotGetCities QListViewItem *   )  [private, slot]
 

Definition at line 501 of file zonemap.cpp.

References ZoneField::city(), cityView, ZoneField::country(), selectedCont, slotCitySelected(), and zones.

Referenced by selectionWidget().

void ZoneMap::slotIllum bool  setIllum  )  [slot]
 

Definition at line 698 of file zonemap.cpp.

References bIllum, hImg, makeMap(), pixCurr, and wImg.

void ZoneMap::slotRedraw void   )  [slot]
 

Definition at line 714 of file zonemap.cpp.

References iCITYOFFSET, iCITYSIZE, pLast, pRepaint, ZoneField::x(), Opie::MM::x, ZoneField::y(), Opie::MM::y, and zoneToWin().

Referenced by viewportMousePressEvent(), and ZoneMap().

void ZoneMap::slotUpdate void   )  [slot]
 

Definition at line 706 of file zonemap.cpp.

References drawableH, drawableW, makeMap(), and pixCurr.

Referenced by ZoneMap().

void ZoneMap::slotZoom bool  setZoom  )  [slot]
 

Definition at line 686 of file zonemap.cpp.

References bZoom, drawableH, drawableW, hImg, makeMap(), and wImg.

Referenced by ZoneMap().

void ZoneMap::viewportMouseMoveEvent QMouseEvent *  event  )  [protected, virtual]
 

Definition at line 243 of file zonemap.cpp.

References StylusNormalizer::addEvent(), and norm.

void ZoneMap::viewportMousePressEvent QMouseEvent *  event  )  [protected, virtual]
 

Definition at line 234 of file zonemap.cpp.

References StylusNormalizer::addEvent(), norm, slotRedraw(), and StylusNormalizer::start().

void ZoneMap::viewportMouseReleaseEvent QMouseEvent *  event  )  [protected, virtual]
 

Definition at line 248 of file zonemap.cpp.

References ZoneField::city(), ZoneField::country(), norm, NULL, pLast, signalTz(), StylusNormalizer::stop(), and tHide.

bool ZoneMap::winToZone int  winX,
int  winY,
int &  zoneX,
int &  zoneY
const [inline]
 

Definition at line 155 of file zonemap.h.

References hImg, ox, oy, and wImg.

Referenced by slotFindCity().

bool ZoneMap::zoneToWin int  zoneX,
int  zoneY,
int &  winX,
int &  winY
const [inline]
 

Definition at line 133 of file zonemap.h.

References hImg, iCITYOFFSET, ox, oy, and wImg.

Referenced by drawCities(), drawCity(), keyPressEvent(), showCity(), and slotRedraw().

void ZoneMap::zoom void   )  [private]
 


Member Data Documentation

bool ZoneMap::ampm [private]
 

Definition at line 128 of file zonemap.h.

Referenced by changeClock(), and showCity().

bool ZoneMap::bIllum [private]
 

Definition at line 127 of file zonemap.h.

Referenced by makeMap(), and slotIllum().

bool ZoneMap::bZoom [private]
 

Definition at line 126 of file zonemap.h.

Referenced by drawContents(), resizeEvent(), and slotZoom().

QListView* ZoneMap::cityView [private]
 

Definition at line 112 of file zonemap.h.

Referenced by selectionWidget(), and slotGetCities().

QToolButton* ZoneMap::cmdZoom [private]
 

Definition at line 105 of file zonemap.h.

Referenced by resizeEvent(), and ZoneMap().

ZoneField* ZoneMap::cursor [private]
 

Definition at line 130 of file zonemap.h.

Referenced by keyPressEvent(), and slotFindCity().

int ZoneMap::drawableH [private]
 

Definition at line 124 of file zonemap.h.

Referenced by drawContents(), resizeEvent(), showCity(), slotUpdate(), and slotZoom().

int ZoneMap::drawableW [private]
 

Definition at line 123 of file zonemap.h.

Referenced by drawContents(), resizeEvent(), showCity(), slotUpdate(), and slotZoom().

int ZoneMap::hImg [private]
 

Definition at line 117 of file zonemap.h.

Referenced by makeMap(), slotIllum(), slotZoom(), winToZone(), and zoneToWin().

QLabel* ZoneMap::lblCity [private]
 

Definition at line 104 of file zonemap.h.

Referenced by showCity(), slotFindCity(), and ZoneMap().

StylusNormalizer ZoneMap::norm [private]
 

Definition at line 110 of file zonemap.h.

Referenced by viewportMouseMoveEvent(), viewportMousePressEvent(), viewportMouseReleaseEvent(), and ZoneMap().

int ZoneMap::ox [private]
 

Definition at line 119 of file zonemap.h.

Referenced by makeMap(), winToZone(), and zoneToWin().

int ZoneMap::oy [private]
 

Definition at line 120 of file zonemap.h.

Referenced by makeMap(), winToZone(), and zoneToWin().

QPixmap* ZoneMap::pixCurr [private]
 

Definition at line 103 of file zonemap.h.

Referenced by drawContents(), makeMap(), slotIllum(), slotUpdate(), and ZoneMap().

ZoneField* ZoneMap::pLast [private]
 

Definition at line 107 of file zonemap.h.

Referenced by drawContents(), showCity(), slotRedraw(), and viewportMouseReleaseEvent().

ZoneField* ZoneMap::pRepaint [private]
 

Definition at line 108 of file zonemap.h.

Referenced by showCity(), and slotRedraw().

QString ZoneMap::selectedCont [private]
 

Definition at line 113 of file zonemap.h.

Referenced by slotCitySelected(), and slotGetCities().

QTimer* ZoneMap::tHide [private]
 

Definition at line 106 of file zonemap.h.

Referenced by keyPressEvent(), slotFindCity(), viewportMouseReleaseEvent(), and ZoneMap().

int ZoneMap::wImg [private]
 

Definition at line 116 of file zonemap.h.

Referenced by drawCities(), makeMap(), slotIllum(), slotZoom(), winToZone(), and zoneToWin().

QList<ZoneField> ZoneMap::zones [private]
 

Definition at line 109 of file zonemap.h.

Referenced by drawCities(), findCityNear(), readZones(), selectionWidget(), showZones(), slotFindCity(), slotGetCities(), and ZoneMap().


The documentation for this class was generated from the following files:
Generated on Sat Nov 5 17:56:11 2005 for OPIE by  doxygen 1.4.2