From 54ec5b8413608cf81114b707790692f1adb3e5f0 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 26 Jul 2017 01:39:23 +0000 Subject: [PATCH] Better behavior and tool tips for Txn buttons and radio buttons git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7952 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 35 ++++++++++++++++++++++------------- mainwindow.ui | 8 ++++---- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index af02a6fdc..8dfa7d1f6 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2805,7 +2805,7 @@ void MainWindow::auto_sequence (QString const& message, unsigned tolerance) && !m_sentFirst73 // finished QSO && ((parts[5].contains (m_baseCall) // being called and not already in a QSO - && parts[6].contains (Radio::base_callsign (ui->dxCallEntry-> text ()))) + && parts[6].contains (Radio::base_callsign (ui->dxCallEntry->text ()))) // type 2 compound replies || (in_tolerance && ((m_QSOProgress >= ROGER_REPORT && message_is_73 (0, parts)) @@ -3447,25 +3447,34 @@ void MainWindow::set_ntx(int n) //set_ntx() m_ntx=n; } -void MainWindow::on_txrb1_toggled(bool status) +void MainWindow::on_txrb1_toggled (bool status) { if (status) { - m_ntx=1; - set_dateTimeQSO(-1); // we reset here as tx2/tx3 is used for start times + if (ui->tx1->isEnabled ()) { + m_ntx = 1; + set_dateTimeQSO (-1); // we reset here as tx2/tx3 is used for start times + } + else { + QTimer::singleShot (0, ui->txrb2, SLOT (click ())); + } } } -void MainWindow::on_txrb1_doubleClicked() +void MainWindow::on_txrb1_doubleClicked () { ui->tx1->setEnabled (!ui->tx1->isEnabled ()); + if (!ui->tx1->isEnabled ()) { + // leave time for clicks to complete before setting txrb2 + QTimer::singleShot (500, ui->txrb2, SLOT (click ())); + } } -void MainWindow::on_txrb2_toggled(bool status) +void MainWindow::on_txrb2_toggled (bool status) { // Tx 2 means we already have CQ'd so good reference if (status) { - m_ntx=2; - set_dateTimeQSO(m_ntx); + m_ntx = 2; + set_dateTimeQSO (m_ntx); } } @@ -3478,27 +3487,27 @@ void MainWindow::on_txrb3_toggled(bool status) } } -void MainWindow::on_txrb4_toggled(bool status) +void MainWindow::on_txrb4_toggled (bool status) { if (status) { m_ntx=4; } } -void MainWindow::on_txrb4_doubleClicked() +void MainWindow::on_txrb4_doubleClicked () { m_send_RR73 = !m_send_RR73; genStdMsgs (m_rpt); } -void MainWindow::on_txrb5_toggled(bool status) +void MainWindow::on_txrb5_toggled (bool status) { if (status) { - m_ntx=5; + m_ntx = 5; } } -void MainWindow::on_txrb5_doubleClicked() +void MainWindow::on_txrb5_doubleClicked () { genStdMsgs (m_rpt, true); } diff --git a/mainwindow.ui b/mainwindow.ui index 84a8ff293..e7a859f84 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -1099,7 +1099,7 @@ QLabel[oob="true"] { - Send this message in next Tx interval + <html><head/><body><p>Send this message in next Tx interval</p><p>Double click to toggle the use of the Tx1 message to start a QSO with a station</p></body></html> @@ -1121,7 +1121,7 @@ QLabel[oob="true"] { - Switch to this Tx message NOW + <html><head/><body><p>Switch to this Tx message NOW</p><p>Double click to toggle the use of the Tx1 message to start a QSO with a station</p></body></html> Qt::LeftToRight @@ -1237,7 +1237,7 @@ QLabel[oob="true"] { - Send this message in next Tx interval + <html><head/><body><p>Send this message in next Tx interval</p><p>Double-click to toggle between RRR and RR73 messages in Tx4</p><p>RR73 messages should only be used when you are reasonably confident that no message repititions will be required</p></body></html> @@ -1259,7 +1259,7 @@ QLabel[oob="true"] { - Switch to this Tx message NOW + <html><head/><body><p>Switch to this Tx message NOW</p><p>Double-click to toggle between RRR and RR73 messages in Tx4</p><p>RR73 messages should only be used when you are reasonably confident that no message repititions will be required</p></body></html> Tx &4