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 "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,17 +882,43 @@ void spectrumScope::computePlasma()
|
|||
|
||||
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();
|
||||
edgeButton->hide();
|
||||
toFixedButton->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();
|
||||
edgeButton->show();
|
||||
toFixedButton->hide();
|
||||
spanCombo->hide();
|
||||
clearPeaksButton->show();
|
||||
confButton->show();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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=true;
|
||||
};
|
||||
|
||||
#endif // SPECTRUMSCOPE_H
|
||||
|
|
|
@ -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);
|
||||
|
|
Ładowanie…
Reference in New Issue