Color highlighting in left window is now optional.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3138 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-04-09 00:34:39 +00:00
parent 182b944052
commit 7b73e76b04
3 changed files with 28 additions and 3 deletions

View File

@ -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 = "<table border=0 cellspacing=0 width=100%><tr><td bgcolor=\"" +
bg + "\"><pre>" + t1 + "</pre></td></tr></table>";
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;
}

View File

@ -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];

View File

@ -1912,6 +1912,7 @@ p, li { white-space: pre-wrap; }
<addaction name="actionClear_DX_Call_and_Grid_after_logging"/>
<addaction name="actionDisplay_distance_in_miles"/>
<addaction name="actionDouble_click_on_call_sets_Tx_Enable"/>
<addaction name="actionColor_highlighting_in_left_window"/>
</widget>
<widget class="QMenu" name="menuView">
<property name="title">
@ -2437,6 +2438,14 @@ p, li { white-space: pre-wrap; }
<string>Double-click on call sets Tx Enable</string>
</property>
</action>
<action name="actionColor_highlighting_in_left_window">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Color highlighting in left window</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<customwidgets>