diff --git a/.gitignore b/.gitignore index 77e8963d9c1cb86b18054799d4ef1809ab7d530a..fe553de6c10f6a4a9b811a761564e2093f7564bb 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,4 @@ deploy/mac deploy/linux controller_log* user_config.pri +*.app diff --git a/qgroundcontrol.pri b/qgroundcontrol.pri index 4028055adc8c7e482194b38a8db50011b9da0b69..3038fefcd507242d0634c55d3bce03735a29dd4f 100644 --- a/qgroundcontrol.pri +++ b/qgroundcontrol.pri @@ -77,11 +77,11 @@ macx { ICON = $$BASEDIR/images/icons/macx.icns # Copy audio files if needed - QMAKE_PRE_LINK += && cp -rf $$BASEDIR/audio $$DESTDIR/qgroundcontrol.app/Contents/MacOs/. + QMAKE_PRE_LINK += && cp -rf $$BASEDIR/audio $$TARGETDIR/qgroundcontrol.app/Contents/MacOs/. # Copy google earth starter file - QMAKE_PRE_LINK += && cp -f $$BASEDIR/images/earth.html $$DESTDIR/qgroundcontrol.app/Contents/MacOs/. + QMAKE_PRE_LINK += && cp -f $$BASEDIR/images/earth.html $$TARGETDIR/qgroundcontrol.app/Contents/MacOs/. # Copy model files - QMAKE_PRE_LINK += && cp -f $$BASEDIR/models/*.skp $$DESTDIR/qgroundcontrol.app/Contents/MacOs/. + #QMAKE_PRE_LINK += && cp -f $$BASEDIR/models/*.dae $$TARGETDIR/qgroundcontrol.app/Contents/MacOs/. exists(/Library/Frameworks/osg.framework):exists(/Library/Frameworks/OpenThreads.framework) { # No check for GLUT.framework since it's a MAC default diff --git a/src/ui/map3D/QGCGoogleEarthView.cc b/src/ui/map3D/QGCGoogleEarthView.cc index be3154cd9cef42cbdf25897a3c07081d8956e2f8..2754dc6aadddd4023679a052c65add3e907e3b14 100644 --- a/src/ui/map3D/QGCGoogleEarthView.cc +++ b/src/ui/map3D/QGCGoogleEarthView.cc @@ -18,6 +18,7 @@ QGCGoogleEarthView::QGCGoogleEarthView(QWidget *parent) : updateTimer(new QTimer(this)), mav(NULL), followCamera(true), + trailEnabled(true), #if (defined Q_OS_MAC) webViewMac(new QWebView(this)), #endif @@ -51,6 +52,14 @@ QGCGoogleEarthView::QGCGoogleEarthView(QWidget *parent) : updateTimer->start(200); #endif + // Follow checkbox + ui->followAirplaneCheckbox->setChecked(followCamera); + connect(ui->followAirplaneCheckbox, SIGNAL(toggled(bool)), this, SLOT(follow(bool))); + + // Trail checkbox + ui->trailCheckbox->setChecked(trailEnabled); + connect(ui->trailCheckbox, SIGNAL(toggled(bool)), this, SLOT(showTrail(bool))); + // Get list of available 3D models // Load HTML file @@ -70,19 +79,19 @@ void QGCGoogleEarthView::setActiveUAS(UASInterface* uas) mav = uas; } -void QGCGoogleEarthView::showTrail(int state) +void QGCGoogleEarthView::showTrail(bool state) { } -void QGCGoogleEarthView::showWaypoints(int state) +void QGCGoogleEarthView::showWaypoints(bool state) { } void QGCGoogleEarthView::follow(bool follow) { - + followCamera = follow; } void QGCGoogleEarthView::updateState() diff --git a/src/ui/map3D/QGCGoogleEarthView.h b/src/ui/map3D/QGCGoogleEarthView.h index d7d2e9da9b456de1b9342b094593793714412b1d..f0f4aed073777a1efbfb6b7eb251c03f6ed98110 100644 --- a/src/ui/map3D/QGCGoogleEarthView.h +++ b/src/ui/map3D/QGCGoogleEarthView.h @@ -57,9 +57,9 @@ public slots: /** @brief Set the currently selected UAS */ void setActiveUAS(UASInterface* uas); /** @brief Show the vehicle trail */ - void showTrail(int state); + void showTrail(bool state); /** @brief Show the waypoints */ - void showWaypoints(int state); + void showWaypoints(bool state); /** @brief Follow the aircraft during flight */ void follow(bool follow); @@ -68,6 +68,7 @@ protected: QTimer* updateTimer; UASInterface* mav; bool followCamera; + bool trailEnabled; #if (defined Q_OS_WIN) && !(defined __MINGW32__) WebAxWidget* webViewWin; #endif