From 2b42650a73ec1e4d82c68c68941aefba7a440b7e Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Tue, 9 Apr 2019 08:48:13 -0400 Subject: [PATCH] Make the "Best S+P" button red when activated. --- widgets/mainwindow.cpp | 13 ++++--------- widgets/mainwindow.ui | 14 ++++++++++++++ 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 5dd5ed60e..fdefd8edb 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -1997,11 +1997,6 @@ void MainWindow::keyPressEvent (QKeyEvent * e) on_stopTxButton_clicked(); abortQSO(); return; - case Qt::Key_X: - if(e->modifiers() & Qt::AltModifier) { -// foxTest(); - return; - } case Qt::Key_E: if((e->modifiers() & Qt::ShiftModifier) and SpecOp::FOX > m_config.special_op_id()) { ui->txFirstCheckBox->setChecked(false); @@ -8702,8 +8697,8 @@ void MainWindow::chkFT4() void MainWindow::on_pbBestSP_clicked() { - if(!m_transmitting) { - ui->pbBestSP->setStyleSheet ("QPushButton{color:red}"); - m_bBestSPArmed=true; - } + m_bBestSPArmed = !m_bBestSPArmed; + ui->pbBestSP->setChecked(m_bBestSPArmed); +// if(m_bBestSPArmed and !m_transmitting) ui->pbBestSP->setStyleSheet ("QPushButton{color:red}"); +// if(!m_bBestSPArmed) ui->pbBestSP->setStyleSheet (""); } diff --git a/widgets/mainwindow.ui b/widgets/mainwindow.ui index bb5fe2ffa..8b7980742 100644 --- a/widgets/mainwindow.ui +++ b/widgets/mainwindow.ui @@ -1340,9 +1340,23 @@ QPushButton[state="ok"] { + + QPushButton:checked { + background-color: red; + border-style: outset; + border-width: 1px; + border-radius: 5px; + border-color: black; + min-width: 5em; + padding: 3px; +} + Best S+P + + true +