From 575f6cc0e805473fe8630032db37b4f0ec1155f1 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Fri, 27 Dec 2019 19:46:36 -0500 Subject: [PATCH] Added up/down indicators for VFO --- CMakeLists.txt | 3 +++ artwork/down.png | Bin 263 -> 212 bytes artwork/up.png | Bin 271 -> 209 bytes images.qrc | 4 ++-- mainwindow.cpp | 12 ++++++++++ mainwindow.h | 2 ++ mainwindow.ui | 58 +++++++++++++++++++++++++++++++---------------- 7 files changed, 57 insertions(+), 22 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index df08e23..0ce7dfd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -867,6 +867,9 @@ set (QT_MKSPECS_DIR ${QT_DATA_DIR}/mkspecs) set (CMAKE_AUTOMOC ON) include_directories (${CMAKE_CURRENT_BINARY_DIR}) +# Tell CMake to run rcc when necessary +set (CMAKE_AUTORCC ON) + # don't use Qt "keywords" signal, slot, emit in generated files to # avoid compatability issue with other libraries # ADD_DEFINITIONS (-DQT_NO_KEYWORDS) diff --git a/artwork/down.png b/artwork/down.png index 233e185f98038aaf86445fc541df85513005819e..98206eb9053b9c871abcdd45a0d6687d5e456848 100644 GIT binary patch delta 159 zcmZo?y27Z~8Q|y6%O%Cdz`(%k>ERLtq(N*p4mKe9>jVF>iHcI(4D~=xJ>!mTXF4ak zX`}^ux;Tb#%xvv5vCEyB7f#?L>08m@?8L;oDc5iP4;Gbv!{vEA| z|3@p}>(PSvcC-MVkM6+tqZxQPbOT-ERLtq(N*p4mKe9>jVF>iHcI(4D~=xJ>!mTXF4ak zX(ao3x;Tb#%&a|U&FA1C(R%T|@=1eIEVlM delta 219 zcmV<103`p>0gnP9iBL{Q4GJ0x0000DNk~Le0000U0000H2nGNE0Lo?@cab3)3juuq z00DggVEt}`kwz$gj7da6R7i=v(z^}9KoADuvFU-noERYiA#_G#yhIIP4G9QK1f0)z zI|c0b2MZagoqASJYL{~(2kq5|-=69w8Xe=?XtW-lfR@K6pylukbUr=<&BqI%)A536 zI$i<&kE^Rn=osHcqd$0~_P`NXBt60W24LN&cVHQWe!8_H?*-8fEwBf!f#?M|yZ{o% VI#XKd01f~E002ovPDHLkV1i`?QPThb diff --git a/images.qrc b/images.qrc index f215a51..3edc439 100644 --- a/images.qrc +++ b/images.qrc @@ -1,6 +1,6 @@ - artwork/up.png - artwork/down.png + artwork/up.png + artwork/down.png diff --git a/mainwindow.cpp b/mainwindow.cpp index 7ae3980..5d9b59e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include "revision_utils.hpp" #include "qt_helpers.hpp" @@ -1581,6 +1582,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, gridButtonLayout->setColumnStretch(1, 1); gridButtonLayout->setColumnStretch(2, 1); + // dial up and down buttons sizes + ui->dialFreqUpButton->setFixedSize(30, 24); + ui->dialFreqDownButton->setFixedSize(30, 24); // Prepare spotting configuration... prepareSpotting(); @@ -3620,6 +3624,14 @@ void MainWindow::on_labDialFreq_clicked() //dialFrequency ui->bandComboBox->setFocus(); } +void MainWindow::on_dialFreqUpButton_clicked(){ + setRig(m_freqNominal + 250); +} + +void MainWindow::on_dialFreqDownButton_clicked(){ + setRig(m_freqNominal - 250); +} + void MainWindow::on_stopButton_clicked() //stopButton { monitor (false); diff --git a/mainwindow.h b/mainwindow.h index b534cc1..dc5b8dd 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -212,6 +212,8 @@ private slots: void resetPushButtonToggleText(QPushButton *btn); void on_monitorTxButton_clicked(); void on_stopTxButton_clicked(); + void on_dialFreqUpButton_clicked(); + void on_dialFreqDownButton_clicked(); void on_stopButton_clicked(); void on_actionAdd_Log_Entry_triggered(); void on_actionRelease_Notes_triggered (); diff --git a/mainwindow.ui b/mainwindow.ui index 551ccf3..5188054 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -238,6 +238,9 @@ + + 0 + 0 @@ -245,57 +248,72 @@ - 0 - 0 + 30 + 24 30 - 30 + 24 + + PointingHandCursor + false QPushButton { background-color:#000; - background-image:url("/images/up.png"); + background-image:url(":/images/artwork/up.png"); background-position: center center; - background-repeate:no-repeat; + background-repeat:no-repeat; + border:1px solid; + border-radius:2px; +} + +QPushButton:pressed { + background-color:#222; } - - - - - true - + + + 30 + 24 + + 30 - 30 + 24 + + PointingHandCursor + + + false + QPushButton { background-color:#000; - background-image:url("/images/down.png"); + background-image:url(":/images/artwork/down.png"); background-position: center center; - background-repeate:no-repeat; + background-repeat:no-repeat; + border:1px solid; + border-radius:2px; +} + +QPushButton:pressed { + background-color:#222; } - - - - - true -