diff --git a/plugins/feature/satellitetracker/satellitetrackersettingsdialog.cpp b/plugins/feature/satellitetracker/satellitetrackersettingsdialog.cpp index 2f5875682..29ace8179 100644 --- a/plugins/feature/satellitetracker/satellitetrackersettingsdialog.cpp +++ b/plugins/feature/satellitetracker/satellitetrackersettingsdialog.cpp @@ -18,6 +18,7 @@ #include "util/units.h" #include "satellitetrackersettingsdialog.h" #include +#include SatelliteTrackerSettingsDialog::SatelliteTrackerSettingsDialog(SatelliteTrackerSettings *settings, QWidget* parent) : @@ -84,6 +85,16 @@ void SatelliteTrackerSettingsDialog::on_removeTle_clicked() delete items[i]; } +void SatelliteTrackerSettingsDialog::on_defaultTles_clicked() +{ + QMessageBox::StandardButton reply; + reply = QMessageBox::question(this, "Confirm ovewrite", "Replace the current TLE list with the default?", QMessageBox::Yes|QMessageBox::No, QMessageBox::No); + if (reply == QMessageBox::Yes) { + ui->tles->clear(); + updateTleWidget(DEFAULT_TLES); + } +} + void SatelliteTrackerSettingsDialog::accept() { m_settings->m_heightAboveSeaLevel = ui->height->value(); diff --git a/plugins/feature/satellitetracker/satellitetrackersettingsdialog.h b/plugins/feature/satellitetracker/satellitetrackersettingsdialog.h index d6155c151..b9c0344e7 100644 --- a/plugins/feature/satellitetracker/satellitetrackersettingsdialog.h +++ b/plugins/feature/satellitetracker/satellitetrackersettingsdialog.h @@ -40,6 +40,8 @@ private slots: void on_removeTle_clicked(); void accept(); + void on_defaultTles_clicked(); + private: Ui::SatelliteTrackerSettingsDialog* ui; }; diff --git a/plugins/feature/satellitetracker/satellitetrackersettingsdialog.ui b/plugins/feature/satellitetracker/satellitetrackersettingsdialog.ui index 172273237..8450411fb 100644 --- a/plugins/feature/satellitetracker/satellitetrackersettingsdialog.ui +++ b/plugins/feature/satellitetracker/satellitetrackersettingsdialog.ui @@ -7,7 +7,7 @@ 0 0 487 - 543 + 603 @@ -363,6 +363,20 @@ + + + + Load preset TLE sources + + + + + + + :/star.png:/star.png + + + @@ -680,7 +694,9 @@ utc drawOnMap - + + + buttonBox