Commit 24169552 authored by lm's avatar lm

Added trail clear button

parent 8dadb1a4
......@@ -24,6 +24,7 @@ void QGCMapToolBar::setMap(QGCMapWidget* 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(map, SIGNAL(OnTileLoadStart()), this, SLOT(tileLoadStart()));
connect(map, SIGNAL(OnTileLoadComplete()), this, SLOT(tileLoadEnd()));
connect(map, SIGNAL(OnTilesStillToLoad(int)), this, SLOT(tileLoadProgress(int)));
......
......@@ -6,14 +6,14 @@
<rect>
<x>0</x>
<y>0</y>
<width>693</width>
<width>695</width>
<height>35</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1,1,1,1,1,100,20,1">
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1,1,1,1,0,1,100,20,1">
<property name="spacing">
<number>12</number>
</property>
......@@ -55,6 +55,13 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="clearTrailsButton">
<property name="text">
<string>Clear Trails</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="followCheckBox">
<property name="text">
......
......@@ -98,6 +98,14 @@ public slots:
}
}
}
/** @brief Delete all trails */
void deleteTrails()
{
foreach(mapcontrol::UAVItem* uav, GetUAVS())
{
uav->DeleteTrail();
}
}
/** @brief Load the settings for this widget from disk */
void loadSettings(bool changePosition=true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment