kopia lustrzana https://gitlab.com/eliggett/wfview
Merge remote-tracking branch 'origin/ui-enhance' into lan-alpha
commit
b4ea60e5d2
|
@ -16,7 +16,7 @@
|
||||||
// The IC-7300 "full" manual also contains a command reference.
|
// The IC-7300 "full" manual also contains a command reference.
|
||||||
|
|
||||||
// How to make spectrum display stop using rigctl:
|
// How to make spectrum display stop using rigctl:
|
||||||
// echo "w \0xFE\0xFE\0x94\0xE0\0x27\0x11\0x00\0xFD" | rigctl -m 373 -r /dev/ttyUSB0 -s 115200 -vvvvv
|
// echo "w \0xFE\0xFE\0x94\0xE0\0x27\0x11\0x00\0xFD" | rigctl -m 3073 -r /dev/ttyUSB0 -s 115200 -vvvvv
|
||||||
|
|
||||||
// Note: When sending \x00, must use QByteArray.setRawData()
|
// Note: When sending \x00, must use QByteArray.setRawData()
|
||||||
|
|
||||||
|
@ -242,7 +242,7 @@ void rigCommander::disableSpectrumDisplay()
|
||||||
|
|
||||||
void rigCommander::setSpectrumBounds(double startFreq, double endFreq, unsigned char edgeNumber)
|
void rigCommander::setSpectrumBounds(double startFreq, double endFreq, unsigned char edgeNumber)
|
||||||
{
|
{
|
||||||
if((edgeNumber > 3) || (!edgeNumber))
|
if((edgeNumber > 4) || (!edgeNumber))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -342,7 +342,7 @@ void rigCommander::setScopeEdge(char edge)
|
||||||
{
|
{
|
||||||
// 1 2 or 3
|
// 1 2 or 3
|
||||||
// 27 16 00 0X
|
// 27 16 00 0X
|
||||||
if((edge <1) || (edge >3))
|
if((edge <1) || (edge >4))
|
||||||
return;
|
return;
|
||||||
QByteArray payload;
|
QByteArray payload;
|
||||||
payload.setRawData("\x27\x16\x00", 3);
|
payload.setRawData("\x27\x16\x00", 3);
|
||||||
|
|
52
wfmain.cpp
52
wfmain.cpp
|
@ -257,7 +257,7 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
||||||
spans << "50k" << "100k" << "250k" << "500k";
|
spans << "50k" << "100k" << "250k" << "500k";
|
||||||
ui->scopeBWCombo->insertItems(0, spans);
|
ui->scopeBWCombo->insertItems(0, spans);
|
||||||
|
|
||||||
edges << "1" << "2" << "3"; // yep
|
edges << "1" << "2" << "3" << "4"; // yep
|
||||||
ui->scopeEdgeCombo->insertItems(0, edges);
|
ui->scopeEdgeCombo->insertItems(0, edges);
|
||||||
|
|
||||||
ui->splitter->setHandleWidth(5);
|
ui->splitter->setHandleWidth(5);
|
||||||
|
@ -429,8 +429,8 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
||||||
|
|
||||||
drawPeaks = false;
|
drawPeaks = false;
|
||||||
|
|
||||||
SMeterReadings.fill(0,10);
|
SMeterReadings.fill(0,30);
|
||||||
powerMeterReadings.fill(0,10);
|
powerMeterReadings.fill(0,30);
|
||||||
|
|
||||||
|
|
||||||
ui->freqMhzLineEdit->setValidator( new QDoubleValidator(0, 100, 6, this));
|
ui->freqMhzLineEdit->setValidator( new QDoubleValidator(0, 100, 6, this));
|
||||||
|
@ -443,6 +443,9 @@ wfmain::wfmain(const QString serialPortCL, const QString hostCL, QWidget *parent
|
||||||
pttTimer->setSingleShot(true);
|
pttTimer->setSingleShot(true);
|
||||||
connect(pttTimer, SIGNAL(timeout()), this, SLOT(handlePttLimit()));
|
connect(pttTimer, SIGNAL(timeout()), this, SLOT(handlePttLimit()));
|
||||||
amTransmitting = false;
|
amTransmitting = false;
|
||||||
|
ui->tuneLockChk->setChecked(false);
|
||||||
|
freqLock = false;
|
||||||
|
|
||||||
|
|
||||||
// Not needed since we automate this now.
|
// Not needed since we automate this now.
|
||||||
/*
|
/*
|
||||||
|
@ -1194,6 +1197,7 @@ void wfmain::setTuningSteps()
|
||||||
tsPlusShift = 0.0001f;
|
tsPlusShift = 0.0001f;
|
||||||
tsPage = 1.0f;
|
tsPage = 1.0f;
|
||||||
tsPageShift = 0.5f; // TODO, unbind this keystroke from the dial
|
tsPageShift = 0.5f; // TODO, unbind this keystroke from the dial
|
||||||
|
tsWfScroll = 0.0001f;
|
||||||
}
|
}
|
||||||
|
|
||||||
double wfmain::roundFrequency(double frequency)
|
double wfmain::roundFrequency(double frequency)
|
||||||
|
@ -2016,8 +2020,7 @@ void wfmain::handlePlotDoubleClick(QMouseEvent *me)
|
||||||
//y = plot->yAxis->pixelToCoord(me->pos().y());
|
//y = plot->yAxis->pixelToCoord(me->pos().y());
|
||||||
x = plot->xAxis->pixelToCoord(me->pos().x());
|
x = plot->xAxis->pixelToCoord(me->pos().x());
|
||||||
emit setFrequency(x);
|
emit setFrequency(x);
|
||||||
cmdOut = cmdGetFreq;
|
issueDelayedCommand(cmdGetFreq);
|
||||||
delayedCommand->start();
|
|
||||||
showStatusBarText(QString("Going to %1 MHz").arg(x));
|
showStatusBarText(QString("Going to %1 MHz").arg(x));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2033,8 +2036,7 @@ void wfmain::handleWFDoubleClick(QMouseEvent *me)
|
||||||
{
|
{
|
||||||
x = plot->xAxis->pixelToCoord(me->pos().x());
|
x = plot->xAxis->pixelToCoord(me->pos().x());
|
||||||
emit setFrequency(x);
|
emit setFrequency(x);
|
||||||
cmdOut = cmdGetFreq;
|
issueDelayedCommand(cmdGetFreq);
|
||||||
delayedCommand->start();
|
|
||||||
showStatusBarText(QString("Going to %1 MHz").arg(x));
|
showStatusBarText(QString("Going to %1 MHz").arg(x));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2058,36 +2060,54 @@ void wfmain::handleWFScroll(QWheelEvent *we)
|
||||||
// We will click the dial once for every 120 received.
|
// We will click the dial once for every 120 received.
|
||||||
//QPoint delta = we->angleDelta();
|
//QPoint delta = we->angleDelta();
|
||||||
|
|
||||||
// TODO: Use other method, knob has too few positions to be useful for large steps.
|
if(freqLock)
|
||||||
|
return;
|
||||||
|
|
||||||
|
int clicks = we->angleDelta().y() / 120;
|
||||||
|
|
||||||
|
float steps = tsWfScroll * clicks;
|
||||||
|
|
||||||
int steps = we->angleDelta().y() / 120;
|
|
||||||
Qt::KeyboardModifiers key= we->modifiers();
|
Qt::KeyboardModifiers key= we->modifiers();
|
||||||
|
|
||||||
if (key == Qt::ShiftModifier)
|
if (key == Qt::ShiftModifier)
|
||||||
{
|
{
|
||||||
steps *=20;
|
steps /= 10;
|
||||||
} else if (key == Qt::ControlModifier)
|
} else if (key == Qt::ControlModifier)
|
||||||
{
|
{
|
||||||
steps *=10;
|
steps *=10;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->freqDial->setValue( ui->freqDial->value() + (steps)*ui->freqDial->singleStep() );
|
freqMhz = roundFrequency(freqMhz - steps);
|
||||||
|
knobFreqMhz = freqMhz;
|
||||||
|
emit setFrequency(freqMhz);
|
||||||
|
ui->freqLabel->setText(QString("%1").arg(freqMhz, 0, 'f'));
|
||||||
|
issueDelayedCommand(cmdGetFreq);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wfmain::handlePlotScroll(QWheelEvent *we)
|
void wfmain::handlePlotScroll(QWheelEvent *we)
|
||||||
{
|
{
|
||||||
int steps = we->angleDelta().y() / 120;
|
if(freqLock)
|
||||||
|
return;
|
||||||
|
|
||||||
|
int clicks = we->angleDelta().y() / 120;
|
||||||
|
|
||||||
|
float steps = tsWfScroll * clicks;
|
||||||
|
|
||||||
Qt::KeyboardModifiers key= we->modifiers();
|
Qt::KeyboardModifiers key= we->modifiers();
|
||||||
|
|
||||||
if (key == Qt::ShiftModifier)
|
if (key == Qt::ShiftModifier)
|
||||||
{
|
{
|
||||||
// TODO: Zoom
|
steps /= 10;
|
||||||
} else if (key == Qt::ControlModifier)
|
} else if (key == Qt::ControlModifier)
|
||||||
{
|
{
|
||||||
steps *=10;
|
steps *=10;
|
||||||
}
|
}
|
||||||
|
|
||||||
ui->freqDial->setValue( ui->freqDial->value() + (steps)*ui->freqDial->singleStep() );
|
freqMhz = roundFrequency(freqMhz - steps);
|
||||||
|
knobFreqMhz = freqMhz;
|
||||||
|
emit setFrequency(freqMhz);
|
||||||
|
ui->freqLabel->setText(QString("%1").arg(freqMhz, 0, 'f'));
|
||||||
|
issueDelayedCommand(cmdGetFreq);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wfmain::on_scopeEnableWFBtn_clicked(bool checked)
|
void wfmain::on_scopeEnableWFBtn_clicked(bool checked)
|
||||||
|
@ -2204,9 +2224,7 @@ void wfmain::on_goFreqBtn_clicked()
|
||||||
if(ok)
|
if(ok)
|
||||||
{
|
{
|
||||||
emit setFrequency(freq);
|
emit setFrequency(freq);
|
||||||
// TODO: change to cmdQueue
|
issueDelayedCommand(cmdGetFreq);
|
||||||
cmdOut = cmdGetFreq;
|
|
||||||
delayedCommand->start();
|
|
||||||
}
|
}
|
||||||
ui->freqMhzLineEdit->selectAll();
|
ui->freqMhzLineEdit->selectAll();
|
||||||
freqTextSelected = true;
|
freqTextSelected = true;
|
||||||
|
|
1
wfmain.h
1
wfmain.h
|
@ -604,6 +604,7 @@ private:
|
||||||
float tsPlusControl;
|
float tsPlusControl;
|
||||||
float tsPage;
|
float tsPage;
|
||||||
float tsPageShift;
|
float tsPageShift;
|
||||||
|
float tsWfScroll;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
31
wfmain.ui
31
wfmain.ui
|
@ -18,7 +18,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>3</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="mainTab">
|
<widget class="QWidget" name="mainTab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -63,7 +63,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="scopeBWCombo"/>
|
<widget class="QComboBox" name="scopeBWCombo">
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QComboBox::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="label_7">
|
<widget class="QLabel" name="label_7">
|
||||||
|
@ -73,7 +77,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="scopeEdgeCombo"/>
|
<widget class="QComboBox" name="scopeEdgeCombo">
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QComboBox::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="toFixedBtn">
|
<widget class="QPushButton" name="toFixedBtn">
|
||||||
|
@ -247,6 +255,9 @@
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Tuning Step Selection possibly. Or not...</string>
|
<string>Tuning Step Selection possibly. Or not...</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QComboBox::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -277,7 +288,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="modeSelectCombo"/>
|
<widget class="QComboBox" name="modeSelectCombo">
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QComboBox::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="dataModeBtn">
|
<widget class="QCheckBox" name="dataModeBtn">
|
||||||
|
@ -297,7 +312,11 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="modeFilterCombo"/>
|
<widget class="QComboBox" name="modeFilterCombo">
|
||||||
|
<property name="sizeAdjustPolicy">
|
||||||
|
<enum>QComboBox::AdjustToContents</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
@ -1978,7 +1997,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>810</width>
|
<width>810</width>
|
||||||
<height>21</height>
|
<height>22</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
|
Ładowanie…
Reference in New Issue