18 #include <QDockWidget> 19 #include <QMainWindow> 29 #include "ui_amdemodgui.h" 101 qDebug(
"AMDemodGUI::handleMessage: AMDemod::MsgConfigureAMDemod");
149 ui->pll->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
150 ui->pll->setToolTip(tr(
"PLL for synchronous AM"));
171 ui->rfBWText->setText(QString(
"%1 kHz").
arg(value / 10.0, 0,
'f', 1));
179 ui->volumeText->setText(QString(
"%1").
arg(value / 10.0, 0,
'f', 1));
186 ui->squelchText->setText(QString(
"%1 dB").
arg(value));
263 setAttribute(Qt::WA_DeleteOnClose,
true);
265 connect(
this, SIGNAL(customContextMenuRequested(
const QPoint &)),
this, SLOT(
onMenuDialogCalled(
const QPoint &)));
273 connect(audioMuteRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
audioSelect()));
276 connect(samSidebandRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
samSSBSelect()));
278 ui->deltaFrequencyLabel->setText(QString(
"%1f").
arg(QChar(0x94, 0x03)));
280 ui->deltaFrequency->setValueRange(
false, 7, -9999999, 9999999);
302 m_iconDSBUSB.addPixmap(QPixmap(
"://dsb.png"), QIcon::Normal, QIcon::Off);
303 m_iconDSBUSB.addPixmap(QPixmap(
"://usb.png"), QIcon::Normal, QIcon::On);
304 m_iconDSBLSB.addPixmap(QPixmap(
"://dsb.png"), QIcon::Normal, QIcon::Off);
305 m_iconDSBLSB.addPixmap(QPixmap(
"://lsb.png"), QIcon::Normal, QIcon::On);
354 ui->rfBW->setValue(displayValue);
355 ui->rfBWText->setText(QString(
"%1 kHz").
arg(displayValue / 10.0, 0,
'f', 1));
367 qDebug() <<
"AMDemodGUI::displaySettings:" 376 ui->ssb->setChecked(
true);
382 ui->ssb->setChecked(
true);
387 ui->ssb->setChecked(
false);
392 ui->ssb->setChecked(
false);
422 qDebug(
"AMDemodGUI::audioSelect");
442 qDebug(
"AMDemodGUI::samSSBSelect: %s", ssbSelect.
isUsb() ?
"usb" :
"lsb");
455 double magsqAvg, magsqPeak;
461 ui->channelPowerMeter->levelChanged(
462 (100.0f + powDbAvg) / 100.0f,
463 (100.0f + powDbPeak) / 100.0f,
467 ui->channelPower->setText(QString::number(powDbAvg,
'f', 1));
477 ui->audioMute->setStyleSheet(
"QToolButton { background-color : green; }");
479 ui->audioMute->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
486 ui->pll->setStyleSheet(
"QToolButton { background-color : green; }");
488 ui->pll->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
492 ui->pll->setToolTip(tr(
"PLL for synchronous AM. Freq = %1 Hz").
arg(freq));
AMDemodSettings m_settings
static MainWindow * getInstance()
const QString & getReverseAPIAddress() const
bool deserialize(const QByteArray &data)
int getCenterFrequency() const
void push(Message *message, bool emitSignal=true)
Push message onto queue.
uint32_t getNumberOfDeviceStreams() const
static double dbPower(double magsq, double floor=1e-12)
void getMagSqLevels(double &avg, double &peak, int &nbSamples)
void on_squelch_valueChanged(int value)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
QByteArray serialize() const
AMDemodGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget *parent=0)
void displayStreamIndex()
void setName(const QString &name)
DeviceUISet * m_deviceUISet
void on_audioMute_toggled(bool checked)
void setReverseAPIChannelIndex(uint16_t channelIndex)
void handleInputMessages()
uint16_t getReverseAPIPort() const
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
uint16_t m_reverseAPIChannelIndex
virtual qint64 getCenterFrequency() const
void setNumberOfStreams(int nbStreams)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
void leaveEvent(QEvent *)
uint16_t getReverseAPIDeviceIndex() const
void setStreamIndex(int index)
int getSelectedStreamIndex() const
Real getPllFrequency() const
int m_streamIndex
MIMO channel. Not relevant when connected to SI (single Rx).
void setStreamIndex(int streamIndex)
uint16_t m_reverseAPIDeviceIndex
void onMenuDialogCalled(const QPoint &p)
virtual void setMessageQueueToGUI(MessageQueue *queue)
static DSPEngine * instance()
virtual void setCenterFrequency(qint64 centerFrequency)
void setHighlighted(bool highlighted)
void channelMarkerHighlightedByCursor()
void on_rfBW_valueChanged(int value)
void on_volume_valueChanged(int value)
void registerRxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
QByteArray serialize() const
virtual MessageQueue * getInputMessageQueue()
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
void removeRxChannelInstance(PluginInstanceGUI *pluginGUI)
SyncAMOperation m_syncAMOperation
QString m_audioDeviceName
const QString & getTitle() const
bool useReverseAPI() const
static bool match(const Message *message)
bool getHighlighted() const
bool deserialize(const QByteArray &data)
ChannelMarker m_channelMarker
void enterEvent(QEvent *)
void blockApplySettings(bool block)
void on_deltaFrequency_changed(qint64 value)
QString m_audioDeviceName
void setChannelMarker(Serializable *channelMarker)
uint32_t getAudioSampleRate() const
void on_ssb_toggled(bool checked)
void setReverseAPIAddress(const QString &address)
void onWidgetRolled(QWidget *widget, bool rollDown)
void setColor(const QColor &color)
QString m_reverseAPIAddress
void on_bandpassEnable_toggled(bool checked)
bool getSquelchOpen() const
uint16_t m_reverseAPIPort
void setVisible(bool visible)
void setReverseAPIPort(uint16_t port)
void channelMarkerChangedByCursor()
qint32 m_inputFrequencyOffset
uint16_t getReverseAPIChannelIndex() const
void setBandwidth(int bandwidth)
const QColor & getColor() const
void applySettings(bool force=false)
void setTitle(const QString &title)
void setCenterFrequency(int centerFrequency)
bool getPllLocked() const
static const QString m_channelIdURI
void on_pll_toggled(bool checked)
void setUseReverseAPI(bool useReverseAPI)
DSPDeviceMIMOEngine * m_deviceMIMOEngine
virtual bool handleMessage(const Message &message)
static AMDemodGUI * create(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)