diff --git a/mainwindow.cpp b/mainwindow.cpp index afe016d14..0cb64d21d 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1130,9 +1130,16 @@ void MainWindow::readFromStdout() //readFromStdout if(t.indexOf(" "+m_myCall+" ")>0) bg="#ff6666"; //Light red //ui->decodedTextBrowser->setTextBackgroundColor(bg); //t=t.mid(0,n-2) + " "; - ui->decodedTextBrowser->append("" - "" - "
"+ t + "
"); + //ui->decodedTextBrowser->append(t); + + QString s = "
" + t.replace("\n","") + "
"; + QTextCursor cursor = ui->decodedTextBrowser->textCursor(); + cursor.movePosition(QTextCursor::End); + QTextBlockFormat bf = cursor.blockFormat(); + bf.setBackground(QBrush(QColor(bg))); + cursor.insertHtml(s); + ui->decodedTextBrowser->setTextCursor(cursor); + QString msg=t.mid(34,22); bool b=stdmsg_(msg.toAscii().constData()); QStringList w=msg.split(" ",QString::SkipEmptyParts); @@ -1592,10 +1599,12 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl) } QString hiscall=t4.at(7); QString hisgrid=""; - if(t4.length()>=9) hisgrid=t4.at(8); + if(t4.length()>=9) + hisgrid=t4.at(8); ui->dxCallEntry->setText(hiscall); lookup(); - if(ui->dxGridEntry->text()=="" and gridOK(hisgrid)) ui->dxGridEntry->setText(hisgrid); + if(ui->dxGridEntry->text()=="" and gridOK(hisgrid)) + ui->dxGridEntry->setText(hisgrid); int n = 60*t2.mid(0,2).toInt() + t2.mid(2,2).toInt(); int nmod=n%(m_TRperiod/30); m_txFirst=(nmod!=0); diff --git a/mainwindow.ui b/mainwindow.ui index 4b8fa513b..d799e9f56 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -165,7 +165,7 @@ Qt::ScrollBarAsNeeded - <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> <html><head><meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Courier New'; font-size:10pt; font-weight:400; font-style:normal;"> @@ -174,6 +174,9 @@ p, li { white-space: pre-wrap; } false + + false + @@ -1527,8 +1530,8 @@ p, li { white-space: pre-wrap; } - - Qt::AlignCenter + + 4