From 3a66b7ce99db56942764801e34dd6a370bcfc3ba Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Fri, 25 Sep 2015 10:23:51 -0700 Subject: [PATCH] Remove Parameter Editor widget Too complicated supporting both modes as editor becomes more complex --- QGCApplication.pro | 2 -- qgroundcontrol.qrc | 1 - src/VehicleSetup/SetupParameterEditor.qml | 2 +- src/ViewWidgets/ParameterEditorWidget.cc | 37 -------------------- src/ViewWidgets/ParameterEditorWidget.h | 40 --------------------- src/ViewWidgets/ParameterEditorWidget.qml | 42 ----------------------- src/ui/MainWindow.cc | 4 --- src/ui/MainWindow.h | 2 -- 8 files changed, 1 insertion(+), 129 deletions(-) delete mode 100644 src/ViewWidgets/ParameterEditorWidget.cc delete mode 100644 src/ViewWidgets/ParameterEditorWidget.h delete mode 100644 src/ViewWidgets/ParameterEditorWidget.qml diff --git a/QGCApplication.pro b/QGCApplication.pro index 1087d22aaf..1e2ca3715b 100644 --- a/QGCApplication.pro +++ b/QGCApplication.pro @@ -335,7 +335,6 @@ HEADERS += \ src/ui/WaypointViewOnlyView.h \ src/ViewWidgets/CustomCommandWidget.h \ src/ViewWidgets/CustomCommandWidgetController.h \ - src/ViewWidgets/ParameterEditorWidget.h \ src/ViewWidgets/ViewWidgetController.h \ src/MissionItem.h \ src/AutoPilotPlugins/PX4/PX4AirframeLoader.h @@ -464,7 +463,6 @@ SOURCES += \ src/ui/WaypointViewOnlyView.cc \ src/ViewWidgets/CustomCommandWidget.cc \ src/ViewWidgets/CustomCommandWidgetController.cc \ - src/ViewWidgets/ParameterEditorWidget.cc \ src/ViewWidgets/ViewWidgetController.cc \ src/MissionItem.cc \ src/AutoPilotPlugins/PX4/PX4AirframeLoader.cc diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc index 117e51de5c..34396fe338 100644 --- a/qgroundcontrol.qrc +++ b/qgroundcontrol.qrc @@ -110,7 +110,6 @@ src/VehicleSetup/SetupParameterEditor.qml src/QmlControls/ScreenToolsFontQuery.qml - src/ViewWidgets/ParameterEditorWidget.qml src/ViewWidgets/CustomCommandWidget.qml src/AutoPilotPlugins/PX4/SafetyComponent.qml src/AutoPilotPlugins/PX4/RadioComponent.qml diff --git a/src/VehicleSetup/SetupParameterEditor.qml b/src/VehicleSetup/SetupParameterEditor.qml index 5856f086b8..61265880c4 100644 --- a/src/VehicleSetup/SetupParameterEditor.qml +++ b/src/VehicleSetup/SetupParameterEditor.qml @@ -29,5 +29,5 @@ import QGroundControl.ScreenTools 1.0 import QGroundControl.Palette 1.0 ParameterEditor { - fullMode: true + } diff --git a/src/ViewWidgets/ParameterEditorWidget.cc b/src/ViewWidgets/ParameterEditorWidget.cc deleted file mode 100644 index a1151c038c..0000000000 --- a/src/ViewWidgets/ParameterEditorWidget.cc +++ /dev/null @@ -1,37 +0,0 @@ -/*===================================================================== - -QGroundControl Open Source Ground Control Station - -(c) 2009, 2010 QGROUNDCONTROL PROJECT - -This file is part of the QGROUNDCONTROL project - - QGROUNDCONTROL 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. - - QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see . - -======================================================================*/ - -/** - * @file - * @brief Definition of class ParameterEditorWidget - * @author Lorenz Meier - * - */ - -#include "ParameterEditorWidget.h" - -ParameterEditorWidget::ParameterEditorWidget(QWidget *parent) : - QGCQmlWidgetHolder(parent) -{ - setSource(QUrl::fromUserInput("qrc:/qml/ParameterEditorWidget.qml")); -} diff --git a/src/ViewWidgets/ParameterEditorWidget.h b/src/ViewWidgets/ParameterEditorWidget.h deleted file mode 100644 index 809d647e6d..0000000000 --- a/src/ViewWidgets/ParameterEditorWidget.h +++ /dev/null @@ -1,40 +0,0 @@ -/*===================================================================== - -QGroundControl Open Source Ground Control Station - -(c) 2009, 2015 QGROUNDCONTROL PROJECT - -This file is part of the QGROUNDCONTROL project - - QGROUNDCONTROL 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. - - QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see . - -======================================================================*/ - -/// @file -/// @author Don Gagne - -#ifndef PARAMETEREDITORWIDGET_H -#define PARAMETEREDITORWIDGET_H - -#include "QGCQmlWidgetHolder.h" - -class ParameterEditorWidget : public QGCQmlWidgetHolder -{ - Q_OBJECT - -public: - ParameterEditorWidget(QWidget *parent = 0); -}; - -#endif diff --git a/src/ViewWidgets/ParameterEditorWidget.qml b/src/ViewWidgets/ParameterEditorWidget.qml deleted file mode 100644 index 234dee17ab..0000000000 --- a/src/ViewWidgets/ParameterEditorWidget.qml +++ /dev/null @@ -1,42 +0,0 @@ -/*===================================================================== - -QGroundControl Open Source Ground Control Station - -(c) 2009, 2015 QGROUNDCONTROL PROJECT - -This file is part of the QGROUNDCONTROL project - -QGROUNDCONTROL 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. - -QGROUNDCONTROL 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 QGROUNDCONTROL. If not, see . - -======================================================================*/ - -/// @file -/// @author Don Gagne - -import QtQuick 2.2 - -import QGroundControl.Palette 1.0 -import QGroundControl.Controls 1.0 - -ViewWidget { - connectedComponent: editorComponent - - Component { - id: editorComponent - - ParameterEditor { - fullMode: false - } - } -} diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc index a69a0bb2d2..dc01ef034d 100644 --- a/src/ui/MainWindow.cc +++ b/src/ui/MainWindow.cc @@ -90,7 +90,6 @@ const char* MainWindow::_uasControlDockWidgetName = "UNMANNED_SYSTEM_CONTROL_DOC const char* MainWindow::_uasListDockWidgetName = "UNMANNED_SYSTEM_LIST_DOCKWIDGET"; const char* MainWindow::_waypointsDockWidgetName = "WAYPOINT_LIST_DOCKWIDGET"; const char* MainWindow::_mavlinkDockWidgetName = "MAVLINK_INSPECTOR_DOCKWIDGET"; -const char* MainWindow::_parametersDockWidgetName = "PARAMETER_INTERFACE_DOCKWIDGET"; const char* MainWindow::_customCommandWidgetName = "CUSTOM_COMMAND_DOCKWIDGET"; const char* MainWindow::_filesDockWidgetName = "FILE_VIEW_DOCKWIDGET"; const char* MainWindow::_uasStatusDetailsDockWidgetName = "UAS_STATUS_DETAILS_DOCKWIDGET"; @@ -393,7 +392,6 @@ void MainWindow::_buildCommonWidgets(void) { _uasListDockWidgetName, "Unmanned Systems", Qt::RightDockWidgetArea }, { _waypointsDockWidgetName, "Mission Plan", Qt::BottomDockWidgetArea }, { _mavlinkDockWidgetName, "MAVLink Inspector", Qt::RightDockWidgetArea }, - { _parametersDockWidgetName, "Parameter Editor", Qt::RightDockWidgetArea }, { _customCommandWidgetName, "Custom Command", Qt::RightDockWidgetArea }, { _filesDockWidgetName, "Onboard Files", Qt::RightDockWidgetArea }, { _uasStatusDetailsDockWidgetName, "Status Details", Qt::RightDockWidgetArea }, @@ -497,8 +495,6 @@ void MainWindow::_createInnerDockWidget(const QString& widgetName) widget = new QGCWaypointListMulti(this); } else if (widgetName == _mavlinkDockWidgetName) { widget = new QGCMAVLinkInspector(MAVLinkProtocol::instance(),this); - } else if (widgetName == _parametersDockWidgetName) { - widget = new ParameterEditorWidget(this); } else if (widgetName == _customCommandWidgetName) { widget = new CustomCommandWidget(this); } else if (widgetName == _filesDockWidgetName) { diff --git a/src/ui/MainWindow.h b/src/ui/MainWindow.h index 5d64f5457a..ed76bbc4a8 100644 --- a/src/ui/MainWindow.h +++ b/src/ui/MainWindow.h @@ -49,7 +49,6 @@ This file is part of the QGROUNDCONTROL project #if (defined QGC_MOUSE_ENABLED_WIN) | (defined QGC_MOUSE_ENABLED_LINUX) #include "Mouse6dofInput.h" #endif // QGC_MOUSE_ENABLED_WIN -#include "ParameterEditorWidget.h" #include "opmapcontrol.h" #include "MainToolBar.h" #include "LogCompressor.h" @@ -291,7 +290,6 @@ private: static const char* _uasListDockWidgetName; static const char* _waypointsDockWidgetName; static const char* _mavlinkDockWidgetName; - static const char* _parametersDockWidgetName; static const char* _customCommandWidgetName; static const char* _filesDockWidgetName; static const char* _uasStatusDetailsDockWidgetName; -- GitLab