123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #ifndef MAP_H
- #define MAP_H
-
- #include <QWidget>
- #include <QMap>
- #include <QRgb>
- // #include <census.h>
- #include <country.h>
- #include <gispoi.h>
- #include <QVector>
- #include <QPair>
-
- /// This is the actual widget in charge of drawing the map
-
-
- class Map : public QWidget
- {
- Q_OBJECT
- public:
- /// \fn Map(QWidget *parent = 0);
- /// \~English
- /// \brief default constructor
- /// \~Spanish
- /// \brief constructor por defecto
- ///
- explicit Map(QWidget *parent = 0);
-
- /// \fn drawPoints(GISPOI *v, unsigned int size);
- /// \~English
- /// \brief sets the array of GIS locations and sets its size
- /// \~Spanish
- /// \brief establece el arreglo de localizaciones de GIS y su tamaño
- ///
- void drawPoints(GISPOI *v, unsigned int size)
- { gisLocations = v; numLocations = size; }
-
- /// \fn drawLine(const GISPOI &city01, const GISPOI &city02)
- /// \~English
- /// \brief adds a line from city01 to city02
- /// \~Spanish
- /// \brief añade una linea entre los centroides de city01 a city02
- ///
- void drawLine(const GISPOI &city01, const GISPOI &city02) {
- this->cityLines.push_back(
- QPair<const GISPOI *, const GISPOI *> (&city01, &city02));
- }
-
- ~Map();
- signals:
-
- private:
- Country *myCountry;
- QMap<QString,QRgb> *cityColorMap;
- GISPOI *gisLocations;
- unsigned int numLocations;
- bool drawRoutes;
- QVector < QPair<const GISPOI *,const GISPOI *> > cityLines;
-
- protected:
- void paintEvent(QPaintEvent *event);
-
- public slots:
-
- };
-
- #endif // MAP_H
|