mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-05-24 11:12:27 -04:00
NFM and SSB receiver in focus trigger the display of the central frequency line on the spectrum frequency scale thus facilitating its identification
This commit is contained in:
parent
0602584f81
commit
fe85503130
@ -76,6 +76,7 @@ Done since the fork
|
|||||||
- Added display and precise control of the shift frequency from center frequency of the SSB receivers.
|
- Added display and precise control of the shift frequency from center frequency of the SSB receivers.
|
||||||
- Make the sidebands appear correctly on SSB channel overlay. Limit to +/- 6 kHz to fit channel spectrum analyzer window
|
- Make the sidebands appear correctly on SSB channel overlay. Limit to +/- 6 kHz to fit channel spectrum analyzer window
|
||||||
- SSB bandwidth can now be tuned in steps of 100 Hz
|
- SSB bandwidth can now be tuned in steps of 100 Hz
|
||||||
|
- NFM and SSB receiver in focus trigger the display of the central frequency line on the spectrum frequency scale thus facilitating its identification
|
||||||
|
|
||||||
|
|
||||||
=====
|
=====
|
||||||
|
@ -148,6 +148,8 @@ private:
|
|||||||
void enterEvent(QEvent* event);
|
void enterEvent(QEvent* event);
|
||||||
void leaveEvent(QEvent* event);
|
void leaveEvent(QEvent* event);
|
||||||
|
|
||||||
|
float getCenterFreqLineRelPos(ChannelMarker *channelMarker);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void tick();
|
void tick();
|
||||||
void channelMarkerChanged();
|
void channelMarkerChanged();
|
||||||
|
@ -33,6 +33,9 @@ public:
|
|||||||
void setVisible(bool visible);
|
void setVisible(bool visible);
|
||||||
bool getVisible() const { return m_visible; }
|
bool getVisible() const { return m_visible; }
|
||||||
|
|
||||||
|
void setHighlighted(bool highlighted);
|
||||||
|
bool getHighlighted() const { return m_highlighted; }
|
||||||
|
|
||||||
void setColor(const QColor& color);
|
void setColor(const QColor& color);
|
||||||
const QColor& getColor() const { return m_color; }
|
const QColor& getColor() const { return m_color; }
|
||||||
|
|
||||||
@ -45,6 +48,7 @@ protected:
|
|||||||
int m_bandwidth;
|
int m_bandwidth;
|
||||||
sidebands_t m_sidebands;
|
sidebands_t m_sidebands;
|
||||||
bool m_visible;
|
bool m_visible;
|
||||||
|
bool m_highlighted;
|
||||||
QColor m_color;
|
QColor m_color;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
@ -222,3 +222,14 @@ void NFMDemodGUI::applySettings()
|
|||||||
ui->volume->value() / 10.0,
|
ui->volume->value() / 10.0,
|
||||||
ui->squelch->value());
|
ui->squelch->value());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void NFMDemodGUI::leaveEvent(QEvent*)
|
||||||
|
{
|
||||||
|
m_channelMarker->setHighlighted(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void NFMDemodGUI::enterEvent(QEvent*)
|
||||||
|
{
|
||||||
|
m_channelMarker->setHighlighted(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -61,6 +61,9 @@ private:
|
|||||||
~NFMDemodGUI();
|
~NFMDemodGUI();
|
||||||
|
|
||||||
void applySettings();
|
void applySettings();
|
||||||
|
|
||||||
|
void leaveEvent(QEvent*);
|
||||||
|
void enterEvent(QEvent*);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_NFMDEMODGUI_H
|
#endif // INCLUDE_NFMDEMODGUI_H
|
||||||
|
@ -209,3 +209,14 @@ void SSBDemodGUI::applySettings()
|
|||||||
ui->BW->value() * 100.0,
|
ui->BW->value() * 100.0,
|
||||||
ui->volume->value() / 10.0 );
|
ui->volume->value() / 10.0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SSBDemodGUI::leaveEvent(QEvent*)
|
||||||
|
{
|
||||||
|
m_channelMarker->setHighlighted(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SSBDemodGUI::enterEvent(QEvent*)
|
||||||
|
{
|
||||||
|
m_channelMarker->setHighlighted(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,9 @@ private:
|
|||||||
~SSBDemodGUI();
|
~SSBDemodGUI();
|
||||||
|
|
||||||
void applySettings();
|
void applySettings();
|
||||||
|
|
||||||
|
void leaveEvent(QEvent*);
|
||||||
|
void enterEvent(QEvent*);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_SSBDEMODGUI_H
|
#endif // INCLUDE_SSBDEMODGUI_H
|
||||||
|
@ -31,6 +31,7 @@ ChannelMarker::ChannelMarker(QObject* parent) :
|
|||||||
m_bandwidth(0),
|
m_bandwidth(0),
|
||||||
m_sidebands(dsb),
|
m_sidebands(dsb),
|
||||||
m_visible(false),
|
m_visible(false),
|
||||||
|
m_highlighted(false),
|
||||||
m_color(m_colorTable[m_nextColor])
|
m_color(m_colorTable[m_nextColor])
|
||||||
{
|
{
|
||||||
++m_nextColor;
|
++m_nextColor;
|
||||||
@ -68,6 +69,12 @@ void ChannelMarker::setVisible(bool visible)
|
|||||||
emit changed();
|
emit changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ChannelMarker::setHighlighted(bool highlighted)
|
||||||
|
{
|
||||||
|
m_highlighted = highlighted;
|
||||||
|
emit changed();
|
||||||
|
}
|
||||||
|
|
||||||
void ChannelMarker::setColor(const QColor& color)
|
void ChannelMarker::setColor(const QColor& color)
|
||||||
{
|
{
|
||||||
m_color = color;
|
m_color = color;
|
||||||
|
@ -544,7 +544,7 @@ void GLSpectrum::paintGL()
|
|||||||
for(int i = 0; i < m_channelMarkerStates.size(); ++i) {
|
for(int i = 0; i < m_channelMarkerStates.size(); ++i) {
|
||||||
ChannelMarkerState* dv = m_channelMarkerStates[i];
|
ChannelMarkerState* dv = m_channelMarkerStates[i];
|
||||||
if(dv->m_channelMarker->getVisible()) {
|
if(dv->m_channelMarker->getVisible()) {
|
||||||
|
/*
|
||||||
ChannelMarker::sidebands_t sidebands = dv->m_channelMarker->getSidebands();
|
ChannelMarker::sidebands_t sidebands = dv->m_channelMarker->getSidebands();
|
||||||
float fcLineRelativePos;
|
float fcLineRelativePos;
|
||||||
if (sidebands == ChannelMarker::usb) {
|
if (sidebands == ChannelMarker::usb) {
|
||||||
@ -554,7 +554,7 @@ void GLSpectrum::paintGL()
|
|||||||
} else {
|
} else {
|
||||||
fcLineRelativePos = 0.5;
|
fcLineRelativePos = 0.5;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||||
glColor4f(dv->m_channelMarker->getColor().redF(), dv->m_channelMarker->getColor().greenF(), dv->m_channelMarker->getColor().blueF(), 0.3f);
|
glColor4f(dv->m_channelMarker->getColor().redF(), dv->m_channelMarker->getColor().greenF(), dv->m_channelMarker->getColor().blueF(), 0.3f);
|
||||||
@ -570,8 +570,8 @@ void GLSpectrum::paintGL()
|
|||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
glColor3f(0.8f, 0.8f, 0.6f);
|
glColor3f(0.8f, 0.8f, 0.6f);
|
||||||
glBegin(GL_LINE_LOOP);
|
glBegin(GL_LINE_LOOP);
|
||||||
glVertex2f(fcLineRelativePos, 0);
|
glVertex2f(getCenterFreqLineRelPos(dv->m_channelMarker), 0);
|
||||||
glVertex2f(fcLineRelativePos, 1);
|
glVertex2f(getCenterFreqLineRelPos(dv->m_channelMarker), 1);
|
||||||
glEnd();
|
glEnd();
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
@ -667,6 +667,15 @@ void GLSpectrum::paintGL()
|
|||||||
glVertex2f(1, 1);
|
glVertex2f(1, 1);
|
||||||
glVertex2f(0, 1);
|
glVertex2f(0, 1);
|
||||||
glEnd();
|
glEnd();
|
||||||
|
|
||||||
|
if (dv->m_channelMarker->getHighlighted()) {
|
||||||
|
glColor3f(0.8f, 0.8f, 0.6f);
|
||||||
|
glBegin(GL_LINE_LOOP);
|
||||||
|
glVertex2f(getCenterFreqLineRelPos(dv->m_channelMarker), 0);
|
||||||
|
glVertex2f(getCenterFreqLineRelPos(dv->m_channelMarker), 1);
|
||||||
|
glEnd();
|
||||||
|
}
|
||||||
|
|
||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
@ -1325,3 +1334,16 @@ void GLSpectrum::channelMarkerDestroyed(QObject* object)
|
|||||||
{
|
{
|
||||||
removeChannelMarker((ChannelMarker*)object);
|
removeChannelMarker((ChannelMarker*)object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float GLSpectrum::getCenterFreqLineRelPos(ChannelMarker *channelMarker)
|
||||||
|
{
|
||||||
|
ChannelMarker::sidebands_t sidebands = channelMarker->getSidebands();
|
||||||
|
|
||||||
|
if (sidebands == ChannelMarker::usb) {
|
||||||
|
return 0.0;
|
||||||
|
} else if (sidebands == ChannelMarker::lsb) {
|
||||||
|
return 1.0;
|
||||||
|
} else {
|
||||||
|
return 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user