mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-12-23 01:55:48 -05:00
Satellite Tracker Settings: add a button to reset the list of TLEs
This commit is contained in:
parent
aeab5d9229
commit
7281e238d9
@ -18,6 +18,7 @@
|
||||
#include "util/units.h"
|
||||
#include "satellitetrackersettingsdialog.h"
|
||||
#include <QDebug>
|
||||
#include <QMessageBox>
|
||||
|
||||
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();
|
||||
|
@ -40,6 +40,8 @@ private slots:
|
||||
void on_removeTle_clicked();
|
||||
void accept();
|
||||
|
||||
void on_defaultTles_clicked();
|
||||
|
||||
private:
|
||||
Ui::SatelliteTrackerSettingsDialog* ui;
|
||||
};
|
||||
|
@ -7,7 +7,7 @@
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>487</width>
|
||||
<height>543</height>
|
||||
<height>603</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="font">
|
||||
@ -363,6 +363,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="defaultTles">
|
||||
<property name="toolTip">
|
||||
<string>Load preset TLE sources</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../../../sdrgui/resources/res.qrc">
|
||||
<normaloff>:/star.png</normaloff>:/star.png</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="buttonHorizontalSpacer">
|
||||
<property name="orientation">
|
||||
@ -680,7 +694,9 @@
|
||||
<tabstop>utc</tabstop>
|
||||
<tabstop>drawOnMap</tabstop>
|
||||
</tabstops>
|
||||
<resources/>
|
||||
<resources>
|
||||
<include location="../../../sdrgui/resources/res.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
|
Loading…
Reference in New Issue
Block a user