More consistent highlighting and processing of general call messages

Highlight,  in the  CQ  colour, CQDX  ... and  QRZ  ...  messages  and
process correctly for worked before and DXCC entity.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6753 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2016-06-09 23:39:48 +00:00
parent 7be033e8c2
commit 66c390de79
4 changed files with 11 additions and 3 deletions

View File

@ -7,7 +7,7 @@ namespace
{ {
//QRegExp message_alphabet {"[- A-Za-z0-9+./?]*"}; //QRegExp message_alphabet {"[- A-Za-z0-9+./?]*"};
QRegExp message_alphabet {"[- @A-Za-z0-9+./?#<>]*"}; QRegExp message_alphabet {"[- @A-Za-z0-9+./?#<>]*"};
QRegularExpression cq_re {"[^A-Z0-9]*(CQ|QRZ)[^A-Z0-9]*"}; QRegularExpression cq_re {"(CQ|CQDX|QRZ)[^A-Z0-9/]+"};
void update_dynamic_property (QWidget * widget, char const * property, QVariant const& value) void update_dynamic_property (QWidget * widget, char const * property, QVariant const& value)
{ {

View File

@ -12,6 +12,10 @@ QString DecodedText::CQersCall()
{ {
s1 = 7 + position; s1 = 7 + position;
} }
else if ((position = _string.indexOf (" CQDX ")) >= 0)
{
s1 = 6 + position;
}
else if ((position = _string.indexOf (" CQ ")) >= 0) else if ((position = _string.indexOf (" CQ ")) >= 0)
{ {
s1 = 4 + position; s1 = 4 + position;

View File

@ -147,7 +147,9 @@ void DisplayText::displayDecodedText(DecodedText decodedText, QString myCall,
{ {
QString bg="white"; QString bg="white";
bool CQcall = false; bool CQcall = false;
if (decodedText.string ().contains (" CQ ") > 0 || decodedText.string ().contains (" CQ DX ")) if (decodedText.string ().contains (" CQ ")
|| decodedText.string ().contains (" CQDX ")
|| decodedText.string ().contains (" QRZ "))
{ {
CQcall = true; CQcall = true;
bg=color_CQ.name(); bg=color_CQ.name();

View File

@ -5044,7 +5044,9 @@ void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 de
auto decode_parts = message_text.split (' ', QString::SkipEmptyParts); auto decode_parts = message_text.split (' ', QString::SkipEmptyParts);
if (decode_parts.contains ("CQ") || decode_parts.contains ("QRZ")) if (decode_parts[0] == "CQ"
|| decode_parts[0] == "CQDX"
|| decode_parts[0] == "QRZ")
{ {
// a message we are willing to accept // a message we are willing to accept
QString format_string {"%1 %2 %3 %4 %5 %6"}; QString format_string {"%1 %2 %3 %4 %5 %6"};