Skip to content

Commit

Permalink
Bandmap: code optimalization
Browse files Browse the repository at this point in the history
  • Loading branch information
foldynl committed Jun 29, 2024
1 parent 1b5cd18 commit 29b3c31
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
8 changes: 1 addition & 7 deletions ui/BandmapWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,6 @@ BandmapWidget::BandmapWidget(QWidget *parent) :

ui->clearSpotOlderSpin->setValue(settings.value("bandmap/spot_aging", 0).toInt());

Rig* rig = Rig::instance();
connect(rig, &Rig::frequencyChanged,
this, &BandmapWidget::updateTunedFrequency);
connect(rig, &Rig::modeChanged,
this, &BandmapWidget::updateMode);

update_timer = new QTimer;
connect(update_timer, &QTimer::timeout, this, &BandmapWidget::updateStationTimer);
update_timer->start(BANDMAP_MAX_REFRESH_TIME);
Expand Down Expand Up @@ -144,7 +138,7 @@ void BandmapWidget::update()
}
}

QString endFreqDigits= QString::number(currentBand.end + step*steps, 'f', digits);
const QString &endFreqDigits= QString::number(currentBand.end + step*steps, 'f', digits);
bandmapScene->setSceneRect(160 - (endFreqDigits.size() * PIXELSPERSTEP),
0,
0,
Expand Down
2 changes: 2 additions & 0 deletions ui/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ MainWindow::MainWindow(QWidget* parent) :
connect(Rig::instance(), &Rig::rigCWKeyOpenRequest, this, &MainWindow::cwKeyerConnectProfile);
connect(Rig::instance(), &Rig::rigCWKeyCloseRequest, this, &MainWindow::cwKeyerDisconnectProfile);
connect(Rig::instance(), &Rig::frequencyChanged, ui->onlineMapWidget, &OnlineMapWidget::setIBPBand);
connect(Rig::instance(), &Rig::frequencyChanged, ui->bandmapWidget , &BandmapWidget::updateTunedFrequency);
connect(Rig::instance(), &Rig::modeChanged, ui->bandmapWidget, &BandmapWidget::updateMode);

connect(Rotator::instance(), &Rotator::rotErrorPresent, this, &MainWindow::rotErrorHandler);
connect(Rotator::instance(), &Rotator::positionChanged, ui->onlineMapWidget, &OnlineMapWidget::antPositionChanged);
Expand Down

0 comments on commit 29b3c31

Please sign in to comment.