/** ****************************************************************************** * @file waypointeditorgadgetwidget.cpp * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012. * @addtogroup Waypoint Editor GCS Plugins * @{ * @addtogroup WaypointEditorGadgetPlugin Waypoint Editor Gadget Plugin * @{ * @brief A gadget to edit a list of waypoints *****************************************************************************/ /* * 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 "waypointeditorgadgetwidget.h" #include "ui_waypointeditor.h" #include #include #include #include #include #include #include #include "extensionsystem/pluginmanager.h" WaypointEditorGadgetWidget::WaypointEditorGadgetWidget(QWidget *parent) : QLabel(parent) { m_waypointeditor = new Ui_WaypointEditor(); m_waypointeditor->setupUi(this); waypointTable = new WaypointTable(this); m_waypointeditor->waypoints->setModel(waypointTable); // Get the objects used here ExtensionSystem::PluginManager *pm = ExtensionSystem::PluginManager::instance(); Q_ASSERT(pm != NULL); UAVObjectManager *objManager = pm->getObject(); Q_ASSERT(objManager != NULL); waypointActiveObj = WaypointActive::GetInstance(objManager); Q_ASSERT(waypointActiveObj != NULL); // Connect the signals connect(waypointActiveObj, SIGNAL(objectUpdated(UAVObject*)), this, SLOT(waypointActiveChanged(UAVObject*))); connect(m_waypointeditor->buttonNewWaypoint, SIGNAL(clicked()), this, SLOT(addInstance())); } WaypointEditorGadgetWidget::~WaypointEditorGadgetWidget() { // Do nothing } void WaypointEditorGadgetWidget::waypointChanged(UAVObject *) { } void WaypointEditorGadgetWidget::waypointActiveChanged(UAVObject *) { } void WaypointEditorGadgetWidget::addInstance() { } /** * @} * @} */