More options for highlighting messages with myCall.

This commit is contained in:
Uwe Risse 2023-12-13 16:32:57 +01:00
parent 5e8deecdb4
commit 1b3f4315b1
5 changed files with 28 additions and 4 deletions

View File

@ -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();

View File

@ -28,6 +28,8 @@ public:
bool m_fs96000;
bool m_restartSoundIn;
int m_myCallColor;
QString m_myCall;
QString m_myGrid;
QString m_saveDir;

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>400</width>
<height>250</height>
<height>268</height>
</rect>
</property>
<property name="windowTitle">
@ -63,6 +63,13 @@
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>Highlight My Call:</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
@ -106,6 +113,9 @@
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="myCallColor"/>
</item>
</layout>
</item>
<item>

View File

@ -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);
}
}

View File

@ -143,6 +143,8 @@ private:
float m_phasey;
float m_pctZap;
int m_myCallColor;
QRect m_wideGraphGeom;
QLabel* lab1; // labels in status bar