mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-08-11 02:12:25 -04:00
Extend grids looked up from CALL3.TXT from 4 to 6-digits if first 4 match
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7959 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
33b1742568
commit
0de8e994b9
@ -1776,7 +1776,7 @@ void MainWindow::keyPressEvent (QKeyEvent * e)
|
|||||||
break;
|
break;
|
||||||
case Qt::Key_L:
|
case Qt::Key_L:
|
||||||
if(e->modifiers() & Qt::ControlModifier) {
|
if(e->modifiers() & Qt::ControlModifier) {
|
||||||
lookup();
|
lookup (true);
|
||||||
genStdMsgs(m_rpt);
|
genStdMsgs(m_rpt);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -4203,7 +4203,7 @@ void MainWindow::clearDX ()
|
|||||||
m_QSOProgress = CALLING;
|
m_QSOProgress = CALLING;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::lookup() //lookup()
|
void MainWindow::lookup (bool extend_grid)
|
||||||
{
|
{
|
||||||
QString hisCall {ui->dxCallEntry->text()};
|
QString hisCall {ui->dxCallEntry->text()};
|
||||||
if (!hisCall.size ()) return;
|
if (!hisCall.size ()) return;
|
||||||
@ -4215,7 +4215,7 @@ void MainWindow::lookup() //lookup()
|
|||||||
for(int i=0; i<999999; i++) {
|
for(int i=0; i<999999; i++) {
|
||||||
n=f.readLine(c,sizeof(c));
|
n=f.readLine(c,sizeof(c));
|
||||||
if(n <= 0) {
|
if(n <= 0) {
|
||||||
ui->dxGridEntry->clear ();
|
if (!extend_grid) ui->dxGridEntry->clear ();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
QString t=QString(c);
|
QString t=QString(c);
|
||||||
@ -4228,7 +4228,10 @@ void MainWindow::lookup() //lookup()
|
|||||||
} else {
|
} else {
|
||||||
hisgrid=hisgrid.mid(0,4) + hisgrid.mid(4,2).toLower();
|
hisgrid=hisgrid.mid(0,4) + hisgrid.mid(4,2).toLower();
|
||||||
}
|
}
|
||||||
ui->dxGridEntry->setText(hisgrid);
|
if (!ui->dxGridEntry->text ().size ()
|
||||||
|
|| (extend_grid && 6 == hisgrid.size () && hisgrid.left (4) == ui->dxGridEntry->text ())) {
|
||||||
|
ui->dxGridEntry->setText(hisgrid);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4238,7 +4241,7 @@ void MainWindow::lookup() //lookup()
|
|||||||
|
|
||||||
void MainWindow::on_lookupButton_clicked() //Lookup button
|
void MainWindow::on_lookupButton_clicked() //Lookup button
|
||||||
{
|
{
|
||||||
lookup();
|
lookup (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::on_addButton_clicked() //Add button
|
void MainWindow::on_addButton_clicked() //Add button
|
||||||
|
@ -578,7 +578,8 @@ private:
|
|||||||
void genStdMsgs(QString rpt, bool unconditional = false);
|
void genStdMsgs(QString rpt, bool unconditional = false);
|
||||||
void genCQMsg();
|
void genCQMsg();
|
||||||
void clearDX ();
|
void clearDX ();
|
||||||
void lookup();
|
void lookup (bool extend_grid = false); // extend_grid will fetch a
|
||||||
|
// 6-digit grid if available
|
||||||
void ba2msg(QByteArray ba, char* message);
|
void ba2msg(QByteArray ba, char* message);
|
||||||
void msgtype(QString t, QLineEdit* tx);
|
void msgtype(QString t, QLineEdit* tx);
|
||||||
void stub();
|
void stub();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user