diff --git a/qmap/devsetup.cpp b/qmap/devsetup.cpp index 4657d1458..78ec1e4f5 100644 --- a/qmap/devsetup.cpp +++ b/qmap/devsetup.cpp @@ -20,6 +20,8 @@ void DevSetup::initDlg() ui.myCallEntry->setText(m_myCall); ui.myGridEntry->setText(m_myGrid); ui.astroFont->setValue(m_astroFont); + ui.myCallColor->addItems({"","red","green","cyan"}); + ui.myCallColor->setCurrentIndex(m_myCallColor); ui.saveDirEntry->setText(m_saveDir); ui.azelDirEntry->setText(m_azelDir); ui.fCalSpinBox->setValue(m_fCal); @@ -38,6 +40,7 @@ void DevSetup::accept() m_myCall=ui.myCallEntry->text(); m_myGrid=ui.myGridEntry->text(); m_astroFont=ui.astroFont->value(); + m_myCallColor=ui.myCallColor->currentIndex(); m_saveDir=ui.saveDirEntry->text(); m_azelDir=ui.azelDirEntry->text(); m_fCal=ui.fCalSpinBox->value(); diff --git a/qmap/devsetup.h b/qmap/devsetup.h index e3b2e9e0c..e93fcd407 100644 --- a/qmap/devsetup.h +++ b/qmap/devsetup.h @@ -28,6 +28,8 @@ public: bool m_fs96000; bool m_restartSoundIn; + int m_myCallColor; + QString m_myCall; QString m_myGrid; QString m_saveDir; diff --git a/qmap/devsetup.ui b/qmap/devsetup.ui index 4a2c3ca95..17cd3425e 100644 --- a/qmap/devsetup.ui +++ b/qmap/devsetup.ui @@ -7,7 +7,7 @@ 0 0 400 - 250 + 268 @@ -63,6 +63,13 @@ + + + + Highlight My Call: + + + @@ -106,6 +113,9 @@ + + + diff --git a/qmap/mainwindow.cpp b/qmap/mainwindow.cpp index fd61dd2d7..bc38bbd70 100644 --- a/qmap/mainwindow.cpp +++ b/qmap/mainwindow.cpp @@ -71,11 +71,12 @@ MainWindow::MainWindow(QWidget *parent) : createStatusBar(); connect(m_gui_timer, &QTimer::timeout, this, &MainWindow::guiUpdate); - m_waterfallAvg = 1; - m_network = true; + m_waterfallAvg=1; + m_network=true; m_restart=false; m_myCall="K1JT"; m_myGrid="FN20qi"; + m_myCallColor=0; m_saveDir=""; m_azelDir=""; m_loopall=false; @@ -220,6 +221,7 @@ void MainWindow::writeSettings() settings.setValue("MyGrid",m_myGrid); settings.setValue("IDint",m_idInt); settings.setValue("AstroFont",m_astroFont); + settings.setValue("MyCallColor",m_myCallColor); settings.setValue("SaveDir",m_saveDir); settings.setValue("AzElDir",m_azelDir); settings.setValue("Timeout",m_timeout); @@ -266,6 +268,7 @@ void MainWindow::readSettings() m_myGrid=settings.value("MyGrid","").toString(); m_idInt=settings.value("IDint",0).toInt(); m_astroFont=settings.value("AstroFont",20).toInt(); + m_myCallColor=settings.value("MyCallColor",0).toInt(); m_saveDir=settings.value("SaveDir",m_appDir + "/save").toString(); m_azelDir=settings.value("AzElDir",m_appDir).toString(); m_timeout=settings.value("Timeout",20).toInt(); @@ -438,6 +441,7 @@ void MainWindow::on_actionSettings_triggered() dlg.m_myGrid=m_myGrid; dlg.m_idInt=m_idInt; dlg.m_astroFont=m_astroFont; + dlg.m_myCallColor=m_myCallColor; dlg.m_saveDir=m_saveDir; dlg.m_azelDir=m_azelDir; dlg.m_timeout=m_timeout; @@ -453,6 +457,7 @@ void MainWindow::on_actionSettings_triggered() m_myGrid=dlg.m_myGrid; m_idInt=dlg.m_idInt; m_astroFont=dlg.m_astroFont; + m_myCallColor=dlg.m_myCallColor; if(m_astro_window && m_astro_window->isVisible()) m_astro_window->setFontSize(m_astroFont); ui->actionFind_Delta_Phi->setEnabled(false); m_saveDir=dlg.m_saveDir; @@ -956,7 +961,9 @@ void MainWindow::guiUpdate() QTextBlockFormat f = cursor.blockFormat(); f.setBackground(QBrush(Qt::white)); if(t.mid(36,2)=="30") f.setBackground(QBrush(Qt::yellow)); - if(t.indexOf(m_myCall)>10) f.setBackground(QBrush(Qt::red)); + if(t.indexOf(m_myCall)>10 and m_myCallColor==1) f.setBackground(QBrush(Qt::red)); + if(t.indexOf(m_myCall)>10 and m_myCallColor==2) f.setBackground(QBrush(Qt::green)); + if(t.indexOf(m_myCall)>10 and m_myCallColor==3) f.setBackground(QBrush(Qt::cyan)); cursor.setBlockFormat(f); } } diff --git a/qmap/mainwindow.h b/qmap/mainwindow.h index 6a1d75d7d..c88290781 100644 --- a/qmap/mainwindow.h +++ b/qmap/mainwindow.h @@ -143,6 +143,8 @@ private: float m_phasey; float m_pctZap; + int m_myCallColor; + QRect m_wideGraphGeom; QLabel* lab1; // labels in status bar