Allow for new directional CQ messages in message processing

Also relax entry validation so it  is easier to enter standard message
forms longer than 13 characters into message entry line edits.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7294 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville
2016-11-05 19:41:03 +00:00
parent dc62eb04ad
commit 5152778813
2 changed files with 7 additions and 15 deletions
+5 -4
View File
@@ -1,7 +1,8 @@
#include <QStringList>
#include <QDebug>
#include "decodedtext.h"
#include <QStringList>
#include <QRegularExpression>
QString DecodedText::CQersCall()
{
// extract the CQer's call TODO: does this work with all call formats?
@@ -123,7 +124,7 @@ bool DecodedText::report(QString const& myBaseCall, QString const& dxBaseCall, /
QString DecodedText::call()
{
auto call = _string;
call = call.replace (" CQ DX ", " CQ_DX ").mid (column_qsoText);
call = call.replace (QRegularExpression {" CQ ([A-Z]{2,2}) "}, " CQ_\\1 ").mid (column_qsoText);
int i = call.indexOf(" ");
return call.mid(0,i);
}
@@ -132,7 +133,7 @@ QString DecodedText::call()
void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid)
{
auto msg = _string;
msg = msg.replace (" CQ DX ", " CQ_DX ").mid (column_qsoText);
msg = msg.replace (QRegularExpression {" CQ ([A-Z]{2,2}) "}, " CQ_\\1 ").mid (column_qsoText);
int i1 = msg.indexOf(" ");
call = msg.mid(i1+1);
int i2 = call.indexOf(" ");