QGCMapTool.cc 641 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#include "QGCMapTool.h"
#include "ui_QGCMapTool.h"

QGCMapTool::QGCMapTool(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::QGCMapTool)
{
    ui->setupUi(this);

    // Connect map and toolbar
    ui->toolBar->setMap(ui->map);
LM's avatar
LM committed
12 13 14 15 16 17
    // Connect zoom slider and map
    ui->zoomSlider->setMinimum(ui->map->MinZoom());
    ui->zoomSlider->setMaximum(ui->map->MaxZoom());
    ui->zoomSlider->setValue(ui->map->ZoomReal());
    connect(ui->zoomSlider, SIGNAL(valueChanged(int)), ui->map, SLOT(SetZoom(int)));
    connect(ui->map, SIGNAL(zoomChanged(int)), ui->zoomSlider, SLOT(setValue(int)));
18 19 20 21 22 23
}

QGCMapTool::~QGCMapTool()
{
    delete ui;
}