1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- #include "mainwindow.h"
- #include "ui_mainwindow.h"
- #include <QDebug>
- #include <country.h>
- #include <gispoi.h>
-
- 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<QToolBar *> toolbars = this->findChildren<QToolBar *>();
- foreach(QToolBar *t, toolbars) t->hide();
- QList<QStatusBar *> statusbars = this->findChildren<QStatusBar *>();
- 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;
- }
|