18 #include <QDockWidget> 19 #include <QMainWindow> 20 #include <QFileDialog> 36 #include "ui_wfmmodgui.h" 123 ui->cwKeyerGUI->displaySettings();
169 ui->afBWText->setText(QString(
"%1k").
arg(value));
176 ui->fmDevText->setText(QString(
"%1k").
arg(value));
183 ui->volumeText->setText(QString(
"%1").
arg(value / 10.0, 0,
'f', 1));
190 ui->toneFrequencyText->setText(QString(
"%1k").
arg(value / 100.0, 0,
'f', 2));
209 ui->tone->setEnabled(!checked);
210 ui->mic->setEnabled(!checked);
211 ui->morseKeyer->setEnabled(!checked);
214 ui->navTimeSlider->setEnabled(!checked);
220 ui->play->setEnabled(!checked);
221 ui->mic->setEnabled(!checked);
222 ui->morseKeyer->setEnabled(!checked);
229 ui->tone->setEnabled(!checked);
230 ui->mic->setEnabled(!checked);
231 ui->play->setEnabled(!checked);
238 ui->play->setEnabled(!checked);
239 ui->tone->setEnabled(!checked);
240 ui->morseKeyer->setEnabled(!checked);
251 t = t.addSecs(t_sec);
261 QString fileName = QFileDialog::getOpenFileName(
this,
262 tr(
"Open raw audio file"),
".", tr(
"Raw audio Files (*.raw)"), 0, QFileDialog::DontUseNativeDialog);
268 ui->play->setEnabled(
true);
275 qDebug() <<
"FileSourceGui::configureFileName: " <<
m_fileName.toStdString().c_str();
332 setAttribute(Qt::WA_DeleteOnClose,
true);
340 ui->rfBW->setCurrentIndex(7);
345 connect(
this, SIGNAL(customContextMenuRequested(
const QPoint &)),
this, SLOT(
onMenuDialogCalled(
const QPoint &)));
353 connect(audioMuteRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
audioSelect()));
355 ui->deltaFrequencyLabel->setText(QString(
"%1f").
arg(QChar(0x94, 0x03)));
357 ui->deltaFrequency->setValueRange(
false, 7, -9999999, 9999999);
374 ui->play->setEnabled(
false);
375 ui->play->setChecked(
false);
376 ui->tone->setChecked(
false);
377 ui->mic->setChecked(
false);
385 connect(
m_wfmMod, SIGNAL(levelChanged(qreal, qreal,
int)),
ui->volumeMeter, SLOT(levelChanged(qreal, qreal,
int)));
479 qDebug(
"WFMModGUI::audioSelect");
494 ui->channelPower->setText(tr(
"%1 dB").
arg(m_channelPowerDbAvg.asDouble(), 0,
'f', 1));
505 QTime recordLength(0, 0, 0, 0);
507 QString s_time = recordLength.toString(
"HH:mm:ss");
508 ui->recordLengthText->setText(s_time);
524 t = t.addSecs(t_sec);
525 t = t.addMSecs(t_msec);
526 QString s_timems = t.toString(
"HH:mm:ss.zzz");
527 QString s_time = t.toString(
"HH:mm:ss");
528 ui->relTimeText->setText(s_timems);
533 ui->navTimeSlider->setValue((
int) (posRatio * 100.0));
void removeTxChannelInstance(PluginInstanceGUI *pluginGUI)
static MainWindow * getInstance()
const QString & getReverseAPIAddress() const
static WFMModGUI * create(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
MovingAverageUtil< double, double, 20 > m_channelPowerDbAvg
int getCenterFrequency() const
void registerTxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
void push(Message *message, bool emitSignal=true)
Push message onto queue.
uint16_t m_reverseAPIChannelIndex
static double dbPower(double magsq, double floor=1e-12)
static const int m_nbRfBW
bool deserialize(const QByteArray &data)
static int getRFBW(int index)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
void setName(const QString &name)
WFMModInputAF m_modAFInput
void setCWKeyerGUI(Serializable *cwKeyerGUI)
void setReverseAPIChannelIndex(uint16_t channelIndex)
uint16_t getReverseAPIPort() const
WFMModSettings m_settings
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
void on_channelMute_toggled(bool checked)
void leaveEvent(QEvent *)
static const QString m_channelIdURI
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
virtual void setCenterFrequency(qint64 centerFrequency)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
uint16_t getReverseAPIDeviceIndex() const
virtual MessageQueue * getInputMessageQueue()
void enterEvent(QEvent *)
bool deserialize(const QByteArray &data)
void on_morseKeyer_toggled(bool checked)
void applySettings(bool force=false)
void setChannelMarker(Serializable *channelMarker)
static int requiredBW(int rfBW)
void setSourceOrSinkStream(bool sourceOrSinkStream)
static DSPEngine * instance()
void on_mic_toggled(bool checked)
void on_navTimeSlider_valueChanged(int value)
void on_rfBW_currentIndexChanged(int index)
void setHighlighted(bool highlighted)
DeviceUISet * m_deviceUISet
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
QString m_audioDeviceName
This is the audio device you get the audio samples from.
virtual void setMessageQueueToGUI(MessageQueue *queue)
const QString & getTitle() const
bool useReverseAPI() const
static bool match(const Message *message)
void blockApplySettings(bool block)
QByteArray serialize() const
void handleSourceMessages()
void updateWithStreamData()
QString m_audioDeviceName
virtual qint64 getCenterFrequency() const
void setReverseAPIAddress(const QString &address)
QByteArray serialize() const
uint16_t m_reverseAPIPort
void onWidgetRolled(QWidget *widget, bool rollDown)
void setColor(const QColor &color)
void on_deltaFrequency_changed(qint64 value)
void channelMarkerChangedByCursor()
void setVisible(bool visible)
void setReverseAPIPort(uint16_t port)
void on_tone_toggled(bool checked)
uint16_t getReverseAPIChannelIndex() const
void setBandwidth(int bandwidth)
const QColor & getColor() const
void setTitle(const QString &title)
static int getRFBWIndex(int rfbw)
void on_afBW_valueChanged(int value)
void on_playLoop_toggled(bool checked)
QString m_reverseAPIAddress
void on_volume_valueChanged(int value)
void setCenterFrequency(int centerFrequency)
void on_toneFrequency_valueChanged(int value)
void updateWithStreamTime()
virtual bool handleMessage(const Message &message)
void onMenuDialogCalled(const QPoint &p)
void on_showFileDialog_clicked(bool checked)
void on_play_toggled(bool checked)
qint64 m_inputFrequencyOffset
void setUseReverseAPI(bool useReverseAPI)
uint16_t m_reverseAPIDeviceIndex
void on_fmDev_valueChanged(int value)
ChannelMarker m_channelMarker
WFMModGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget *parent=0)