Retain CQ messages like "CQ xxxx K1ABC FN42", where xxxx is 1-4 letters or 1-3 digits.

This commit is contained in:
Joe Taylor 2018-12-27 13:14:01 -05:00
parent db5c9e1fe9
commit ba83ae0587
1 changed files with 4 additions and 1 deletions

View File

@ -5274,8 +5274,11 @@ void MainWindow::on_tx6_editingFinished() //tx6 edited
QString t=ui->tx6->text().toUpper();
if(t.indexOf(" ")>0) {
QString t1=t.split(" ").at(1);
QRegExp AZ4("^[A-Z]{1,4}$");
QRegExp NN3("^[0-9]{1,3}$");
m_CQtype="CQ";
if(t1.size()==2) m_CQtype="CQ " + t1;
if(t1.size()<=4 and t1.contains(AZ4)) m_CQtype="CQ " + t1;
if(t1.size()<=3 and t1.contains(NN3)) m_CQtype="CQ " + t1;
}
msgtype(t, ui->tx6);
}