mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-29 14:52:12 +01:00
GCS/MapLib - added pathplanmanager class
This commit is contained in:
parent
40cfe0f4d9
commit
3b8ca57eef
@ -43,6 +43,7 @@
|
||||
#include "mapripper.h"
|
||||
#include "waypointline.h"
|
||||
#include "waypointcircle.h"
|
||||
#include "waypointitem.h"
|
||||
namespace mapcontrol
|
||||
{
|
||||
class UAVItem;
|
||||
|
@ -1,46 +1,49 @@
|
||||
TEMPLATE = lib
|
||||
TARGET = OPMapGadget
|
||||
|
||||
include(../../openpilotgcsplugin.pri)
|
||||
include(../../plugins/coreplugin/coreplugin.pri)
|
||||
include(../../libs/opmapcontrol/opmapcontrol.pri)
|
||||
include(../../plugins/uavobjects/uavobjects.pri)
|
||||
include(../../plugins/uavobjectutil/uavobjectutil.pri)
|
||||
include(../../plugins/uavtalk/uavtalk.pri)
|
||||
include(../../libs/utils/utils.pri)
|
||||
|
||||
HEADERS += opmapplugin.h \
|
||||
opmapgadgetoptionspage.h \
|
||||
opmapgadgetfactory.h \
|
||||
opmapgadgetconfiguration.h \
|
||||
opmapgadget.h \
|
||||
opmapgadgetwidget.h \
|
||||
opmap_waypointeditor_dialog.h \
|
||||
opmap_edit_waypoint_dialog.h \
|
||||
opmap_zoom_slider_widget.h \
|
||||
opmap_statusbar_widget.h \
|
||||
opmap_overlay_widget.h
|
||||
|
||||
SOURCES += opmapplugin.cpp \
|
||||
opmapgadgetwidget.cpp \
|
||||
opmapgadgetoptionspage.cpp \
|
||||
opmapgadgetfactory.cpp \
|
||||
opmapgadgetconfiguration.cpp \
|
||||
opmapgadget.cpp \
|
||||
opmap_waypointeditor_dialog.cpp \
|
||||
opmap_edit_waypoint_dialog.cpp \
|
||||
opmap_zoom_slider_widget.cpp \
|
||||
opmap_statusbar_widget.cpp \
|
||||
opmap_overlay_widget.cpp
|
||||
|
||||
OTHER_FILES += OPMapGadget.pluginspec
|
||||
|
||||
FORMS += opmapgadgetoptionspage.ui \
|
||||
opmap_widget.ui \
|
||||
opmap_waypointeditor_dialog.ui \
|
||||
opmap_edit_waypoint_dialog.ui \
|
||||
opmap_zoom_slider_widget.ui \
|
||||
opmap_statusbar_widget.ui \
|
||||
opmap_overlay_widget.ui
|
||||
|
||||
RESOURCES += opmap.qrc
|
||||
TEMPLATE = lib
|
||||
TARGET = OPMapGadget
|
||||
|
||||
include(../../openpilotgcsplugin.pri)
|
||||
include(../../plugins/coreplugin/coreplugin.pri)
|
||||
include(../../libs/opmapcontrol/opmapcontrol.pri)
|
||||
include(../../plugins/uavobjects/uavobjects.pri)
|
||||
include(../../plugins/uavobjectutil/uavobjectutil.pri)
|
||||
include(../../plugins/uavtalk/uavtalk.pri)
|
||||
include(../../libs/utils/utils.pri)
|
||||
|
||||
HEADERS += opmapplugin.h \
|
||||
opmapgadgetoptionspage.h \
|
||||
opmapgadgetfactory.h \
|
||||
opmapgadgetconfiguration.h \
|
||||
opmapgadget.h \
|
||||
opmapgadgetwidget.h \
|
||||
opmap_waypointeditor_dialog.h \
|
||||
opmap_edit_waypoint_dialog.h \
|
||||
opmap_zoom_slider_widget.h \
|
||||
opmap_statusbar_widget.h \
|
||||
opmap_overlay_widget.h \
|
||||
pathplanmanager.h
|
||||
|
||||
SOURCES += opmapplugin.cpp \
|
||||
opmapgadgetwidget.cpp \
|
||||
opmapgadgetoptionspage.cpp \
|
||||
opmapgadgetfactory.cpp \
|
||||
opmapgadgetconfiguration.cpp \
|
||||
opmapgadget.cpp \
|
||||
opmap_waypointeditor_dialog.cpp \
|
||||
opmap_edit_waypoint_dialog.cpp \
|
||||
opmap_zoom_slider_widget.cpp \
|
||||
opmap_statusbar_widget.cpp \
|
||||
opmap_overlay_widget.cpp \
|
||||
pathplanmanager.cpp
|
||||
|
||||
OTHER_FILES += OPMapGadget.pluginspec
|
||||
|
||||
FORMS += opmapgadgetoptionspage.ui \
|
||||
opmap_widget.ui \
|
||||
opmap_waypointeditor_dialog.ui \
|
||||
opmap_edit_waypoint_dialog.ui \
|
||||
opmap_zoom_slider_widget.ui \
|
||||
opmap_statusbar_widget.ui \
|
||||
opmap_overlay_widget.ui \
|
||||
pathplanmanager.ui
|
||||
|
||||
RESOURCES += opmap.qrc
|
||||
|
@ -63,6 +63,8 @@ private:
|
||||
QString original_description;
|
||||
double original_distance;
|
||||
double original_bearing;
|
||||
|
||||
|
||||
mapcontrol::WayPointItem::wptype original_type;
|
||||
|
||||
mapcontrol::WayPointItem *waypoint_item;
|
||||
|
@ -146,7 +146,6 @@ private slots:
|
||||
*
|
||||
* Some are currently disabled for the v1.0 plugin version.
|
||||
*/
|
||||
void comboBoxFindPlace_returnPressed();
|
||||
void on_toolButtonZoomM_clicked();
|
||||
void on_toolButtonZoomP_clicked();
|
||||
void on_toolButtonMapHome_clicked();
|
||||
|
60
ground/openpilotgcs/src/plugins/opmap/pathplanmanager.cpp
Normal file
60
ground/openpilotgcs/src/plugins/opmap/pathplanmanager.cpp
Normal file
@ -0,0 +1,60 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file pathplanmanager.cpp
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup OPMapPlugin OpenPilot Map Plugin
|
||||
* @{
|
||||
* @brief The OpenPilot Map plugin
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* 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 "pathplanmanager.h"
|
||||
#include "ui_pathplanmanager.h"
|
||||
|
||||
pathPlanManager::pathPlanManager(QWidget *parent,OPMapWidget *map):
|
||||
QWidget(parent),myMap(map),
|
||||
ui(new Ui::pathPlanManager)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
connect(myMap,SIGNAL(WPDeleted(int)),this,SLOT(on_WPDeleted(int)));
|
||||
connect(myMap,SIGNAL(WPInserted(int,WayPointItem*)),this,SLOT(on_WPInserted(int,WayPointItem*)));
|
||||
connect(myMap,SIGNAL(WPNumberChanged(int,int,WayPointItem*)),this,SLOT(on_WPNumberChanged(int,int,WayPointItem*)));
|
||||
connect(myMap,SIGNAL(WPValuesChanged(WayPointItem*)),this,SLOT(on_WPValuesChanged(WayPointItem*)));
|
||||
|
||||
}
|
||||
|
||||
pathPlanManager::~pathPlanManager()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
void pathPlanManager::on_WPDeleted(int wp_number)
|
||||
{
|
||||
}
|
||||
|
||||
void pathPlanManager::on_WPInserted(int wp_number, WayPointItem * wp)
|
||||
{
|
||||
}
|
||||
|
||||
void pathPlanManager::on_WPNumberChanged(int oldNumber, int newNumber, WayPointItem * wp)
|
||||
{
|
||||
}
|
||||
|
||||
void pathPlanManager::on_WPValuesChanged(WayPointItem * wp)
|
||||
{
|
||||
}
|
65
ground/openpilotgcs/src/plugins/opmap/pathplanmanager.h
Normal file
65
ground/openpilotgcs/src/plugins/opmap/pathplanmanager.h
Normal file
@ -0,0 +1,65 @@
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @file pathplanmanager.h
|
||||
* @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010.
|
||||
* @addtogroup GCSPlugins GCS Plugins
|
||||
* @{
|
||||
* @addtogroup OPMapPlugin OpenPilot Map Plugin
|
||||
* @{
|
||||
* @brief The OpenPilot Map plugin
|
||||
*****************************************************************************/
|
||||
/*
|
||||
* 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 PATHPLANMANAGER_H
|
||||
#define PATHPLANMANAGER_H
|
||||
|
||||
#include <QWidget>
|
||||
#include "opmapcontrol/opmapcontrol.h"
|
||||
|
||||
namespace Ui {
|
||||
class pathPlanManager;
|
||||
}
|
||||
using namespace mapcontrol;
|
||||
class pathPlanManager : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
struct customData
|
||||
{
|
||||
float velocity;
|
||||
int mode;
|
||||
float mode_params[4];
|
||||
int condition;
|
||||
float condition_params[4];
|
||||
int command;
|
||||
int jumpdestination;
|
||||
int errordestination;
|
||||
};
|
||||
public:
|
||||
explicit pathPlanManager(QWidget *parent,OPMapWidget * map);
|
||||
~pathPlanManager();
|
||||
private slots:
|
||||
void on_WPDeleted(int);
|
||||
void on_WPInserted(int,WayPointItem*);
|
||||
void on_WPNumberChanged(int,int,WayPointItem*);
|
||||
void on_WPValuesChanged(WayPointItem*);
|
||||
private:
|
||||
Ui::pathPlanManager *ui;
|
||||
OPMapWidget * myMap;
|
||||
};
|
||||
|
||||
#endif // PATHPLANMANAGER_H
|
21
ground/openpilotgcs/src/plugins/opmap/pathplanmanager.ui
Normal file
21
ground/openpilotgcs/src/plugins/opmap/pathplanmanager.ui
Normal file
@ -0,0 +1,21 @@
|
||||
<ui version="4.0">
|
||||
<author/>
|
||||
<comment/>
|
||||
<exportmacro/>
|
||||
<class>pathPlanManager</class>
|
||||
<widget class="QWidget" name="pathPlanManager">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>400</width>
|
||||
<height>300</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
</widget>
|
||||
<pixmapfunction/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
x
Reference in New Issue
Block a user