Made the UDP message to change the free text message optionally send ASAP

This  message now  has  the ability  to simply  change  the free  text
message or to change the message and send it ASAP.

The message_aggregator reference UDP server application exercises this
feature by sending a new free  text message on any edit and requesting
it be sent  by WSJT-X when editing is finished  i,e, RETURN pressed or
focus moved away.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5445 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville
2015-05-28 17:33:39 +00:00
parent 0f7708a98a
commit 4bf1471d2b
7 changed files with 34 additions and 22 deletions
+8 -4
View File
@@ -203,14 +203,18 @@ MainWindow::MainWindow(bool multiple, QSettings * settings, QSharedMemory *shdme
}
});
connect (m_messageClient, &MessageClient::error, this, &MainWindow::networkError);
connect (m_messageClient, &MessageClient::free_text, [this] (QString const& text) {
connect (m_messageClient, &MessageClient::free_text, [this] (QString const& text, bool send) {
if (m_config.accept_udp_requests ()) {
if (0 == ui->tabWidget->currentIndex ()) {
ui->tx5->setCurrentText (text);
ui->txrb5->click ();
} else {
if (send) {
ui->txb5->click ();
}
} else if (1 == ui->tabWidget->currentIndex ()) {
ui->freeTextMsg->setCurrentText (text);
ui->rbFreeText->click ();
if (send) {
ui->rbFreeText->click ();
}
}
}
});