Advertisement
Guest User

Untitled

a guest
Mar 11th, 2020
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.31 KB | None | 0 0
  1. From 2fa8fc1aae829c6ddc50e25832dfe8f5b02a2484 Mon Sep 17 00:00:00 2001
  2. From: astrid hvalman <astrid.hvalman@gmail.com>
  3. Date: Mon, 9 Mar 2020 18:42:48 -0700
  4. Subject: [PATCH] QGC :: moved map to separate widget
  5.  
  6. ---
  7. .gitignore | 1 +
  8. px4-firmware/qgroundcontrol/qgroundcontrol.pro | 1 +
  9. px4-firmware/qgroundcontrol/qgroundcontrol.qrc | 1 +
  10. px4-firmware/qgroundcontrol/src/QGCApplication.cc | 16 ++++
  11. px4-firmware/qgroundcontrol/src/ui/CMakeLists.txt | 1 +
  12. px4-firmware/qgroundcontrol/src/ui/MainWindow.cc | 5 ++
  13. px4-firmware/qgroundcontrol/src/ui/MainWindow.h | 1 +
  14. .../qgroundcontrol/src/ui/MainWindowInner.qml | 36 +++------
  15. px4-firmware/qgroundcontrol/src/ui/QGCFlightMap.cc | 90 ++++++++++++++++++++++
  16. px4-firmware/qgroundcontrol/src/ui/QGCFlightMap.h | 63 +++++++++++++++
  17. .../qgroundcontrol/src/ui/QGCFlightMapWidget.qml | 49 ++++++++++++
  18. .../src/ui/QGCFlightMapWidgetHolder.ui | 41 ++++++++++
  19. .../qgroundcontrol/src/ui/toolbar/MainToolBar.qml | 16 +---
  20. 13 files changed, 280 insertions(+), 41 deletions(-)
  21. create mode 100644 px4-firmware/qgroundcontrol/src/ui/QGCFlightMap.cc
  22. create mode 100644 px4-firmware/qgroundcontrol/src/ui/QGCFlightMap.h
  23. create mode 100644 px4-firmware/qgroundcontrol/src/ui/QGCFlightMapWidget.qml
  24. create mode 100644 px4-firmware/qgroundcontrol/src/ui/QGCFlightMapWidgetHolder.ui
  25.  
  26. diff --git a/.gitignore b/.gitignore
  27. index c64df98..166bd19 100644
  28. --- a/.gitignore
  29. +++ b/.gitignore
  30. @@ -3,5 +3,6 @@
  31. /machine.bazelrc
  32. /working_dir
  33.  
  34. +px4-firmware/qgroundcontrol/.ycm_extra_conf.py
  35. scripts/automated_testing/mission_dataman
  36. *.swp
  37. diff --git a/px4-firmware/qgroundcontrol/qgroundcontrol.pro b/px4-firmware/qgroundcontrol/qgroundcontrol.pro
  38. index 139e42d..ccf94e9 100644
  39. --- a/px4-firmware/qgroundcontrol/qgroundcontrol.pro
  40. +++ b/px4-firmware/qgroundcontrol/qgroundcontrol.pro
  41. @@ -380,6 +380,7 @@ FORMS += \
  42. src/ui/MainWindow.ui \
  43. src/QGCQmlWidgetHolder.ui \
  44. src/ui/QGCStatus.ui \
  45. + src/ui/QGCFlightMapWidgetHolder.ui \
  46.  
  47. !MobileBuild {
  48. FORMS += \
  49. diff --git a/px4-firmware/qgroundcontrol/qgroundcontrol.qrc b/px4-firmware/qgroundcontrol/qgroundcontrol.qrc
  50. index 8ccf8cf..13cea6f 100644
  51. --- a/px4-firmware/qgroundcontrol/qgroundcontrol.qrc
  52. +++ b/px4-firmware/qgroundcontrol/qgroundcontrol.qrc
  53. @@ -44,6 +44,7 @@
  54. <file alias="LinkSettings.qml">src/ui/preferences/LinkSettings.qml</file>
  55. <file alias="LogDownloadPage.qml">src/AnalyzeView/LogDownloadPage.qml</file>
  56. <file alias="LogReplaySettings.qml">src/ui/preferences/LogReplaySettings.qml</file>
  57. + <file alias="QGCFlightMapWidget.qml">src/ui/QGCFlightMapWidget.qml</file>
  58. <file alias="MainWindowHybrid.qml">src/ui/MainWindowHybrid.qml</file>
  59. <file alias="MainWindowInner.qml">src/ui/MainWindowInner.qml</file>
  60. <file alias="MainWindowNative.qml">src/ui/MainWindowNative.qml</file>
  61. diff --git a/px4-firmware/qgroundcontrol/src/QGCApplication.cc b/px4-firmware/qgroundcontrol/src/QGCApplication.cc
  62. index 0d7e404..f115887 100644
  63. --- a/px4-firmware/qgroundcontrol/src/QGCApplication.cc
  64. +++ b/px4-firmware/qgroundcontrol/src/QGCApplication.cc
  65. @@ -16,6 +16,8 @@
  66. *
  67. */
  68.  
  69. +// #include <iostream>
  70. +
  71. #include <QFile>
  72. #include <QFlags>
  73. #include <QPixmap>
  74. @@ -151,6 +153,18 @@ static QObject* shapeFileHelperSingletonFactory(QQmlEngine*, QJSEngine*)
  75. return new ShapeFileHelper;
  76. }
  77.  
  78. +// TEST PURPOSES ONLY - collect all events for this object and it's siblings
  79. +// class FilterObject : public QObject {
  80. +//
  81. +// bool eventFilter(QObject *object, QEvent *event) {
  82. +// std::string first =(object->objectName()).toStdString() ;
  83. +// if (first.size())
  84. +// std::cout << first << ", " << std::endl;
  85. +// return false;
  86. +// }
  87. +//
  88. +// };
  89. +
  90. QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
  91. #ifdef __mobile__
  92. : QGuiApplication (argc, argv)
  93. @@ -389,6 +403,8 @@ QGCApplication::QGCApplication(int &argc, char* argv[], bool unitTesting)
  94. #endif /* __mobile__ */
  95.  
  96. _checkForNewVersion();
  97. + // FilterObject* f_o = new FilterObject;
  98. + // installEventFilter(f_o);
  99. }
  100.  
  101. void QGCApplication::_shutdown(void)
  102. diff --git a/px4-firmware/qgroundcontrol/src/ui/CMakeLists.txt b/px4-firmware/qgroundcontrol/src/ui/CMakeLists.txt
  103. index bcf1e0c..0e39d2d 100644
  104. --- a/px4-firmware/qgroundcontrol/src/ui/CMakeLists.txt
  105. +++ b/px4-firmware/qgroundcontrol/src/ui/CMakeLists.txt
  106. @@ -43,6 +43,7 @@ add_library(ui
  107. QGCMAVLinkLogPlayer.ui
  108. QGCPluginHost.ui
  109. QGCStatus.cc
  110. + QGCFlightMap.cc
  111. QGCUASFileView.ui
  112. QGCUASFileViewMulti.ui
  113. QMap3D.ui
  114. diff --git a/px4-firmware/qgroundcontrol/src/ui/MainWindow.cc b/px4-firmware/qgroundcontrol/src/ui/MainWindow.cc
  115. index cba09c0..3088ec7 100644
  116. --- a/px4-firmware/qgroundcontrol/src/ui/MainWindow.cc
  117. +++ b/px4-firmware/qgroundcontrol/src/ui/MainWindow.cc
  118. @@ -69,6 +69,7 @@ enum DockWidgetTypes {
  119. ONBOARD_FILES,
  120. HIL_CONFIG,
  121. STATUS,
  122. + FLIGHT_MAP,
  123. ANALYZE1,
  124. ANALYZE2,
  125. ANALYZE3,
  126. @@ -85,6 +86,7 @@ static const char *rgDockWidgetNames[] = {
  127. "Onboard Files",
  128. "HIL Config",
  129. "Status",
  130. + "Flight Map",
  131. "Analyze: Servos",
  132. "Analyze: Attitude",
  133. @@ -369,6 +371,9 @@ bool MainWindow::_createInnerDockWidget(const QString& widgetName)
  134. case STATUS:
  135. widget = new QGCStatus(widgetName, action, qgcApp()->toolbox()->mavlinkProtocol(), this);
  136. break;
  137. + case FLIGHT_MAP:
  138. + widget = new QGCFlightMap(widgetName, action, this);
  139. + break;
  140. }
  141. if(widget) {
  142. _mapName2DockWidget[widgetName] = widget;
  143. diff --git a/px4-firmware/qgroundcontrol/src/ui/MainWindow.h b/px4-firmware/qgroundcontrol/src/ui/MainWindow.h
  144. index b45126c..167052c 100644
  145. --- a/px4-firmware/qgroundcontrol/src/ui/MainWindow.h
  146. +++ b/px4-firmware/qgroundcontrol/src/ui/MainWindow.h
  147. @@ -34,6 +34,7 @@
  148. #include "QGCMAVLinkInspector.h"
  149. #include "QGCMAVLinkLogPlayer.h"
  150. #include "QGCStatus.h"
  151. +#include "QGCFlightMap.h"
  152. #include "MAVLinkDecoder.h"
  153. #include "Vehicle.h"
  154. #include "QGCDockWidget.h"
  155. diff --git a/px4-firmware/qgroundcontrol/src/ui/MainWindowInner.qml b/px4-firmware/qgroundcontrol/src/ui/MainWindowInner.qml
  156. index 2c9e581..99d2409 100644
  157. --- a/px4-firmware/qgroundcontrol/src/ui/MainWindowInner.qml
  158. +++ b/px4-firmware/qgroundcontrol/src/ui/MainWindowInner.qml
  159. @@ -33,7 +33,7 @@ Item {
  160. property var activeVehicle: QGroundControl.multiVehicleManager.activeVehicle
  161. property string formatedMessage: activeVehicle ? activeVehicle.formatedMessage : ""
  162.  
  163. - property var _viewList: [ settingsViewLoader, setupViewLoader, planViewLoader, flightView, analyzeViewLoader ]
  164. + property var _viewList: [ settingsViewLoader, setupViewLoader, planViewLoader, analyzeViewLoader ]
  165.  
  166. readonly property string _settingsViewSource: "AppSettings.qml"
  167. readonly property string _setupViewSource: "SetupView.qml"
  168. @@ -109,18 +109,6 @@ Item {
  169. planToolBar.visible = true
  170. }
  171.  
  172. - function showFlyView() {
  173. - mainWindow.enableToolbar()
  174. - rootLoader.sourceComponent = null
  175. - if(currentPopUp) {
  176. - currentPopUp.close()
  177. - }
  178. - ScreenTools.availableHeight = parent.height - toolBar.height
  179. - hideAllViews()
  180. - flightView.visible = true
  181. - toolBar.checkFlyButton()
  182. - }
  183. -
  184. function showAnalyzeView() {
  185. mainWindow.enableToolbar()
  186. rootLoader.sourceComponent = null
  187. @@ -278,11 +266,10 @@ Item {
  188. opacity: planToolBar.visible ? 0 : 1
  189. z: QGroundControl.zOrderTopMost
  190.  
  191. - Component.onCompleted: ScreenTools.availableHeight = parent.height - toolBar.height
  192. + Component.onCompleted: on_completed()
  193. onShowSettingsView: mainWindow.showSettingsView()
  194. onShowSetupView: mainWindow.showSetupView()
  195. onShowPlanView: mainWindow.showPlanView()
  196. - onShowFlyView: mainWindow.showFlyView()
  197. onShowAnalyzeView: mainWindow.showAnalyzeView()
  198. onArmVehicle: flightView.guidedController.confirmAction(flightView.guidedController.actionArm)
  199. onDisarmVehicle: {
  200. @@ -301,6 +288,12 @@ Item {
  201. enabled: false
  202. anchors.fill: parent
  203. }
  204. +
  205. + function on_completed (){
  206. + // this is done to minimize changes to QGC qml files
  207. + ScreenTools.availableHeight = parent.height - toolBar.height
  208. + mainWindow.showPlanView()
  209. + }
  210. }
  211.  
  212. PlanToolBar {
  213. @@ -313,7 +306,6 @@ Item {
  214.  
  215. onShowFlyView: {
  216. planToolBar.visible = false
  217. - mainWindow.showFlyView()
  218. }
  219. }
  220.  
  221. @@ -347,24 +339,16 @@ Item {
  222. Loader {
  223. id: planViewLoader
  224. anchors.fill: parent
  225. - visible: false
  226. + visible: true
  227.  
  228. property var toolbar: planToolBar
  229. - }
  230. -
  231. - FlightDisplayView {
  232. - id: flightView
  233. - anchors.fill: parent
  234. - visible: true
  235. - //-------------------------------------------------------------------------
  236. - //-- Loader helper for any child, no matter how deep can display an element
  237. - // on top of the video window.
  238. Loader {
  239. id: rootVideoLoader
  240. anchors.centerIn: parent
  241. }
  242. }
  243.  
  244. +
  245. Loader {
  246. id: analyzeViewLoader
  247. anchors.left: parent.left
  248. diff --git a/px4-firmware/qgroundcontrol/src/ui/QGCFlightMap.cc b/px4-firmware/qgroundcontrol/src/ui/QGCFlightMap.cc
  249. new file mode 100644
  250. index 0000000..9644b08
  251. --- /dev/null
  252. +++ b/px4-firmware/qgroundcontrol/src/ui/QGCFlightMap.cc
  253. @@ -0,0 +1,90 @@
  254. +#include <QScreen>
  255. +#include "QGCFlightMap.h"
  256. +#include "AppMessages.h"
  257. +#include "QGCApplication.h"
  258. +
  259. +#include "ui_QGCFlightMapWidgetHolder.h"
  260. +
  261. +
  262. +QGCFlightMapWidgetHolder::QGCFlightMapWidgetHolder(const QString& title, QAction* action, QWidget *parent) :
  263. + QGCDockWidget(title, action, parent),
  264. + _ui(new Ui::QGCFlightMapWidgetHolder)
  265. +{
  266. + _ui->setupUi(this);
  267. +
  268. + layout()->setContentsMargins(0,0,0,0);
  269. +
  270. + if (action) {
  271. + setWindowTitle(title);
  272. + }
  273. + setResizeMode(QQuickWidget::SizeRootObjectToView);
  274. +}
  275. +
  276. +QGCFlightMapWidgetHolder::~QGCFlightMapWidgetHolder()
  277. +{
  278. +
  279. +}
  280. +
  281. +bool QGCFlightMapWidgetHolder::setSource(const QUrl& qmlUrl)
  282. +{
  283. + return _ui->QGCFlightMapWidget->setSource(qmlUrl);
  284. +}
  285. +
  286. +// void QGCFlightMapWidgetHolder::setContextPropertyObject(const QString& name, QObject* object)
  287. +// {
  288. +// _ui->QGCFlightMapWidget->rootContext()->setContextProperty(name, object);
  289. +// }
  290. +
  291. +// QQmlContext* QGCFlightMapWidgetHolder::getRootContext(void)
  292. +// {
  293. +// return _ui->QGCFlightMapWidget->rootContext();
  294. +// }
  295. +//
  296. +// QQuickItem* QGCFlightMapWidgetHolder::getRootObject(void)
  297. +// {
  298. +// return _ui->QGCFlightMapWidget->rootObject();
  299. +// }
  300. +
  301. +// QQmlEngine* QGCFlightMapWidgetHolder::getEngine()
  302. +// {
  303. +// return _ui->QGCFlightMapWidget->engine();
  304. +// }
  305. +
  306. +void QGCFlightMapWidgetHolder::setResizeMode(QQuickWidget::ResizeMode resizeMode)
  307. +{
  308. + _ui->QGCFlightMapWidget->setResizeMode(resizeMode);
  309. +}
  310. +
  311. +QGCFlightMapWidgetHolder* createMapQmlWidgetHolder(QLayout *mainLayout, QWidget* parent)
  312. +{
  313. + QGCFlightMapWidgetHolder* pMainQmlWidgetHolder = new QGCFlightMapWidgetHolder(QString(), nullptr, parent);
  314. + mainLayout->addWidget(pMainQmlWidgetHolder);
  315. + pMainQmlWidgetHolder->setVisible(true);
  316. + QQmlEngine::setObjectOwnership(parent, QQmlEngine::CppOwnership);
  317. + pMainQmlWidgetHolder->setSource(QUrl::fromUserInput("qrc:qml/QGCFlightMapWidget.qml"));
  318. + return pMainQmlWidgetHolder;
  319. +}
  320. +
  321. +
  322. +QGCFlightMap::QGCFlightMap(const QString& title, QAction* action, QWidget *parent) :
  323. + QGCDockWidget(title, action, parent)
  324. +{
  325. + _centralLayout = new QVBoxLayout();
  326. + _centralLayout->setContentsMargins(0, 0, 0, 0);
  327. +
  328. + // FilterObject* f_o = new FilterObject;
  329. + // parent->installEventFilter(f_o);
  330. +
  331. + setLayout(_centralLayout);
  332. + _mainQmlWidgetHolder = createMapQmlWidgetHolder(_centralLayout, this);
  333. + QScreen* scr = QApplication::primaryScreen();
  334. + QSize scrSize = scr->availableSize();
  335. + if (scrSize.width() <= 1280) {
  336. + resize(scrSize.width(), scrSize.height());
  337. + } else {
  338. + int w = scrSize.width();
  339. + int h = scrSize.height();
  340. + resize(w, h);
  341. + move((scrSize.width() - w) / 2, (scrSize.height() - h) / 2);
  342. + }
  343. +};
  344. diff --git a/px4-firmware/qgroundcontrol/src/ui/QGCFlightMap.h b/px4-firmware/qgroundcontrol/src/ui/QGCFlightMap.h
  345. new file mode 100644
  346. index 0000000..4d0ec9b
  347. --- /dev/null
  348. +++ b/px4-firmware/qgroundcontrol/src/ui/QGCFlightMap.h
  349. @@ -0,0 +1,63 @@
  350. +#ifndef QGC_FLIGHT_MAP_WIDGET_H
  351. +#define QGC_FLIGHT_MAP_WIDGET_H
  352. +
  353. +#include <QVBoxLayout>
  354. +#include "QGCDockWidget.h"
  355. +#include <QQmlContext>
  356. +#include <QQuickItem>
  357. +#include <QQuickWidget>
  358. +
  359. +namespace Ui {
  360. + class QGCFlightMapWidgetHolder;
  361. +}
  362. +
  363. +/// This is used to create widgets which are implemented in QML.
  364. +
  365. +class QGCFlightMapWidgetHolder : public QGCDockWidget
  366. +{
  367. + Q_OBJECT
  368. +
  369. +public:
  370. + // This has a title and action since the base class is QGCDockWidget. In order to use this
  371. + // control as a normal QWidget, not a doc widget just pass in:
  372. + // title = QString()
  373. + // action = NULL
  374. + explicit QGCFlightMapWidgetHolder(const QString& title, QAction* action, QWidget *parent = 0);
  375. + ~QGCFlightMapWidgetHolder();
  376. +
  377. + /// Get Root Context
  378. + // QQmlContext* getRootContext(void);
  379. +
  380. + // /// Get Root Object
  381. + // QQuickItem* getRootObject(void);
  382. +
  383. + /// Get QML Engine
  384. + // QQmlEngine* getEngine();
  385. +
  386. + /// Sets the QML into the control. Will display errors message box if error occurs loading source.
  387. + /// @return true: source loaded, false: source not loaded, errors occurred
  388. + bool setSource(const QUrl& qmlUrl);
  389. +
  390. + // void setContextPropertyObject(const QString& name, QObject* object);
  391. +
  392. + /// Sets the resize mode for the QQuickWidget container
  393. + void setResizeMode(QQuickWidget::ResizeMode resizeMode);
  394. +
  395. +
  396. +private:
  397. + Ui::QGCFlightMapWidgetHolder *_ui;
  398. +};
  399. +
  400. +
  401. +class QGCFlightMap : public QGCDockWidget {
  402. +
  403. + Q_OBJECT
  404. +
  405. + public:
  406. + explicit QGCFlightMap(const QString& title, QAction* action, QWidget *parent);
  407. + QVBoxLayout* _centralLayout;
  408. + QGCFlightMapWidgetHolder* _mainQmlWidgetHolder;
  409. +
  410. +};
  411. +
  412. +#endif // QGC_FLIGHT_MAP_WIDGET_H
  413. diff --git a/px4-firmware/qgroundcontrol/src/ui/QGCFlightMapWidget.qml b/px4-firmware/qgroundcontrol/src/ui/QGCFlightMapWidget.qml
  414. new file mode 100644
  415. index 0000000..73d8e2a
  416. --- /dev/null
  417. +++ b/px4-firmware/qgroundcontrol/src/ui/QGCFlightMapWidget.qml
  418. @@ -0,0 +1,49 @@
  419. +/****************************************************************************
  420. + *
  421. + * (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
  422. + *
  423. + * QGroundControl is licensed according to the terms in the file
  424. + * COPYING.md in the root of the source code directory.
  425. + *
  426. + ****************************************************************************/
  427. +
  428. +
  429. +import QtQuick 2.3
  430. +import QtQuick.Controls 1.2
  431. +import QtQuick.Dialogs 1.2
  432. +import QtPositioning 5.3
  433. +
  434. +import QGroundControl 1.0
  435. +import QGroundControl.Palette 1.0
  436. +import QGroundControl.Controls 1.0
  437. +import QGroundControl.FlightDisplay 1.0
  438. +import QGroundControl.ScreenTools 1.0
  439. +import QGroundControl.MultiVehicleManager 1.0
  440. +
  441. +/// Inner common QML for mainWindow
  442. +Item {
  443. +
  444. + id: mainWindow
  445. + QGCPalette { id: qgcPal; colorGroupEnabled: true }
  446. + onHeightChanged: {
  447. + ScreenTools.availableHeight = parent.height
  448. + }
  449. +
  450. +
  451. + function enableToolbar() {}
  452. +
  453. + FlightDisplayView {
  454. + id: flightView
  455. + anchors.fill: parent
  456. + visible: true
  457. + Loader {
  458. + id: rootVideoLoader
  459. + anchors.centerIn: parent
  460. + }
  461. + }
  462. +
  463. + Loader {
  464. + id: rootLoader
  465. + anchors.centerIn: parent
  466. + }
  467. +}
  468. diff --git a/px4-firmware/qgroundcontrol/src/ui/QGCFlightMapWidgetHolder.ui b/px4-firmware/qgroundcontrol/src/ui/QGCFlightMapWidgetHolder.ui
  469. new file mode 100644
  470. index 0000000..6f7a0a7
  471. --- /dev/null
  472. +++ b/px4-firmware/qgroundcontrol/src/ui/QGCFlightMapWidgetHolder.ui
  473. @@ -0,0 +1,41 @@
  474. +<?xml version="1.0" encoding="UTF-8"?>
  475. +<ui version="4.0">
  476. + <class>QGCFlightMapWidgetHolder</class>
  477. + <widget class="QWidget" name="QGCFlightMapWidgetHolder">
  478. + <property name="geometry">
  479. + <rect>
  480. + <x>0</x>
  481. + <y>0</y>
  482. + <width>1400</width>
  483. + <height>700</height>
  484. + </rect>
  485. + </property>
  486. + <property name="windowTitle">
  487. + <string>Form</string>
  488. + </property>
  489. + <layout class="QVBoxLayout" name="verticalLayout">
  490. + <item>
  491. + <widget class="QGCQuickWidget" name="QGCFlightMapWidget">
  492. + <property name="acceptDrops">
  493. + <bool>true</bool>
  494. + </property>
  495. + </widget>
  496. + </item>
  497. + </layout>
  498. + </widget>
  499. + <customwidgets>
  500. + <customwidget>
  501. + <class>QQuickWidget</class>
  502. + <extends>QWidget</extends>
  503. + <header>QQuickWidget</header>
  504. + </customwidget>
  505. + <customwidget>
  506. + <class>QGCQuickWidget</class>
  507. + <extends>QQuickWidget</extends>
  508. + <header>QGCQuickWidget.h</header>
  509. + <container>1</container>
  510. + </customwidget>
  511. + </customwidgets>
  512. + <resources/>
  513. + <connections/>
  514. +</ui>
  515. diff --git a/px4-firmware/qgroundcontrol/src/ui/toolbar/MainToolBar.qml b/px4-firmware/qgroundcontrol/src/ui/toolbar/MainToolBar.qml
  516. index 4424569..a7c5854 100644
  517. --- a/px4-firmware/qgroundcontrol/src/ui/toolbar/MainToolBar.qml
  518. +++ b/px4-firmware/qgroundcontrol/src/ui/toolbar/MainToolBar.qml
  519. @@ -30,7 +30,6 @@ Rectangle {
  520. signal showSettingsView
  521. signal showSetupView
  522. signal showPlanView
  523. - signal showFlyView
  524. signal showAnalyzeView
  525. signal armVehicle
  526. signal disarmVehicle
  527. @@ -49,17 +48,13 @@ Rectangle {
  528. planButton.checked = true
  529. }
  530.  
  531. - function checkFlyButton() {
  532. - flyButton.checked = true
  533. - }
  534. -
  535. function checkAnalyzeButton() {
  536. analyzeButton.checked = true
  537. }
  538.  
  539. Component.onCompleted: {
  540. //-- TODO: Get this from the actual state
  541. - flyButton.checked = true
  542. + // flyButton.checked = true
  543. }
  544.  
  545. // Prevent all clicks from going through to lower layers
  546. @@ -122,15 +117,6 @@ Rectangle {
  547. }
  548.  
  549. QGCToolBarButton {
  550. - id: flyButton
  551. - anchors.top: parent.top
  552. - anchors.bottom: parent.bottom
  553. - exclusiveGroup: mainActionGroup
  554. - source: "/qmlimages/PaperPlane.svg"
  555. - onClicked: toolBar.showFlyView()
  556. - }
  557. -
  558. - QGCToolBarButton {
  559. id: analyzeButton
  560. anchors.top: parent.top
  561. anchors.bottom: parent.bottom
  562. --
  563. 2.7.4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement