mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-22 16:08:39 -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->dateFormat->setText(settings->m_dateFormat);
|
||||||
ui->utc->setChecked(settings->m_utc);
|
ui->utc->setChecked(settings->m_utc);
|
||||||
ui->drawOnMap->setChecked(settings->m_drawOnMap);
|
ui->drawOnMap->setChecked(settings->m_drawOnMap);
|
||||||
for (int i = 0; i < settings->m_tles.size(); i++)
|
updateTleWidget(settings->m_tles);
|
||||||
{
|
|
||||||
QListWidgetItem *item = new QListWidgetItem(settings->m_tles[i]);
|
|
||||||
item->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEditable|Qt::ItemIsEnabled);
|
|
||||||
ui->tles->addItem(item);
|
|
||||||
}
|
|
||||||
ui->replayEnabled->setChecked(settings->m_replayEnabled);
|
ui->replayEnabled->setChecked(settings->m_replayEnabled);
|
||||||
ui->replayDateTime->setDateTime(settings->m_replayStartDateTime);
|
ui->replayDateTime->setDateTime(settings->m_replayStartDateTime);
|
||||||
ui->sendTimeToMap->setChecked(settings->m_sendTimeToMap);
|
ui->sendTimeToMap->setChecked(settings->m_sendTimeToMap);
|
||||||
@ -65,6 +60,16 @@ SatelliteTrackerSettingsDialog::~SatelliteTrackerSettingsDialog()
|
|||||||
delete ui;
|
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()
|
void SatelliteTrackerSettingsDialog::on_addTle_clicked()
|
||||||
{
|
{
|
||||||
QListWidgetItem *item = new QListWidgetItem("https://");
|
QListWidgetItem *item = new QListWidgetItem("https://");
|
||||||
|
@ -31,6 +31,8 @@ public:
|
|||||||
explicit SatelliteTrackerSettingsDialog(SatelliteTrackerSettings* settings, QWidget* parent = 0);
|
explicit SatelliteTrackerSettingsDialog(SatelliteTrackerSettings* settings, QWidget* parent = 0);
|
||||||
~SatelliteTrackerSettingsDialog();
|
~SatelliteTrackerSettingsDialog();
|
||||||
|
|
||||||
|
void updateTleWidget(QList<QString> tles);
|
||||||
|
|
||||||
SatelliteTrackerSettings *m_settings;
|
SatelliteTrackerSettings *m_settings;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
Loading…
Reference in New Issue
Block a user