From 9ec1180044723bf29f1455fa7b3e855c52eead95 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 21 Jan 2016 21:12:12 +0000 Subject: [PATCH] Attempting to make WSJT-X display messages like " R26". [For now, I'll make do with () in place of <>.] git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6418 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- Configuration.cpp | 4 +++- MessageAggregator.cpp | 3 ++- displaytext.cpp | 6 +++--- lib/jtmsk_decode.f90 | 2 -- lib/jtmsk_short.f90 | 1 - wsjtx.pro | 3 ++- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/Configuration.cpp b/Configuration.cpp index 644257f7e..f539759a5 100644 --- a/Configuration.cpp +++ b/Configuration.cpp @@ -190,7 +190,9 @@ namespace int const combo_box_item_enabled (32 | 1); int const combo_box_item_disabled (0); - QRegExp message_alphabet {"[- A-Za-z0-9+./?]*"}; +// QRegExp message_alphabet {"[- A-Za-z0-9+./?]*"}; + QRegExp message_alphabet {"[- @A-Za-z0-9+./?#<>]*"}; + } diff --git a/MessageAggregator.cpp b/MessageAggregator.cpp index 85ca48ba0..e949fb42d 100644 --- a/MessageAggregator.cpp +++ b/MessageAggregator.cpp @@ -52,7 +52,8 @@ using port_type = MessageServer::port_type; using Frequency = MessageServer::Frequency; -QRegExp message_alphabet {"[- A-Za-z0-9+./?]*"}; +//QRegExp message_alphabet {"[- A-Za-z0-9+./?]*"}; +QRegExp message_alphabet {"[- @A-Za-z0-9+./?#<>]*"}; // // Decodes Model - simple data model for all decodes diff --git a/displaytext.cpp b/displaytext.cpp index d66056d1e..eaa42c8fd 100644 --- a/displaytext.cpp +++ b/displaytext.cpp @@ -52,8 +52,10 @@ void DisplayText::insertLineSpacer(QString const& line) void DisplayText::appendText(QString const& text, QString const& bg) { + QString t=text.trimmed().replace('<','('); + t=t.replace('>',')'); QString s = "
" + text.trimmed ().replace (' ', " ") + "
"; + bg + "\">" + t.trimmed ().replace (' ', " ") + ""; auto cursor = textCursor (); cursor.movePosition (QTextCursor::End); auto pos = cursor.position (); @@ -66,7 +68,6 @@ void DisplayText::appendText(QString const& text, QString const& bg) // position so viewport scrolled to left cursor.movePosition (QTextCursor::Up); cursor.movePosition (QTextCursor::StartOfLine); - setTextCursor (cursor); ensureCursorVisible (); } @@ -163,7 +164,6 @@ void DisplayText::displayDecodedText(DecodedText decodedText, QString myCall, if (displayDXCCEntity && CQcall) _appendDXCCWorkedB4(/*mod*/decodedText,bg,logBook,color_CQ, color_DXCC,color_NewCall); - appendText(decodedText.string(),bg); } diff --git a/lib/jtmsk_decode.f90 b/lib/jtmsk_decode.f90 index 20408c87b..75c56c7f9 100644 --- a/lib/jtmsk_decode.f90 +++ b/lib/jtmsk_decode.f90 @@ -59,7 +59,6 @@ subroutine jtmsk_decode(id2,narg,line) call jtmsk_short(c,npts,msg1,msg) !### Needs work! - print*,'b ',msg nsnr=1 if(msg.ne.' ') then if(msg.ne.msg0) then @@ -126,7 +125,6 @@ subroutine jtmsk_decode(id2,narg,line) enddo 900 if(line(1)(1:6).eq.' ') line(1)(1:1)=char(0) - print*,'z ',line(1) return end subroutine jtmsk_decode diff --git a/lib/jtmsk_short.f90 b/lib/jtmsk_short.f90 index 3e13dc3f8..bf3264a8f 100644 --- a/lib/jtmsk_short.f90 +++ b/lib/jtmsk_short.f90 @@ -128,7 +128,6 @@ subroutine jtmsk_short(cdat,npts,msg,decoded) n=1 decoded=msg(1:14)//rpt(irpt) endif - print*,'a ', decoded go to 900 ! if(n.eq.0) nbad=nbad+1 diff --git a/wsjtx.pro b/wsjtx.pro index 60a79ded0..fa42195dc 100644 --- a/wsjtx.pro +++ b/wsjtx.pro @@ -64,7 +64,8 @@ SOURCES += \ getfile.cpp soundout.cpp soundin.cpp meterwidget.cpp signalmeter.cpp \ WFPalette.cpp plotter.cpp widegraph.cpp about.cpp WsprTxScheduler.cpp mainwindow.cpp \ main.cpp decodedtext.cpp wsprnet.cpp messageaveraging.cpp \ - echoplot.cpp echograph.cpp fastgraph.cpp fastplot.cpp Modes.cpp WSPRBandHopping.cpp + echoplot.cpp echograph.cpp fastgraph.cpp fastplot.cpp Modes.cpp \ + WSPRBandHopping.cpp MessageAggregator.cpp HEADERS += qt_helpers.hpp \ pimpl_h.hpp pimpl_impl.hpp \