#include "mainwindow.h" #include "ui_mainwindow.h" #include #include #include //#include #include #include //#include //#include #include #include #include #include #include #include #include #include #include using namespace std; Country PR; MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow) { srand(time(NULL)); myMap = new Map(this); myMap->show(); ui->setupUi(this); // just hidding the toolbars to have a bigger drawing area. QList toolbars = this->findChildren(); foreach(QToolBar *t, toolbars) t->hide(); QList statusbars = this->findChildren(); foreach(QStatusBar *t, statusbars) t->hide(); resize(myMap->width(), myMap->height()); } void MainWindow::drawPoints(GISPOI* gisLocations, unsigned int size) { myMap->drawPoints(gisLocations, size); } void MainWindow::drawLine(const GISPOI &poi01, const GISPOI &poi02) { myMap->drawLine(poi01, poi02); } MainWindow::~MainWindow() { delete ui; if (myMap != NULL) delete myMap; }