mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 13:48:42 -05:00
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:
parent
7be033e8c2
commit
66c390de79
@ -7,7 +7,7 @@ namespace
|
||||
{
|
||||
//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)
|
||||
{
|
||||
|
@ -12,6 +12,10 @@ QString DecodedText::CQersCall()
|
||||
{
|
||||
s1 = 7 + position;
|
||||
}
|
||||
else if ((position = _string.indexOf (" CQDX ")) >= 0)
|
||||
{
|
||||
s1 = 6 + position;
|
||||
}
|
||||
else if ((position = _string.indexOf (" CQ ")) >= 0)
|
||||
{
|
||||
s1 = 4 + position;
|
||||
|
@ -147,7 +147,9 @@ void DisplayText::displayDecodedText(DecodedText decodedText, QString myCall,
|
||||
{
|
||||
QString bg="white";
|
||||
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;
|
||||
bg=color_CQ.name();
|
||||
|
@ -5044,7 +5044,9 @@ void MainWindow::replyToCQ (QTime time, qint32 snr, float delta_time, quint32 de
|
||||
|
||||
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
|
||||
QString format_string {"%1 %2 %3 %4 %5 %6"};
|
||||
|
Loading…
Reference in New Issue
Block a user