1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-17 02:52:12 +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:
pip 2010-06-16 13:12:28 +00:00 committed by pip
parent 176c8e5d92
commit e73d90fbde
5 changed files with 27 additions and 17 deletions

View File

@ -1,8 +1,9 @@
<plugin name="OPMapGadget" version="1.0.0" compatVersion="1.0.0">
<vendor>The OpenPilot Project</vendor>
<copyright>(C) 2010 OpenPilot Project</copyright>
<license>The GNU Public License (GPL) Version 3</license>
<description>OPMap gadget!</description>
<description>OPMap Gadget!</description>
<url>http://www.openpilot.org</url>
<dependencyList>
<dependency name="Core" version="1.0.0"/>

View File

@ -1,7 +1,7 @@
<RCC>
<qresource prefix="/map2">
<file>images/waypoint.png</file>
<file>images/uav.png</file>
<qresource prefix="/opmap">
<file>images/gcs.png</file>
<file>images/uav.png</file>
<file>images/waypoint.png</file>
</qresource>
</RCC>

View File

@ -43,7 +43,7 @@ OPMapGadgetFactory::~OPMapGadgetFactory()
Core::IUAVGadget* OPMapGadgetFactory::createGadget(QWidget *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)

View File

@ -45,17 +45,17 @@ OPMapGadgetWidget::OPMapGadgetWidget(QWidget *parent) : QWidget(parent)
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
map = NULL;
// map = new mapcontrol::OPMapWidget();
// map->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
// map->setMinimumSize(64, 64);
// map = new mapcontrol::OPMapWidget();
// map->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
// map->setMinimumSize(64, 64);
PositionActual::DataFields data = m_positionActual->getData(); // get current position data
// QVBoxLayout *layout = new QVBoxLayout;
// layout->setSpacing(0);
// layout->setContentsMargins(0, 0, 0, 0);
// layout->addWidget(map);
// setLayout(layout);
// QVBoxLayout *layout = new QVBoxLayout;
// layout->setSpacing(0);
// layout->setContentsMargins(0, 0, 0, 0);
// layout->addWidget(map);
// setLayout(layout);
// m_updateTimer = new QTimer();
// m_updateTimer->setInterval(250);
@ -76,19 +76,28 @@ OPMapGadgetWidget::~OPMapGadgetWidget()
void OPMapGadgetWidget::setZoom(int value)
{
if (map)
{
// map->setZoom(value);
// map->updateRequestNew();
}
}
void OPMapGadgetWidget::setPosition(QPointF pos)
{
if (map)
{
// map->setView(pos);
// map->updateRequestNew();
}
}
void OPMapGadgetWidget::setMapProvider(QString provider)
{
if (map)
{
// map->
}
}
// *************************************************************************************
@ -107,7 +116,7 @@ void OPMapGadgetWidget::updatePosition()
void OPMapGadgetWidget::resizeEvent(QResizeEvent *event)
{
// map->resize(QSize(width(), height()));
if (map) map->resize(QSize(width(), height()));
update();
QWidget::resizeEvent(event);
}

View File

@ -48,12 +48,12 @@ public:
void setMapProvider(QString provider);
public slots:
// void gcsButtonClick(); // added by cathy
// void uavButtonClick(bool checked); // added by cathy
// void gcsButtonClick();
// void uavButtonClick(bool checked);
protected:
void resizeEvent(QResizeEvent *event);
void keyPressEvent(QKeyEvent* event); // added by cathy
void keyPressEvent(QKeyEvent* event);
private slots:
void updatePosition();