18 #include <QDockWidget> 19 #include <QMainWindow> 28 #include "ui_freqtrackergui.h" 99 qDebug(
"FreqTrackerGUI::handleMessage: FreqTracker::MsgConfigureFreqTracker");
110 qDebug(
"FreqTrackerGUI::handleMessage: FreqTracker::MsgSampleRateNotification");
171 ui->rfBWText->setText(QString(
"%1 kHz").
arg(value / 10.0, 0,
'f', 1));
181 ui->tracking->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
182 ui->tracking->setToolTip(tr(
"PLL for synchronous AM"));
193 ui->alphaEMAText->setText(alphaEMAStr);
205 if ((index < 0) || (index > 5)) {
222 QString rolloffStr = QString::number(value/100.0,
'f', 2);
223 ui->rrcRolloffText->setText(rolloffStr);
229 ui->squelchText->setText(QString(
"%1 dB").
arg(value));
236 ui->squelchGateText->setText(QString(
"%1").
arg(value * 10.0f, 0,
'f', 0));
290 setAttribute(Qt::WA_DeleteOnClose,
true);
292 connect(
this, SIGNAL(customContextMenuRequested(
const QPoint &)),
this, SLOT(
onMenuDialogCalled(
const QPoint &)));
299 ui->deltaFrequencyLabel->setText(QString(
"%1f").
arg(QChar(0x94, 0x03)));
301 ui->deltaFrequency->setValueRange(
false, 7, -9999999, 9999999);
365 ui->rfBW->setValue(displayValue);
366 ui->rfBWText->setText(QString(
"%1 kHz").
arg(displayValue / 10.0, 0,
'f', 1));
372 ui->alphaEMAText->setText(alphaEMAStr);
377 ui->pllPskOrder->setCurrentIndex(i);
382 ui->rrcRolloffText->setText(rolloffStr);
401 double magsqAvg, magsqPeak;
407 ui->channelPowerMeter->levelChanged(
408 (100.0f + powDbAvg) / 100.0f,
409 (100.0f + powDbPeak) / 100.0f,
413 ui->channelPower->setText(QString::number(powDbAvg,
'f', 1));
419 ui->squelchLabel->setStyleSheet(
"QLabel { background-color : green; }");
421 ui->squelchLabel->setStyleSheet(
"QLabel { background:rgb(50,50,50); }");
425 ui->tracking->setStyleSheet(
"QToolButton { background-color : green; }");
427 ui->tracking->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
432 ui->trackingFrequencyText->setText(tr(
"%1 Hz").
arg(loc.toString(freq)));
435 ui->tracking->setToolTip(
"Tracking on");
437 ui->tracking->setToolTip(
"Tracking off");
static MainWindow * getInstance()
const QString & getReverseAPIAddress() const
int getCenterFrequency() const
void enterEvent(QEvent *)
void push(Message *message, bool emitSignal=true)
Push message onto queue.
void setChannelMarker(Serializable *channelMarker)
static double dbPower(double magsq, double floor=1e-12)
void on_tracking_toggled(bool checked)
void on_pllPskOrder_currentIndexChanged(int index)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
uint16_t m_reverseAPIDeviceIndex
int getFrequencyOffset() const
int m_squelchGate
in 10s of ms
void onWidgetRolled(QWidget *widget, bool rollDown)
void channelMarkerChangedByCursor()
void on_trackerType_currentIndexChanged(int index)
FreqTrackerSettings m_settings
void setReverseAPIChannelIndex(uint16_t channelIndex)
int getSampleRate() const
uint16_t getReverseAPIPort() const
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
void on_rrc_toggled(bool checked)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
uint16_t getReverseAPIDeviceIndex() const
QByteArray serialize() const
void getMagSqLevels(double &avg, double &peak, int &nbSamples)
void onMenuDialogCalled(const QPoint &p)
bool getPllLocked() const
QString m_reverseAPIAddress
DeviceUISet * m_deviceUISet
static const QString m_channelIdURI
qint32 m_inputFrequencyOffset
FreqTracker * m_freqTracker
virtual void setMessageQueueToGUI(MessageQueue *queue)
virtual MessageQueue * getInputMessageQueue()
void on_deltaFrequency_changed(qint64 value)
QByteArray serialize() const
virtual void setCenterFrequency(qint64 centerFrequency)
void setHighlighted(bool highlighted)
FreqTrackerGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget *parent=0)
void registerRxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
TrackerType m_trackerType
bool getSquelchOpen() const
void removeRxChannelInstance(PluginInstanceGUI *pluginGUI)
uint16_t m_reverseAPIPort
virtual ~FreqTrackerGUI()
const QString & getTitle() const
bool useReverseAPI() const
static bool match(const Message *message)
bool getHighlighted() const
bool deserialize(const QByteArray &data)
void on_log2Decim_currentIndexChanged(int index)
void handleInputMessages()
void blockApplySettings(bool block)
uint16_t m_reverseAPIChannelIndex
void setReverseAPIAddress(const QString &address)
void setColor(const QColor &color)
static FreqTrackerGUI * create(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
ChannelMarker m_channelMarker
void on_rrcRolloff_valueChanged(int value)
uint32_t m_rrcRolloff
in 100ths
void setVisible(bool visible)
void setReverseAPIPort(uint16_t port)
uint16_t getReverseAPIChannelIndex() const
void setBandwidth(int bandwidth)
void on_alphaEMA_valueChanged(int value)
const QColor & getColor() const
void setTitle(const QString &title)
void on_squelchGate_valueChanged(int value)
bool deserialize(const QByteArray &data)
void setName(const QString &name)
void setCenterFrequency(int centerFrequency)
virtual qint64 getCenterFrequency() const
void leaveEvent(QEvent *)
Real getAvgDeltaFreq() const
void on_squelch_valueChanged(int value)
void on_rfBW_valueChanged(int value)
void setUseReverseAPI(bool useReverseAPI)
float m_alphaEMA
alpha factor for delta frequency EMA
virtual bool handleMessage(const Message &message)
void channelMarkerHighlightedByCursor()
void applySettings(bool force=false)