mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-11-25 09:18:54 -05:00
Merge pull request #2068 from dforsi/feature/map-feature
Feature/map feature
This commit is contained in:
commit
5e321e3ead
@ -31,6 +31,7 @@ MapBeaconDialog::MapBeaconDialog(MapGUI *gui, QWidget* parent) :
|
|||||||
ui(new Ui::MapBeaconDialog)
|
ui(new Ui::MapBeaconDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
setAttribute(Qt::WA_QuitOnClose, false);
|
||||||
connect(&m_dlm, &HttpDownloadManager::downloadComplete, this, &MapBeaconDialog::downloadFinished);
|
connect(&m_dlm, &HttpDownloadManager::downloadComplete, this, &MapBeaconDialog::downloadFinished);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2507,17 +2507,20 @@ void MapGUI::on_displaySettings_clicked()
|
|||||||
void MapGUI::on_beacons_clicked()
|
void MapGUI::on_beacons_clicked()
|
||||||
{
|
{
|
||||||
m_beaconDialog.show();
|
m_beaconDialog.show();
|
||||||
|
m_beaconDialog.raise();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapGUI::on_ibpBeacons_clicked()
|
void MapGUI::on_ibpBeacons_clicked()
|
||||||
{
|
{
|
||||||
m_ibpBeaconDialog.show();
|
m_ibpBeaconDialog.show();
|
||||||
|
m_ibpBeaconDialog.raise();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MapGUI::on_radiotime_clicked()
|
void MapGUI::on_radiotime_clicked()
|
||||||
{
|
{
|
||||||
m_radioTimeDialog.updateTable();
|
m_radioTimeDialog.updateTable();
|
||||||
m_radioTimeDialog.show();
|
m_radioTimeDialog.show();
|
||||||
|
m_radioTimeDialog.raise();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MapGUI::getDataDir()
|
QString MapGUI::getDataDir()
|
||||||
|
@ -30,9 +30,9 @@ MapIBPBeaconDialog::MapIBPBeaconDialog(MapGUI *gui, QWidget* parent) :
|
|||||||
ui(new Ui::MapIBPBeaconDialog)
|
ui(new Ui::MapIBPBeaconDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
setAttribute(Qt::WA_QuitOnClose, false);
|
||||||
connect(&m_timer, &QTimer::timeout, this, &MapIBPBeaconDialog::updateTime);
|
connect(&m_timer, &QTimer::timeout, this, &MapIBPBeaconDialog::updateTime);
|
||||||
m_timer.setInterval(1000);
|
m_timer.setInterval(1000);
|
||||||
m_timer.start();
|
|
||||||
ui->beacons->setRowCount(IBPBeacon::m_frequencies.size());
|
ui->beacons->setRowCount(IBPBeacon::m_frequencies.size());
|
||||||
for (int row = 0; row < IBPBeacon::m_frequencies.size(); row++)
|
for (int row = 0; row < IBPBeacon::m_frequencies.size(); row++)
|
||||||
{
|
{
|
||||||
@ -44,7 +44,6 @@ MapIBPBeaconDialog::MapIBPBeaconDialog(MapGUI *gui, QWidget* parent) :
|
|||||||
ui->beacons->setItem(row, IBP_BEACON_COL_DISTANCE, new QTableWidgetItem(""));
|
ui->beacons->setItem(row, IBP_BEACON_COL_DISTANCE, new QTableWidgetItem(""));
|
||||||
}
|
}
|
||||||
resizeTable();
|
resizeTable();
|
||||||
updateTable(QTime::currentTime());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
MapIBPBeaconDialog::~MapIBPBeaconDialog()
|
MapIBPBeaconDialog::~MapIBPBeaconDialog()
|
||||||
@ -126,3 +125,17 @@ void MapIBPBeaconDialog::updateTime()
|
|||||||
updateTable(t);
|
updateTable(t);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MapIBPBeaconDialog::showEvent(QShowEvent *event)
|
||||||
|
{
|
||||||
|
(void) event;
|
||||||
|
updateTable(QTime::currentTime());
|
||||||
|
updateTime();
|
||||||
|
m_timer.start();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MapIBPBeaconDialog::hideEvent(QHideEvent *event)
|
||||||
|
{
|
||||||
|
(void) event;
|
||||||
|
m_timer.stop();
|
||||||
|
}
|
||||||
|
@ -43,6 +43,8 @@ private slots:
|
|||||||
void accept();
|
void accept();
|
||||||
void on_beacons_cellDoubleClicked(int row, int column);
|
void on_beacons_cellDoubleClicked(int row, int column);
|
||||||
void updateTime();
|
void updateTime();
|
||||||
|
void showEvent(QShowEvent *event);
|
||||||
|
void hideEvent(QHideEvent *event);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MapGUI *m_gui;
|
MapGUI *m_gui;
|
||||||
|
@ -29,6 +29,7 @@ MapRadioTimeDialog::MapRadioTimeDialog(MapGUI *gui, QWidget* parent) :
|
|||||||
ui(new Ui::MapRadioTimeDialog)
|
ui(new Ui::MapRadioTimeDialog)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
setAttribute(Qt::WA_QuitOnClose, false);
|
||||||
// Don't call updateTable until m_gui->getAzEl() will return valid location
|
// Don't call updateTable until m_gui->getAzEl() will return valid location
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user