diff --git a/QGCInstaller.pri b/QGCInstaller.pri index d7a335ef9f972ed3c19f5395eafaa5c907de1d56..740c39891bf0d78380d531b8e4da61ca341503d8 100644 --- a/QGCInstaller.pri +++ b/QGCInstaller.pri @@ -19,10 +19,16 @@ installer { MacBuild { - QMAKE_POST_LINK += && $$dirname(QMAKE_QMAKE)/macdeployqt $${DESTDIR}/qgroundcontrol.app - QMAKE_POST_LINK += && hdiutil create -layout SPUD -srcfolder $${DESTDIR}/qgroundcontrol.app -volname QGroundControl $${DESTDIR}/qgroundcontrol.dmg + # We copy qgroundcontrol.app to the current directory so we can run macdeployqt without a path to the + # qgroundcontrol.app file. If you specify a path to the .app file the symbolic links to plugins will not + # be created correctly. + QMAKE_POST_LINK += && rm -rf qgroundcontrol.app + QMAKE_POST_LINK += && cp -r $${DESTDIR}/qgroundcontrol.app . + QMAKE_POST_LINK += && $$dirname(QMAKE_QMAKE)/macdeployqt qgroundcontrol.app -verbose=2 -qmldir=src -dmg + QMAKE_POST_LINK += && rm -rf qgroundcontrol.app + QMAKE_POST_LINK += && mv qgroundcontrol.dmg release } - + WindowsBuild { QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\$${TARGET}.exp") QMAKE_POST_LINK += $$escape_expand(\\n) $$quote(del /F "$$DESTDIR_WIN\\$${TARGET}.ilk") diff --git a/QGCSetup.pri b/QGCSetup.pri index 76db02aaba0087ed82a650ae232e7f8c125077e0..13c486f5408b64407a54ae6420840f9d5f9a7038 100644 --- a/QGCSetup.pri +++ b/QGCSetup.pri @@ -53,7 +53,7 @@ WindowsBuild { MacBuild { # Copy non-standard libraries and frameworks into app package QMAKE_POST_LINK += && $$QMAKE_COPY_DIR $$BASEDIR/libs/lib/mac64/lib $$DESTDIR/$${TARGET}.app/Contents/libs - QMAKE_POST_LINK += && $$QMAKE_COPY_DIR -L $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents/Frameworks + QMAKE_POST_LINK += && $$QMAKE_COPY_DIR -L $$BASEDIR/libs/lib/Frameworks $$DESTDIR/$${TARGET}.app/Contents # Fix library paths inside executable diff --git a/README.md b/README.md index 827cd8642bd3ac88fcad601f7ed69b7d258f16c8..54e5b2154fa00d42a09a412d8b208fcbd59fb4fb 100644 --- a/README.md +++ b/README.md @@ -51,28 +51,25 @@ Supported builds are 64 bit, built using the clang compiler. #### Install QT - - - -1. Download Qt 5.3 from: +1. Download Qt 5.4 from: 2. Double click the package installer and follow instructions. #### Build QGroundControl 1. From the terminal change directory to your `groundcontrol` directory -2. Run `~/Qt5.3.1/5.3/clang_64/bin/qmake qgroundcontrol.pro -r -spec macx-clang`. If you installed a different version of Qt, or installed to a different location you may need to change the first portion of the path. +2. Run `~/Qt/5.4/clang_64/bin/qmake qgroundcontrol.pro -r -spec macx-clang`. If you installed a different version of Qt, or installed to a different location you may need to change the first portion of the path. 3. Run `make` ### Build on Linux Supported builds for Linux are 32 or 64-bit, built using gcc. -#### Install Qt5.3+ and SDL1.2 prerequistites -* For Ubuntu (requires 14.10 for Qt5.3): `sudo apt-get install qtcreator qttools5-dev qtbase5-dev qt5-default qtdeclarative5-dev libqt5serialport5-dev libqt5svg5-dev libqt5webkit5-dev libsdl1.2-dev build-essential libudev-dev qml-module-qtgraphicaleffects` +#### Install Qt5.4 and SDL1.2 prerequistites * For Fedora: `sudo yum install qt-creator qt5-qtbase-devel qt5-qtdeclarative-devel qt5-qtserialport-devel qt5-qtsvg-devel qt5-qtwebkit-devel SDL-devel SDL-static systemd-devel` * For Arch Linux: `pacman -Sy qtcreator qt5-base qt5-declarative qt5-serialport qt5-svg qt5-webkit` - -##### Install Qt5.3+ from PPA -Note: Please be aware that the time of writing, Qt5.3 is unavailable in the official repositories Ubuntu 14.04/Mint 17.*. If it has become available since, please follow the instructions for installing Qt5.3 on Ubuntu. -* Add this PPA to your sources.list: `ppa:beineri/opt-qt532-trusty` -* Run the following in your terminal: `sudo apt-get update && sudo apt-get install qt53tools qt53base qt53declarative qt53serialport qt53svg qt53webkit qt53quickcontrols qt53graphicaleffects` -* Next, set the environment variables by executing in the terminal: `source /opt/qt53/bin/qt53-env.sh` or copy and paste the contents to your `~/.profile` file to set them on login. -* Verify that the variables have been set: `echo $PATH && echo $QTDIR`. The output should read `/opt/qt53/bin:...` and `/opt/qt53`. +* For Ubuntu: Please be aware that the time of writing, Qt5.4 is unavailable in the official repositories Ubuntu 14.04/Mint 17.*. + * Add this PPA to your sources.list: `ppa:beineri/opt-qt54-trusty` + * Run the following in your terminal: `sudo apt-get update && sudo apt-get install qt54tools qt54base qt54declarative qt54serialport qt54svg qt54webkit qt54quickcontrols qt54xmlpatterns qt54x11extras qt54websockets qt54sensors qt54script qt54quick1 qt54qbs qt54multimedia qt54location qt54imageformats qt54graphicaleffects qt54creator qt54connectivity` + * Next, set the environment variables by executing in the terminal: `source /opt/qt53/bin/qt53-env.sh` or copy and paste the contents to your `~/.profile` file to set them on login. + * Verify that the variables have been set: `echo $PATH && echo $QTDIR`. The output should read `/opt/qt53/bin:...` and `/opt/qt53`. #### [Optional] Install additional libraries * For text-to-speech (espeak) @@ -95,8 +92,8 @@ Supported builds for Windows are 32 bit only built using Visual Studio 2013 or h #### Install Visual Studio Express 2013 Only compilation using Visual Studio 2013 is supported. Download and install Visual Studio Express Edition (free) from here: . Make sure you install the Windows Desktop version. -#### Install QT -Download Qt 5.3 from here: +#### Install Qt5.4 +Download Qt 5.4 from here: * The Qt variant should be for VS 2013, 32 bit (not 64) and include opengl. #### Build QGroundControl diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index c586014d20375cc74a39920007e3fda7eb158f97..501c285c9daecd5cd73d644bf3ea98603eef5588 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -29,8 +29,8 @@ exists(user_config.pri):infile(user_config.pri, CONFIG) { # to allow us to easily modify suported build types in one place instead of duplicated throughout # the project file. -!equals(QT_MAJOR_VERSION, 5) | !greaterThan(QT_MINOR_VERSION, 1) { - error("Unsupported Qt version, 5.2+ is required") +!equals(QT_MAJOR_VERSION, 5) | !greaterThan(QT_MINOR_VERSION, 3) { + error("Unsupported Qt version, 5.4+ is required") } linux { @@ -117,6 +117,7 @@ QT += network \ serialport \ sql \ printsupport \ + qml \ quick \ quickwidgets @@ -184,7 +185,8 @@ WindowsBuild { QMAKE_CXXFLAGS_WARN_ON += /W3 \ /wd4996 \ # silence warnings about deprecated strcpy and whatnot /wd4005 \ # silence warnings about macro redefinition - /wd4290 # ignore exception specifications + /wd4290 \ # ignore exception specifications + /Zc:strictStrings- # work around win 8.1 sdk sapi.h problem WarningsAsErrorsOn { QMAKE_CXXFLAGS_WARN_ON += /WX } diff --git a/src/QGCQmlWidgetHolder.cpp b/src/QGCQmlWidgetHolder.cpp index 986633c5e0eec7e4972c1412daa7db0c35db1b33..5da881ce4b7891a57bc0eef367c52bf07ce3027c 100644 --- a/src/QGCQmlWidgetHolder.cpp +++ b/src/QGCQmlWidgetHolder.cpp @@ -25,6 +25,7 @@ /// @author Don Gagne #include "QGCQmlWidgetHolder.h" +#include "QGCMessageBox.h" QGCQmlWidgetHolder::QGCQmlWidgetHolder(QWidget *parent) : QWidget(parent) @@ -43,8 +44,19 @@ void QGCQmlWidgetHolder::setAutoPilot(AutoPilotPlugin* autoPilot) _ui.qmlWidget->rootContext()->setContextProperty("autopilot", autoPilot); } -void QGCQmlWidgetHolder::setSource(const QUrl& qmlUrl) +bool QGCQmlWidgetHolder::setSource(const QUrl& qmlUrl) { _ui.qmlWidget->setSource(qmlUrl); - _ui.qmlWidget->setMinimumSize(_ui.qmlWidget->rootObject()->width(), _ui.qmlWidget->rootObject()->height()); + if (_ui.qmlWidget->status() != QQuickWidget::Ready) { + QString errorList; + + foreach (QQmlError error, _ui.qmlWidget->errors()) { + errorList += error.toString(); + errorList += "\n"; + } + QGCMessageBox::warning(tr("Qml Error"), tr("Source not ready: %1\nErrors:\n%2").arg(_ui.qmlWidget->status()).arg(errorList)); + return false; + } + + return true; } diff --git a/src/QGCQmlWidgetHolder.h b/src/QGCQmlWidgetHolder.h index 90b8e084c53c743cf0fe25759640a0c2ee6be1b4..0cfb8a9996f17a4c685658bd3a388f6939c2ac1b 100644 --- a/src/QGCQmlWidgetHolder.h +++ b/src/QGCQmlWidgetHolder.h @@ -50,7 +50,7 @@ public: void setAutoPilot(AutoPilotPlugin* autoPilot); /// Sets the QML into the control - void setSource(const QUrl& qmlUrl); + bool setSource(const QUrl& qmlUrl); private: Ui::QGCQmlWidgetHolder _ui; diff --git a/src/VehicleSetup/FirmwareUpgrade.qml b/src/VehicleSetup/FirmwareUpgrade.qml index 8545a450daddc9a97b8ff867752971625d70056c..85ae1a0000e11fdf9dcbb8742c9e99b429903542 100644 --- a/src/VehicleSetup/FirmwareUpgrade.qml +++ b/src/VehicleSetup/FirmwareUpgrade.qml @@ -1,4 +1,4 @@ -import QtQuick 2.2 +import QtQuick 2.3 import QtQuick.Controls 1.2 import QtQuick.Controls.Styles 1.2 diff --git a/src/VehicleSetup/SetupViewButtons.qml b/src/VehicleSetup/SetupViewButtons.qml index 7faaad80cffda957ed22c82b3b9ae1451a3c663a..2086ca78b51aad080837e8a8b4310ecf6846e60d 100644 --- a/src/VehicleSetup/SetupViewButtons.qml +++ b/src/VehicleSetup/SetupViewButtons.qml @@ -1,9 +1,9 @@ -import QtQuick 2.2 +import QtQuick 2.3 import QtQuick.Controls 1.2 import QtQuick.Controls.Styles 1.2 -import QGroundControl.FactSystem 1.0 import QtGraphicalEffects 1.0 +import QGroundControl.FactSystem 1.0 import QGroundControl.Palette 1.0 import QGroundControl.Controls 1.0 diff --git a/src/ui/map/QGCMapToolBar.cc b/src/ui/map/QGCMapToolBar.cc index 97c972a775bfcdb82f21124a25ff1564d8f52ba8..b1dad3edbf9768a42be59b5b77cc2d3cecf74a07 100644 --- a/src/ui/map/QGCMapToolBar.cc +++ b/src/ui/map/QGCMapToolBar.cc @@ -4,41 +4,41 @@ QGCMapToolBar::QGCMapToolBar(QWidget *parent) : QWidget(parent), - ui(new Ui::QGCMapToolBar), - map(NULL), - optionsMenu(this), - trailPlotMenu(this), - updateTimesMenu(this), - mapTypesMenu(this), - trailSettingsGroup(new QActionGroup(this)), - updateTimesGroup(new QActionGroup(this)), - mapTypesGroup(new QActionGroup(this)), - statusMaxLen(15) + _ui(new Ui::QGCMapToolBar), + _map(NULL), + _optionsMenu(new QMenu(this)), + _trailPlotMenu(new QMenu(this)), + _updateTimesMenu(new QMenu(this)), + _mapTypesMenu(new QMenu(this)), + _trailSettingsGroup(new QActionGroup(this)), + _updateTimesGroup(new QActionGroup(this)), + _mapTypesGroup(new QActionGroup(this)), + _statusMaxLen(15) { - ui->setupUi(this); + _ui->setupUi(this); } void QGCMapToolBar::setMap(QGCMapWidget* map) { - this->map = map; + _map = map; - if (map) + if (_map) { - connect(ui->goToButton, SIGNAL(clicked()), map, SLOT(showGoToDialog())); - connect(ui->goHomeButton, SIGNAL(clicked()), map, SLOT(goHome())); - connect(ui->lastPosButton, SIGNAL(clicked()), map, SLOT(loadSettings())); - connect(ui->clearTrailsButton, SIGNAL(clicked()), map, SLOT(deleteTrails())); - connect(ui->lockCheckBox, SIGNAL(clicked(bool)), map, SLOT(setZoomBlocked(bool))); - connect(map, SIGNAL(OnTileLoadStart()), this, SLOT(tileLoadStart())); - connect(map, SIGNAL(OnTileLoadComplete()), this, SLOT(tileLoadEnd())); - connect(map, SIGNAL(OnTilesStillToLoad(int)), this, SLOT(tileLoadProgress(int))); - connect(ui->ripMapButton, SIGNAL(clicked()), map, SLOT(cacheVisibleRegion())); - - ui->followCheckBox->setChecked(map->getFollowUAVEnabled()); - connect(ui->followCheckBox, SIGNAL(clicked(bool)), map, SLOT(setFollowUAVEnabled(bool))); + connect(_ui->goToButton, SIGNAL(clicked()), _map, SLOT(showGoToDialog())); + connect(_ui->goHomeButton, SIGNAL(clicked()), _map, SLOT(goHome())); + connect(_ui->lastPosButton, SIGNAL(clicked()), _map, SLOT(loadSettings())); + connect(_ui->clearTrailsButton, SIGNAL(clicked()), _map, SLOT(deleteTrails())); + connect(_ui->lockCheckBox, SIGNAL(clicked(bool)), _map, SLOT(setZoomBlocked(bool))); + connect(_map, SIGNAL(OnTileLoadStart()), this, SLOT(tileLoadStart())); + connect(_map, SIGNAL(OnTileLoadComplete()), this, SLOT(tileLoadEnd())); + connect(_map, SIGNAL(OnTilesStillToLoad(int)), this, SLOT(tileLoadProgress(int))); + connect(_ui->ripMapButton, SIGNAL(clicked()), _map, SLOT(cacheVisibleRegion())); + + _ui->followCheckBox->setChecked(_map->getFollowUAVEnabled()); + connect(_ui->followCheckBox, SIGNAL(clicked(bool)), _map, SLOT(setFollowUAVEnabled(bool))); // Edit mode handling - ui->editButton->hide(); + _ui->editButton->hide(); const int uavTrailTimeList[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; // seconds const int uavTrailTimeCount = 10; @@ -47,58 +47,58 @@ void QGCMapToolBar::setMap(QGCMapWidget* map) const int uavTrailDistanceCount = 9; // Set exclusive items - trailSettingsGroup->setExclusive(true); - updateTimesGroup->setExclusive(true); - mapTypesGroup->setExclusive(true); + _trailSettingsGroup->setExclusive(true); + _updateTimesGroup->setExclusive(true); + _mapTypesGroup->setExclusive(true); // Build up menu - trailPlotMenu.setTitle(tr("&Add trail dot every..")); - updateTimesMenu.setTitle(tr("&Limit map view update rate to..")); - mapTypesMenu.setTitle(tr("&Map type")); + _trailPlotMenu->setTitle(tr("&Add trail dot every..")); + _updateTimesMenu->setTitle(tr("&Limit map view update rate to..")); + _mapTypesMenu->setTitle(tr("&Map type")); //setup the mapTypesMenu QAction* action; - action = mapTypesMenu.addAction(tr("Bing Hybrid"),this,SLOT(setMapType())); + action = _mapTypesMenu->addAction(tr("Bing Hybrid"),this,SLOT(setMapType())); action->setData(MapType::BingHybrid); action->setCheckable(true); #ifdef MAP_DEFAULT_TYPE_BING action->setChecked(true); #endif - mapTypesGroup->addAction(action); + _mapTypesGroup->addAction(action); - action = mapTypesMenu.addAction(tr("Google Hybrid"),this,SLOT(setMapType())); + action = _mapTypesMenu->addAction(tr("Google Hybrid"),this,SLOT(setMapType())); action->setData(MapType::GoogleHybrid); action->setCheckable(true); #ifdef MAP_DEFAULT_TYPE_GOOGLE action->setChecked(true); #endif - mapTypesGroup->addAction(action); + _mapTypesGroup->addAction(action); - action = mapTypesMenu.addAction(tr("OpenStreetMap"),this,SLOT(setMapType())); + action = _mapTypesMenu->addAction(tr("OpenStreetMap"),this,SLOT(setMapType())); action->setData(MapType::OpenStreetMap); action->setCheckable(true); #ifdef MAP_DEFAULT_TYPE_OSM action->setChecked(true); #endif - mapTypesGroup->addAction(action); + _mapTypesGroup->addAction(action); - optionsMenu.addMenu(&mapTypesMenu); + _optionsMenu->addMenu(_mapTypesMenu); // FIXME MARK CURRENT VALUES IN MENU - QAction *defaultTrailAction = trailPlotMenu.addAction(tr("No trail"), this, SLOT(setUAVTrailTime())); + QAction *defaultTrailAction = _trailPlotMenu->addAction(tr("No trail"), this, SLOT(setUAVTrailTime())); defaultTrailAction->setData(-1); defaultTrailAction->setCheckable(true); - trailSettingsGroup->addAction(defaultTrailAction); + _trailSettingsGroup->addAction(defaultTrailAction); for (int i = 0; i < uavTrailTimeCount; ++i) { - action = trailPlotMenu.addAction(tr("%1 second%2").arg(uavTrailTimeList[i]).arg((uavTrailTimeList[i] > 1) ? "s" : ""), this, SLOT(setUAVTrailTime())); + action = _trailPlotMenu->addAction(tr("%1 second%2").arg(uavTrailTimeList[i]).arg((uavTrailTimeList[i] > 1) ? "s" : ""), this, SLOT(setUAVTrailTime())); action->setData(uavTrailTimeList[i]); action->setCheckable(true); - trailSettingsGroup->addAction(action); - if (static_cast(map->getTrailType()) == mapcontrol::UAVTrailType::ByTimeElapsed && map->getTrailInterval() == uavTrailTimeList[i]) + _trailSettingsGroup->addAction(action); + if (static_cast(map->getTrailType()) == mapcontrol::UAVTrailType::ByTimeElapsed && _map->getTrailInterval() == uavTrailTimeList[i]) { // This is the current active time, set the action checked action->setChecked(true); @@ -106,11 +106,11 @@ void QGCMapToolBar::setMap(QGCMapWidget* map) } for (int i = 0; i < uavTrailDistanceCount; ++i) { - action = trailPlotMenu.addAction(tr("%1 meter%2").arg(uavTrailDistanceList[i]).arg((uavTrailDistanceList[i] > 1) ? "s" : ""), this, SLOT(setUAVTrailDistance())); + action = _trailPlotMenu->addAction(tr("%1 meter%2").arg(uavTrailDistanceList[i]).arg((uavTrailDistanceList[i] > 1) ? "s" : ""), this, SLOT(setUAVTrailDistance())); action->setData(uavTrailDistanceList[i]); action->setCheckable(true); - trailSettingsGroup->addAction(action); - if (static_cast(map->getTrailType()) == mapcontrol::UAVTrailType::ByDistance && map->getTrailInterval() == uavTrailDistanceList[i]) + _trailSettingsGroup->addAction(action); + if (static_cast(_map->getTrailType()) == mapcontrol::UAVTrailType::ByDistance && _map->getTrailInterval() == uavTrailDistanceList[i]) { // This is the current active time, set the action checked action->setChecked(true); @@ -118,43 +118,43 @@ void QGCMapToolBar::setMap(QGCMapWidget* map) } // Set no trail checked if no action is checked yet - if (!trailSettingsGroup->checkedAction()) + if (!_trailSettingsGroup->checkedAction()) { defaultTrailAction->setChecked(true); } - optionsMenu.addMenu(&trailPlotMenu); + _optionsMenu->addMenu(_trailPlotMenu); // Add update times menu for (int i = 100; i < 5000; i+=400) { float time = i/1000.0f; // Convert from ms to seconds - QAction* action = updateTimesMenu.addAction(tr("%1 seconds").arg(time), this, SLOT(setUpdateInterval())); + QAction* action = _updateTimesMenu->addAction(tr("%1 seconds").arg(time), this, SLOT(setUpdateInterval())); action->setData(time); action->setCheckable(true); - if (time == map->getUpdateRateLimit()) + if (time == _map->getUpdateRateLimit()) { action->blockSignals(true); action->setChecked(true); action->blockSignals(false); } - updateTimesGroup->addAction(action); + _updateTimesGroup->addAction(action); } // If the current time is not part of the menu defaults // still add it as new option - if (!updateTimesGroup->checkedAction()) + if (!_updateTimesGroup->checkedAction()) { - float time = map->getUpdateRateLimit(); - QAction* action = updateTimesMenu.addAction(tr("uptate every %1 seconds").arg(time), this, SLOT(setUpdateInterval())); + float time = _map->getUpdateRateLimit(); + QAction* action = _updateTimesMenu->addAction(tr("uptate every %1 seconds").arg(time), this, SLOT(setUpdateInterval())); action->setData(time); action->setCheckable(true); action->setChecked(true); - updateTimesGroup->addAction(action); + _updateTimesGroup->addAction(action); } - optionsMenu.addMenu(&updateTimesMenu); + _optionsMenu->addMenu(_updateTimesMenu); - ui->optionsButton->setMenu(&optionsMenu); + _ui->optionsButton->setMenu(_optionsMenu); } } @@ -169,7 +169,7 @@ void QGCMapToolBar::setUAVTrailTime() int trailTime = action->data().toInt(&ok); if (ok) { - (map->setTrailModeTimed(trailTime)); + (_map->setTrailModeTimed(trailTime)); setStatusLabelText(tr("Trail mode: Every %1 second%2").arg(trailTime).arg((trailTime > 1) ? "s" : "")); } } @@ -177,7 +177,7 @@ void QGCMapToolBar::setUAVTrailTime() void QGCMapToolBar::setStatusLabelText(const QString &text) { - ui->posLabel->setText(text.leftJustified(statusMaxLen, QChar('.'), true)); + _ui->posLabel->setText(text.leftJustified(_statusMaxLen, QChar('.'), true)); } void QGCMapToolBar::setUAVTrailDistance() @@ -191,7 +191,7 @@ void QGCMapToolBar::setUAVTrailDistance() int trailDistance = action->data().toInt(&ok); if (ok) { - map->setTrailModeDistance(trailDistance); + _map->setTrailModeDistance(trailDistance); setStatusLabelText(tr("Trail mode: Every %1 meter%2").arg(trailDistance).arg((trailDistance == 1) ? "s" : "")); } } @@ -208,7 +208,7 @@ void QGCMapToolBar::setUpdateInterval() float time = action->data().toFloat(&ok); if (ok) { - map->setUpdateRateLimit(time); + _map->setUpdateRateLimit(time); setStatusLabelText(tr("Limit: %1 second%2").arg(time).arg((time != 1.0f) ? "s" : "")); } } @@ -225,7 +225,7 @@ void QGCMapToolBar::setMapType() int mapType = action->data().toInt(&ok); if (ok) { - map->SetMapType((MapType::Types)mapType); + _map->SetMapType((MapType::Types)mapType); setStatusLabelText(tr("Map: %1").arg(mapType)); } } @@ -256,13 +256,3 @@ void QGCMapToolBar::tileLoadProgress(int progress) tileLoadEnd(); } } - - -QGCMapToolBar::~QGCMapToolBar() -{ - delete ui; - delete trailSettingsGroup; - delete updateTimesGroup; - delete mapTypesGroup; - // FIXME Delete all actions -} diff --git a/src/ui/map/QGCMapToolBar.h b/src/ui/map/QGCMapToolBar.h index e93e1e817bae6636b7e83e1dc1ae10d56a72a0da..e837761d1269f51de591e6b7ad09ef7f5e012f8f 100644 --- a/src/ui/map/QGCMapToolBar.h +++ b/src/ui/map/QGCMapToolBar.h @@ -17,7 +17,6 @@ class QGCMapToolBar : public QWidget public: explicit QGCMapToolBar(QWidget *parent = 0); - ~QGCMapToolBar(); void setMap(QGCMapWidget* map); @@ -32,20 +31,19 @@ public slots: void setStatusLabelText(const QString &text); private: - Ui::QGCMapToolBar *ui; + Ui::QGCMapToolBar* _ui; -protected: - QGCMapWidget* map; - QMenu optionsMenu; - QMenu trailPlotMenu; - QMenu updateTimesMenu; - QMenu mapTypesMenu; + QGCMapWidget* _map; + QMenu* _optionsMenu; + QMenu* _trailPlotMenu; + QMenu* _updateTimesMenu; + QMenu* _mapTypesMenu; - QActionGroup* trailSettingsGroup; - QActionGroup* updateTimesGroup; - QActionGroup* mapTypesGroup; + QActionGroup* _trailSettingsGroup; + QActionGroup* _updateTimesGroup; + QActionGroup* _mapTypesGroup; - unsigned statusMaxLen; + unsigned _statusMaxLen; }; #endif // QGCMAPTOOLBAR_H