No Description

map.h 872B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef MAP_H
  2. #define MAP_H
  3. #include <QWidget>
  4. #include <QMap>
  5. #include <QRgb>
  6. #include <census.h>
  7. #include <country.h>
  8. #include <gispoi.h>
  9. #include <QVector>
  10. #include <QPair>
  11. class Map : public QWidget
  12. {
  13. Q_OBJECT
  14. public:
  15. explicit Map(QWidget *parent = 0);
  16. void setColorMap(QMap<QString,QRgb> *colorMap) {cityColorMap = colorMap;}
  17. void drawPoints(GISPOI *v, unsigned int size) {gisLocations = v; numLocations = size;}
  18. void setDrawRoutes(bool r) {drawRoutes = r;}
  19. void drawLine(const GISPOI &city01, const GISPOI &city02);
  20. ~Map();
  21. signals:
  22. private:
  23. Country *myCountry;
  24. QMap<QString,QRgb> *cityColorMap;
  25. GISPOI *gisLocations;
  26. QVector < QPair<const GISPOI *,const GISPOI *> > cityLines;
  27. unsigned int numLocations;
  28. bool drawRoutes;
  29. protected:
  30. void paintEvent(QPaintEvent *event);
  31. public slots:
  32. };
  33. #endif // MAP_H