mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-18 03:52:11 +01:00
Small bug fix.
Main GCS Options still locks up :( git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@784 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
176c8e5d92
commit
e73d90fbde
@ -1,8 +1,9 @@
|
|||||||
|
|
||||||
<plugin name="OPMapGadget" version="1.0.0" compatVersion="1.0.0">
|
<plugin name="OPMapGadget" version="1.0.0" compatVersion="1.0.0">
|
||||||
<vendor>The OpenPilot Project</vendor>
|
<vendor>The OpenPilot Project</vendor>
|
||||||
<copyright>(C) 2010 OpenPilot Project</copyright>
|
<copyright>(C) 2010 OpenPilot Project</copyright>
|
||||||
<license>The GNU Public License (GPL) Version 3</license>
|
<license>The GNU Public License (GPL) Version 3</license>
|
||||||
<description>OPMap gadget!</description>
|
<description>OPMap Gadget!</description>
|
||||||
<url>http://www.openpilot.org</url>
|
<url>http://www.openpilot.org</url>
|
||||||
<dependencyList>
|
<dependencyList>
|
||||||
<dependency name="Core" version="1.0.0"/>
|
<dependency name="Core" version="1.0.0"/>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<RCC>
|
<RCC>
|
||||||
<qresource prefix="/map2">
|
<qresource prefix="/opmap">
|
||||||
<file>images/waypoint.png</file>
|
|
||||||
<file>images/uav.png</file>
|
|
||||||
<file>images/gcs.png</file>
|
<file>images/gcs.png</file>
|
||||||
|
<file>images/uav.png</file>
|
||||||
|
<file>images/waypoint.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
@ -43,7 +43,7 @@ OPMapGadgetFactory::~OPMapGadgetFactory()
|
|||||||
Core::IUAVGadget* OPMapGadgetFactory::createGadget(QWidget *parent)
|
Core::IUAVGadget* OPMapGadgetFactory::createGadget(QWidget *parent)
|
||||||
{
|
{
|
||||||
OPMapGadgetWidget* gadgetWidget = new OPMapGadgetWidget(parent);
|
OPMapGadgetWidget* gadgetWidget = new OPMapGadgetWidget(parent);
|
||||||
return new OPMapGadget(QString("MapGadget"), gadgetWidget, parent);
|
return new OPMapGadget(QString("OPMapGadget"), gadgetWidget, parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
IUAVGadgetConfiguration *OPMapGadgetFactory::createConfiguration(const QByteArray &state)
|
IUAVGadgetConfiguration *OPMapGadgetFactory::createConfiguration(const QByteArray &state)
|
||||||
|
@ -45,17 +45,17 @@ OPMapGadgetWidget::OPMapGadgetWidget(QWidget *parent) : QWidget(parent)
|
|||||||
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||||
|
|
||||||
map = NULL;
|
map = NULL;
|
||||||
// map = new mapcontrol::OPMapWidget();
|
// map = new mapcontrol::OPMapWidget();
|
||||||
// map->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
// map->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
|
||||||
// map->setMinimumSize(64, 64);
|
// map->setMinimumSize(64, 64);
|
||||||
|
|
||||||
PositionActual::DataFields data = m_positionActual->getData(); // get current position data
|
PositionActual::DataFields data = m_positionActual->getData(); // get current position data
|
||||||
|
|
||||||
// QVBoxLayout *layout = new QVBoxLayout;
|
// QVBoxLayout *layout = new QVBoxLayout;
|
||||||
// layout->setSpacing(0);
|
// layout->setSpacing(0);
|
||||||
// layout->setContentsMargins(0, 0, 0, 0);
|
// layout->setContentsMargins(0, 0, 0, 0);
|
||||||
// layout->addWidget(map);
|
// layout->addWidget(map);
|
||||||
// setLayout(layout);
|
// setLayout(layout);
|
||||||
|
|
||||||
// m_updateTimer = new QTimer();
|
// m_updateTimer = new QTimer();
|
||||||
// m_updateTimer->setInterval(250);
|
// m_updateTimer->setInterval(250);
|
||||||
@ -76,19 +76,28 @@ OPMapGadgetWidget::~OPMapGadgetWidget()
|
|||||||
|
|
||||||
void OPMapGadgetWidget::setZoom(int value)
|
void OPMapGadgetWidget::setZoom(int value)
|
||||||
{
|
{
|
||||||
|
if (map)
|
||||||
|
{
|
||||||
// map->setZoom(value);
|
// map->setZoom(value);
|
||||||
// map->updateRequestNew();
|
// map->updateRequestNew();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPMapGadgetWidget::setPosition(QPointF pos)
|
void OPMapGadgetWidget::setPosition(QPointF pos)
|
||||||
{
|
{
|
||||||
|
if (map)
|
||||||
|
{
|
||||||
// map->setView(pos);
|
// map->setView(pos);
|
||||||
// map->updateRequestNew();
|
// map->updateRequestNew();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OPMapGadgetWidget::setMapProvider(QString provider)
|
void OPMapGadgetWidget::setMapProvider(QString provider)
|
||||||
{
|
{
|
||||||
|
if (map)
|
||||||
|
{
|
||||||
// map->
|
// map->
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// *************************************************************************************
|
// *************************************************************************************
|
||||||
@ -107,7 +116,7 @@ void OPMapGadgetWidget::updatePosition()
|
|||||||
|
|
||||||
void OPMapGadgetWidget::resizeEvent(QResizeEvent *event)
|
void OPMapGadgetWidget::resizeEvent(QResizeEvent *event)
|
||||||
{
|
{
|
||||||
// map->resize(QSize(width(), height()));
|
if (map) map->resize(QSize(width(), height()));
|
||||||
update();
|
update();
|
||||||
QWidget::resizeEvent(event);
|
QWidget::resizeEvent(event);
|
||||||
}
|
}
|
||||||
|
@ -48,12 +48,12 @@ public:
|
|||||||
void setMapProvider(QString provider);
|
void setMapProvider(QString provider);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
// void gcsButtonClick(); // added by cathy
|
// void gcsButtonClick();
|
||||||
// void uavButtonClick(bool checked); // added by cathy
|
// void uavButtonClick(bool checked);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent *event);
|
void resizeEvent(QResizeEvent *event);
|
||||||
void keyPressEvent(QKeyEvent* event); // added by cathy
|
void keyPressEvent(QKeyEvent* event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updatePosition();
|
void updatePosition();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user