mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 08:04:49 -05:00
Factor out the code that updates the widget containing the list of TLEs
This commit is contained in:
parent
e95cf97c42
commit
07721385f1
@ -49,12 +49,7 @@ SatelliteTrackerSettingsDialog::SatelliteTrackerSettingsDialog(SatelliteTrackerS
|
||||
ui->dateFormat->setText(settings->m_dateFormat);
|
||||
ui->utc->setChecked(settings->m_utc);
|
||||
ui->drawOnMap->setChecked(settings->m_drawOnMap);
|
||||
for (int i = 0; i < settings->m_tles.size(); i++)
|
||||
{
|
||||
QListWidgetItem *item = new QListWidgetItem(settings->m_tles[i]);
|
||||
item->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEditable|Qt::ItemIsEnabled);
|
||||
ui->tles->addItem(item);
|
||||
}
|
||||
updateTleWidget(settings->m_tles);
|
||||
ui->replayEnabled->setChecked(settings->m_replayEnabled);
|
||||
ui->replayDateTime->setDateTime(settings->m_replayStartDateTime);
|
||||
ui->sendTimeToMap->setChecked(settings->m_sendTimeToMap);
|
||||
@ -65,6 +60,16 @@ SatelliteTrackerSettingsDialog::~SatelliteTrackerSettingsDialog()
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void SatelliteTrackerSettingsDialog::updateTleWidget(QList<QString> tles)
|
||||
{
|
||||
for (int i = 0; i < tles.size(); i++)
|
||||
{
|
||||
QListWidgetItem *item = new QListWidgetItem(tles[i]);
|
||||
item->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEditable|Qt::ItemIsEnabled);
|
||||
ui->tles->addItem(item);
|
||||
}
|
||||
}
|
||||
|
||||
void SatelliteTrackerSettingsDialog::on_addTle_clicked()
|
||||
{
|
||||
QListWidgetItem *item = new QListWidgetItem("https://");
|
||||
|
@ -31,6 +31,8 @@ public:
|
||||
explicit SatelliteTrackerSettingsDialog(SatelliteTrackerSettings* settings, QWidget* parent = 0);
|
||||
~SatelliteTrackerSettingsDialog();
|
||||
|
||||
void updateTleWidget(QList<QString> tles);
|
||||
|
||||
SatelliteTrackerSettings *m_settings;
|
||||
|
||||
private slots:
|
||||
|
Loading…
Reference in New Issue
Block a user