Offer two sets of controls for entering and selecting Tx messages:

1. The "WSJT Traditional" setof six line-edit fields, radio buttons,
and Tx# buttons;

2. New configuration with buttons that generate each message for the
standard minimum QSO, one at a time.

NB: the logic for these buttons is not yet complete.



git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3134 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2013-04-08 01:50:49 +00:00
parent 7d5bbf47c3
commit 56d49f985f
3 changed files with 1059 additions and 815 deletions

View File

@ -113,6 +113,10 @@ MainWindow::MainWindow(QWidget *parent) :
connect(ui->tx5, SIGNAL(customContextMenuRequested(const QPoint&)),
this, SLOT(showMacros(const QPoint&)));
ui->freeTextMsg->setContextMenuPolicy(Qt::CustomContextMenu);
connect(ui->freeTextMsg, SIGNAL(customContextMenuRequested(const QPoint&)),
this, SLOT(showMacros(const QPoint&)));
QTimer *guiTimer = new QTimer(this);
connect(guiTimer, SIGNAL(timeout()), this, SLOT(guiUpdate()));
guiTimer->start(100); //Don't change the 100 ms!
@ -1349,6 +1353,8 @@ void MainWindow::guiUpdate()
if(m_ntx == 4) ba=ui->tx4->text().toLocal8Bit();
if(m_ntx == 5) ba=ui->tx5->text().toLocal8Bit();
if(m_ntx == 6) ba=ui->tx6->text().toLocal8Bit();
if(m_ntx == 7) ba=ui->genMsg->text().toLocal8Bit();
if(m_ntx == 8) ba=ui->freeTextMsg->text().toLocal8Bit();
ba2msg(ba,message);
// ba2msg(ba,msgsent);
@ -1700,9 +1706,17 @@ void MainWindow::doubleClickOnCall(bool shift, bool ctrl)
if(t2.indexOf(m_myCall)>0) {
m_ntx=2;
ui->txrb2->setChecked(true);
if(ui->tabWidget->currentIndex()==1) {
ui->genMsg->setText(ui->tx2->text());
m_ntx=7;
}
} else {
m_ntx=1;
ui->txrb1->setChecked(true);
if(ui->tabWidget->currentIndex()==1) {
ui->genMsg->setText(ui->tx1->text());
m_ntx=7;
}
}
}
@ -1734,6 +1748,7 @@ void MainWindow::genStdMsgs(QString rpt) //genStdMsgs()
msgtype(t, ui->tx6);
m_ntx=1;
ui->txrb1->setChecked(true);
m_rpt=rpt;
}
void MainWindow::lookup() //lookup()
@ -2215,17 +2230,18 @@ void MainWindow::showMacros(const QPoint &pos)
popupMenu.exec(globalPos);
}
void MainWindow::onPopup1() { ui->tx5->setText(m_macro[0]); }
void MainWindow::onPopup2() { ui->tx5->setText(m_macro[1]); }
void MainWindow::onPopup3() { ui->tx5->setText(m_macro[2]); }
void MainWindow::onPopup4() { ui->tx5->setText(m_macro[3]); }
void MainWindow::onPopup5() { ui->tx5->setText(m_macro[4]); }
void MainWindow::onPopup6() { ui->tx5->setText(m_macro[5]); }
void MainWindow::onPopup7() { ui->tx5->setText(m_macro[6]); }
void MainWindow::onPopup8() { ui->tx5->setText(m_macro[7]); }
void MainWindow::onPopup9() { ui->tx5->setText(m_macro[8]); }
void MainWindow::onPopup10() { ui->tx5->setText(m_macro[9]); }
void MainWindow::onPopup1() { ui->tx5->setText(m_macro[0]); freeText(); }
void MainWindow::onPopup2() { ui->tx5->setText(m_macro[1]); freeText(); }
void MainWindow::onPopup3() { ui->tx5->setText(m_macro[2]); freeText(); }
void MainWindow::onPopup4() { ui->tx5->setText(m_macro[3]); freeText(); }
void MainWindow::onPopup5() { ui->tx5->setText(m_macro[4]); freeText(); }
void MainWindow::onPopup6() { ui->tx5->setText(m_macro[5]); freeText(); }
void MainWindow::onPopup7() { ui->tx5->setText(m_macro[6]); freeText(); }
void MainWindow::onPopup8() { ui->tx5->setText(m_macro[7]); freeText(); }
void MainWindow::onPopup9() { ui->tx5->setText(m_macro[8]); freeText(); }
void MainWindow::onPopup10() { ui->tx5->setText(m_macro[9]); freeText(); }
void MainWindow::freeText() { ui->freeTextMsg->setText(ui->tx5->text()); }
bool MainWindow::gridOK(QString g)
{
@ -2306,3 +2322,58 @@ void MainWindow::on_actionDisplay_distance_in_miles_triggered(bool checked)
m_bMiles=checked;
on_dxGridEntry_textChanged(m_hisGrid);
}
void MainWindow::on_pbCallCQ_clicked()
{
genStdMsgs(m_rpt);
ui->genMsg->setText(ui->tx6->text());
}
void MainWindow::on_pbAnswerCaller_clicked()
{
genStdMsgs(m_rpt);
ui->genMsg->setText(ui->tx2->text());
}
void MainWindow::on_pbSendRRR_clicked()
{
genStdMsgs(m_rpt);
ui->genMsg->setText(ui->tx4->text());
}
void MainWindow::on_pbAnswerCQ_clicked()
{
genStdMsgs(m_rpt);
ui->genMsg->setText(ui->tx1->text());
}
void MainWindow::on_pbSendReport_clicked()
{
genStdMsgs(m_rpt);
ui->genMsg->setText(ui->tx3->text());
}
void MainWindow::on_pbSend73_clicked()
{
genStdMsgs(m_rpt);
ui->genMsg->setText(ui->tx5->text());
}
void MainWindow::on_rbGenMsg_toggled(bool checked)
{
m_freeText=false;
}
void MainWindow::on_rbFreeText_toggled(bool checked)
{
m_freeText=true;
m_ntx=7;
}
void MainWindow::on_freeTextMsg_editingFinished()
{
QString t=ui->freeTextMsg->text();
msgtype(t, ui->freeTextMsg);
m_ntx=8;
qDebug() << m_ntx;
}

View File

@ -139,6 +139,24 @@ private slots:
void on_actionDisplay_distance_in_miles_triggered(bool checked);
void on_pbCallCQ_clicked();
void on_pbAnswerCaller_clicked();
void on_pbSendRRR_clicked();
void on_pbAnswerCQ_clicked();
void on_pbSendReport_clicked();
void on_pbSend73_clicked();
void on_rbGenMsg_toggled(bool checked);
void on_rbFreeText_toggled(bool checked);
void on_freeTextMsg_editingFinished();
private:
Ui::MainWindow *ui;
@ -222,6 +240,7 @@ private:
bool m_clearCallGrid;
bool m_bMiles;
bool m_decodedText2;
bool m_freeText;
char m_decoded[80];
@ -267,6 +286,7 @@ private:
QString m_dateTime;
QString m_mode;
QString m_fname;
QString m_rpt;
QString m_rptSent;
QString m_rptRcvd;
QString m_qsoStart;
@ -294,6 +314,7 @@ private:
void stub();
void statusChanged();
void dialFreqChanged2(double f);
void freeText();
bool gridOK(QString g);
QString rig_command();
};

File diff suppressed because it is too large Load Diff