From 7d477606f03d5b6566be22e06eee3831e55cd8e3 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Wed, 9 Mar 2016 15:47:26 +0000 Subject: [PATCH] Add a shift+click waterfall option to set Tx DF Thanks to Mike W9MDB for contributing this patch. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6512 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- doc/user_guide/en/tutorial-example1.adoc | 2 ++ mouse_commands.txt | 8 +++++--- plotter.cpp | 17 +++++++++++++---- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/doc/user_guide/en/tutorial-example1.adoc b/doc/user_guide/en/tutorial-example1.adoc index 03623d046..280b69462 100644 --- a/doc/user_guide/en/tutorial-example1.adoc +++ b/doc/user_guide/en/tutorial-example1.adoc @@ -84,6 +84,8 @@ call CQ again.) - Click somewhere on the waterfall to set Rx frequency (green marker on waterfall scale). +- Shift-click on the waterfall to set Tx frequency (red marker). + - Ctrl-click on the waterfall to set both Rx and Tx frequencies. - Double-click on a signal in the waterfall to set Rx frequency and diff --git a/mouse_commands.txt b/mouse_commands.txt index 929399a2b..0cf030695 100644 --- a/mouse_commands.txt +++ b/mouse_commands.txt @@ -5,9 +5,11 @@ Waterfall: - Set Rx frequency.
- Double-click to set Rx frequency and decode there.
- Ctrl-click to set Rx and Tx frequencies and decode. + Click to set the Rx frequency.
+ Shift-click to set Tx frequency.
+ Ctrl-click to set Rx and Tx frequencies.
+ Double-clicks decode at the resulting Rx frequency.
+ If Lock Tx=Rx is checked all actions set Tx/Rx. diff --git a/plotter.cpp b/plotter.cpp index 8f5d12b2a..264c9b748 100644 --- a/plotter.cpp +++ b/plotter.cpp @@ -520,11 +520,20 @@ void CPlotter::mousePressEvent(QMouseEvent *event) //mousePressEvent if(x<0) x=0; if(x>m_Size.width()) x=m_Size.width(); bool ctrl = (event->modifiers() & Qt::ControlModifier); - int freq = int(FreqfromX(x)+0.5); - int tx_freq = m_txFreq; - if (ctrl or m_lockTxFreq) tx_freq = freq; + bool shift = (event->modifiers() & Qt::ShiftModifier); + int newFreq = int(FreqfromX(x)+0.5); + int oldTxFreq = m_txFreq; + int oldRxFreq = m_rxFreq; - emit setFreq1 (freq, tx_freq); + if (ctrl or m_lockTxFreq) { + emit setFreq1 (newFreq, newFreq); + } + else if (shift) { + emit setFreq1 (oldRxFreq, newFreq); + } + else { + emit setFreq1(newFreq,oldTxFreq); + } int n=1; if(ctrl) n+=100;