kopia lustrzana https://gitlab.com/eliggett/wfview
Porównaj commity
5 Commity
d1c11ed0b4
...
0d9bbaedf7
Autor | SHA1 | Data |
---|---|---|
Phil Taylor | 0d9bbaedf7 | |
Phil Taylor | 5d10d9479e | |
Phil Taylor | ba9d70256a | |
Phil Taylor | 0ae7f1da0f | |
Phil Taylor | cc106b3775 |
|
@ -2,8 +2,8 @@
|
||||||
#include "logcategories.h"
|
#include "logcategories.h"
|
||||||
#include "rigidentities.h"
|
#include "rigidentities.h"
|
||||||
|
|
||||||
spectrumScope::spectrumScope(uchar receiver, uchar vfo, QWidget *parent)
|
spectrumScope::spectrumScope(bool scope, uchar receiver, uchar vfo, QWidget *parent)
|
||||||
: QGroupBox{parent}, receiver(receiver), numVFO(vfo)
|
: QGroupBox{parent}, receiver(receiver), numVFO(vfo),hasScope(scope)
|
||||||
{
|
{
|
||||||
|
|
||||||
QMutexLocker locker(&mutex);
|
QMutexLocker locker(&mutex);
|
||||||
|
@ -12,7 +12,7 @@ spectrumScope::spectrumScope(uchar receiver, uchar vfo, QWidget *parent)
|
||||||
this->setTitle("Band");
|
this->setTitle("Band");
|
||||||
this->defaultStyleSheet = this->styleSheet();
|
this->defaultStyleSheet = this->styleSheet();
|
||||||
queue = cachingQueue::getInstance();
|
queue = cachingQueue::getInstance();
|
||||||
spectrum = new QCustomPlot();
|
//spectrum = new QCustomPlot();
|
||||||
mainLayout = new QHBoxLayout(this);
|
mainLayout = new QHBoxLayout(this);
|
||||||
layout = new QVBoxLayout();
|
layout = new QVBoxLayout();
|
||||||
mainLayout->addLayout(layout);
|
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(waterfall, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(scroll(QWheelEvent*)));
|
||||||
connect(spectrum, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(scroll(QWheelEvent*)));
|
connect(spectrum, SIGNAL(mouseWheel(QWheelEvent*)), this, SLOT(scroll(QWheelEvent*)));
|
||||||
|
|
||||||
|
|
||||||
showHideControls(spectrumMode_t::spectModeCenter);
|
showHideControls(spectrumMode_t::spectModeCenter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -883,17 +882,43 @@ void spectrumScope::computePlasma()
|
||||||
|
|
||||||
void spectrumScope::showHideControls(spectrumMode_t mode)
|
void spectrumScope::showHideControls(spectrumMode_t mode)
|
||||||
{
|
{
|
||||||
if((mode==spectModeCenter) || (mode==spectModeScrollC))
|
if (!hasScope && spectrum->isVisible()) {
|
||||||
{
|
spectrum->hide();
|
||||||
|
waterfall->hide();
|
||||||
|
splitter->hide();
|
||||||
|
detachButton->hide();
|
||||||
|
scopeModeCombo->hide();
|
||||||
|
edgeCombo->hide();
|
||||||
|
edgeButton->hide();
|
||||||
|
holdButton->hide();
|
||||||
|
toFixedButton->hide();
|
||||||
|
spanCombo->hide();
|
||||||
|
clearPeaksButton->hide();
|
||||||
|
confButton->hide();
|
||||||
|
} else if (hasScope && (mode==spectModeCenter || mode==spectModeScrollC) && !spanCombo->isVisible()) {
|
||||||
|
spectrum->show();
|
||||||
|
waterfall->show();
|
||||||
|
splitter->show();
|
||||||
|
detachButton->show();
|
||||||
|
scopeModeCombo->show();
|
||||||
edgeCombo->hide();
|
edgeCombo->hide();
|
||||||
edgeButton->hide();
|
edgeButton->hide();
|
||||||
toFixedButton->show();
|
toFixedButton->show();
|
||||||
spanCombo->show();
|
spanCombo->show();
|
||||||
} else {
|
clearPeaksButton->show();
|
||||||
|
confButton->show();
|
||||||
|
} else if (hasScope && (mode==spectModeFixed || mode == spectModeScrollC || mode == spectModeScrollF) && spanCombo->isVisible()) {
|
||||||
|
spectrum->show();
|
||||||
|
waterfall->show();
|
||||||
|
splitter->show();
|
||||||
|
detachButton->show();
|
||||||
|
scopeModeCombo->show();
|
||||||
edgeCombo->show();
|
edgeCombo->show();
|
||||||
edgeButton->show();
|
edgeButton->show();
|
||||||
toFixedButton->hide();
|
toFixedButton->hide();
|
||||||
spanCombo->hide();
|
spanCombo->hide();
|
||||||
|
clearPeaksButton->show();
|
||||||
|
confButton->show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,7 +30,7 @@ class spectrumScope : public QGroupBox
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
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);
|
bool prepareWf(uint wfLength);
|
||||||
void prepareScope(uint ampMap, uint spectWidth);
|
void prepareScope(uint ampMap, uint spectWidth);
|
||||||
|
@ -276,6 +276,7 @@ private:
|
||||||
bool clickDragTuning=false;
|
bool clickDragTuning=false;
|
||||||
bool isActive;
|
bool isActive;
|
||||||
uchar numVFO=1;
|
uchar numVFO=1;
|
||||||
|
bool hasScope=true;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SPECTRUMSCOPE_H
|
#endif // SPECTRUMSCOPE_H
|
||||||
|
|
|
@ -1025,7 +1025,7 @@ void wfmain::configureVFOs()
|
||||||
|
|
||||||
for(uchar i=0;i<rigCaps->numReceiver;i++)
|
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->setUnderlayMode(prefs.underlayMode);
|
||||||
receiver->wfAntiAliased(prefs.wfAntiAlias);
|
receiver->wfAntiAliased(prefs.wfAntiAlias);
|
||||||
|
|
Ładowanie…
Reference in New Issue