2010-03-19 18:31:13 +01:00
|
|
|
/*
|
|
|
|
* mapgadget.cpp
|
|
|
|
*
|
|
|
|
* Created on: Mar 11, 2010
|
|
|
|
* Author: peter
|
|
|
|
*/
|
|
|
|
#include "mapgadget.h"
|
|
|
|
#include "mapgadgetwidget.h"
|
2010-03-25 23:32:45 +01:00
|
|
|
#include "mapgadgetconfiguration.h"
|
2010-03-19 18:31:13 +01:00
|
|
|
|
2010-03-24 20:50:09 +01:00
|
|
|
MapGadget::MapGadget(QString classId, QList<IUAVGadgetConfiguration*> *configurations, MapGadgetWidget *widget) :
|
|
|
|
IUAVGadget(classId, configurations, widget),
|
|
|
|
m_widget(widget)
|
2010-03-19 18:31:13 +01:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
MapGadget::~MapGadget()
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
2010-03-25 23:32:45 +01:00
|
|
|
|
|
|
|
void MapGadget::loadConfiguration(IUAVGadgetConfiguration* config)
|
|
|
|
{
|
|
|
|
MapGadgetConfiguration *m = qobject_cast<MapGadgetConfiguration*>(config);
|
|
|
|
m_widget->setZoom(m->zoom());
|
|
|
|
m_widget->setPosition(QPointF(m->longitude(), m->latitude()));
|
|
|
|
int index = m_toolbar->findText(config->name());
|
|
|
|
m_toolbar->setCurrentIndex(index);
|
|
|
|
}
|
|
|
|
|