Hide scope/wf for non-scope rigs

creator-widgets
Phil Taylor 2024-04-21 17:50:42 +01:00
rodzic d1c11ed0b4
commit cc106b3775
3 zmienionych plików z 23 dodań i 6 usunięć

Wyświetl plik

@ -2,8 +2,8 @@
#include "logcategories.h"
#include "rigidentities.h"
spectrumScope::spectrumScope(uchar receiver, uchar vfo, QWidget *parent)
: QGroupBox{parent}, receiver(receiver), numVFO(vfo)
spectrumScope::spectrumScope(bool scope, uchar receiver, uchar vfo, QWidget *parent)
: QGroupBox{parent}, receiver(receiver), numVFO(vfo),hasScope(scope)
{
QMutexLocker locker(&mutex);
@ -12,7 +12,7 @@ spectrumScope::spectrumScope(uchar receiver, uchar vfo, QWidget *parent)
this->setTitle("Band");
this->defaultStyleSheet = this->styleSheet();
queue = cachingQueue::getInstance();
spectrum = new QCustomPlot();
//spectrum = new QCustomPlot();
mainLayout = new QHBoxLayout(this);
layout = new QVBoxLayout();
mainLayout->addLayout(layout);
@ -396,7 +396,6 @@ spectrumScope::spectrumScope(uchar receiver, uchar vfo, QWidget *parent)
connect(waterfall, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(scroll(QWheelEvent*)));
connect(spectrum, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(scroll(QWheelEvent*)));
showHideControls(spectrumMode_t::spectModeCenter);
}
@ -883,6 +882,23 @@ void spectrumScope::computePlasma()
void spectrumScope::showHideControls(spectrumMode_t mode)
{
qInfo("ShowHideControls() called");
if (!hasScope) {
spectrum->hide();
waterfall->hide();
splitter->hide();
detachButton->hide();
scopeModeCombo->hide();
edgeCombo->hide();
edgeButton->hide();
holdButton->hide();
toFixedButton->hide();
spanCombo->hide();
clearPeaksButton->hide();
confButton->hide();
return;
}
if((mode==spectModeCenter) || (mode==spectModeScrollC))
{
edgeCombo->hide();

Wyświetl plik

@ -30,7 +30,7 @@ class spectrumScope : public QGroupBox
{
Q_OBJECT
public:
explicit spectrumScope(uchar receiver = 0, uchar vfo = 1, QWidget *parent = nullptr);
explicit spectrumScope(bool scope, uchar receiver = 0, uchar vfo = 1, QWidget *parent = nullptr);
bool prepareWf(uint wfLength);
void prepareScope(uint ampMap, uint spectWidth);
@ -276,6 +276,7 @@ private:
bool clickDragTuning=false;
bool isActive;
uchar numVFO=1;
bool hasScope=false;
};
#endif // SPECTRUMSCOPE_H

Wyświetl plik

@ -1025,7 +1025,7 @@ void wfmain::configureVFOs()
for(uchar i=0;i<rigCaps->numReceiver;i++)
{
spectrumScope* receiver = new spectrumScope(i,rigCaps->numVFO,this);
spectrumScope* receiver = new spectrumScope(rigCaps->hasSpectrum,i,rigCaps->numVFO,this);
receiver->setUnderlayMode(prefs.underlayMode);
receiver->wfAntiAliased(prefs.wfAntiAlias);