1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

OP37/GCS Begin of UAV overlay

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@959 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
zedamota 2010-06-30 22:34:09 +00:00 committed by zedamota
parent 8fd41c4854
commit 12d0831f25
4 changed files with 94 additions and 3 deletions

View File

@ -234,7 +234,7 @@ namespace mapcontrol
internals::Tile* t = core->Matrix.TileAt(core->GettilePoint());
//qDebug()<<"OPMapControl::DrawMap2D tile:"<<t->GetPos().ToString()<<" as "<<t->Overlays.count()<<" overlays";
//Tile t = core->Matrix[tileToDraw];
if(t!=0)
if(true)
{
//qDebug()<< "opmapcontrol:draw2d TileHasValue:"<<t->GetPos().ToString();
core->tileRect.SetX(core->GettilePoint().X()*core->tileRect.Width());
@ -247,6 +247,7 @@ namespace mapcontrol
// render tile
//lock(t.Overlays)
if(t!=0)
{
foreach(QByteArray img,t->Overlays)
{

View File

@ -7,7 +7,8 @@ include(../../../../openpilotgcslibrary.pri)
SOURCES += mapgraphicitem.cpp \
opmapwidget.cpp \
configuration.cpp \
waypointitem.cpp
waypointitem.cpp \
uavitem.cpp
LIBS += -L../build \
-lcore \
-linternals \
@ -15,7 +16,8 @@ LIBS += -L../build \
HEADERS += mapgraphicitem.h \
opmapwidget.h \
configuration.h \
waypointitem.h
waypointitem.h \
uavitem.h
QT += opengl
QT += network
QT += sql

View File

@ -0,0 +1,32 @@
/**
******************************************************************************
*
* @file uavitem.cpp
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
* @brief A graphicsItem representing a UAV
* @see The GNU Public License (GPL) Version 3
* @defgroup OPMapWidget
* @{
*
*****************************************************************************/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "uavitem.h"
namespace mapcontrol
{
}

View File

@ -0,0 +1,56 @@
/**
******************************************************************************
*
* @file uavitem.h
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
* Parts by Nokia Corporation (qt-info@nokia.com) Copyright (C) 2009.
* @brief A graphicsItem representing a WayPoint
* @see The GNU Public License (GPL) Version 3
* @defgroup OPMapWidget
* @{
*
*****************************************************************************/
/*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef UAVITEM_H
#define UAVITEM_H
#include <QGraphicsItem>
#include <QPainter>
#include <QLabel>
#include "../internals/pointlatlng.h"
#include "mapgraphicitem.h"
#include <QObject>
namespace mapcontrol
{
/**
* @brief A QGraphicsItem representing a WayPoint
*
* @class WayPointItem waypointitem.h "waypointitem.h"
*/
class UAVItem:public QObject,public QGraphicsItem
{
Q_OBJECT
Q_INTERFACES(QGraphicsItem)
public:
enum { Type = UserType + 2 };
public slots:
};
}
#endif // UAVITEM_H