diff --git a/mainwindow.cpp b/mainwindow.cpp index a3f23bbb9..4790283d9 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -383,6 +383,7 @@ void MainWindow::writeSettings() settings.setValue("Miles",m_bMiles); settings.setValue("GUItab",ui->tabWidget->currentIndex()); settings.setValue("QuickCall",m_quickCall); + settings.setValue("LeftColor",m_leftColor); settings.endGroup(); } @@ -485,7 +486,8 @@ void MainWindow::readSettings() ui->tabWidget->setCurrentIndex(n); m_quickCall=settings.value("QuickCall",false).toBool(); ui->actionDouble_click_on_call_sets_Tx_Enable->setChecked(m_quickCall); - + m_leftColor=settings.value("LeftColor",false).toBool(); + ui->actionColor_highlighting_in_left_window->setChecked(m_leftColor); if(!ui->actionLinrad->isChecked() && !ui->actionCuteSDR->isChecked() && !ui->actionAFMHot->isChecked() && !ui->actionBlue->isChecked()) { on_actionLinrad_triggered(); @@ -1190,6 +1192,10 @@ void MainWindow::readFromStdout() //readFromStdout } QString bg="white"; + if(m_leftColor) { + if(t.indexOf(" CQ ")>0) bg="#66ff66"; //green + if(m_myCall!="" and t.indexOf(" "+m_myCall+" ")>0) bg="#ff6666"; //red + } bool bQSO=abs(t.mid(22,4).toInt() - g_pWideGraph->QSOfreq()) < 10; QString t1=t.mid(0,5) + t.mid(10,4) + t.mid(15,5) + t.mid(22,4) + t.mid(32); @@ -1206,8 +1212,10 @@ void MainWindow::readFromStdout() //readFromStdout } if(jt9com_.nagain==0) { - if(t.indexOf(" CQ ")>0) bg="#66ff66"; //green - if(m_myCall!="" and t.indexOf(" "+m_myCall+" ")>0) bg="#ff6666"; //red + if(!m_leftColor) { + if(t.indexOf(" CQ ")>0) bg="#66ff66"; //green + if(m_myCall!="" and t.indexOf(" "+m_myCall+" ")>0) bg="#ff6666"; //red + } QString s = "
" + t1 + "
"; cursor = ui->decodedTextBrowser2->textCursor(); @@ -2421,3 +2429,8 @@ void MainWindow::on_rptSpinBox_valueChanged(int n) m_rpt=QString::number(n); genStdMsgs(m_rpt); } + +void MainWindow::on_actionColor_highlighting_in_left_window_triggered(bool checked) +{ + m_leftColor=checked; +} diff --git a/mainwindow.h b/mainwindow.h index 207c5703f..85b416a4d 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -146,6 +146,8 @@ private slots: void on_actionDouble_click_on_call_sets_Tx_Enable_triggered(bool checked); void on_rptSpinBox_valueChanged(int n); + void on_actionColor_highlighting_in_left_window_triggered(bool checked); + private: Ui::MainWindow *ui; @@ -232,6 +234,7 @@ private: bool m_decodedText2; bool m_freeText; bool m_quickCall; + bool m_leftColor; char m_decoded[80]; diff --git a/mainwindow.ui b/mainwindow.ui index 368f60874..c12f230cc 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -1912,6 +1912,7 @@ p, li { white-space: pre-wrap; } + @@ -2437,6 +2438,14 @@ p, li { white-space: pre-wrap; } Double-click on call sets Tx Enable + + + true + + + Color highlighting in left window + +