18 #include <QDockWidget> 19 #include <QMainWindow> 20 #include <QFileDialog> 34 #include "ui_nfmmodgui.h" 122 ui->cwKeyerGUI->displaySettings();
167 ui->afBWText->setText(QString(
"%1k").
arg(value));
174 ui->fmDevText->setText(QString(
"%1k").
arg(value / 10.0, 0,
'f', 1));
181 ui->volumeText->setText(QString(
"%1").
arg(value / 10.0, 0,
'f', 1));
188 ui->toneFrequencyText->setText(QString(
"%1k").
arg(value / 100.0, 0,
'f', 2));
207 ui->tone->setEnabled(!checked);
208 ui->mic->setEnabled(!checked);
209 ui->morseKeyer->setEnabled(!checked);
212 ui->navTimeSlider->setEnabled(!checked);
218 ui->play->setEnabled(!checked);
219 ui->mic->setEnabled(!checked);
220 ui->morseKeyer->setEnabled(!checked);
227 ui->tone->setEnabled(!checked);
228 ui->mic->setEnabled(!checked);
229 ui->play->setEnabled(!checked);
236 ui->play->setEnabled(!checked);
237 ui->tone->setEnabled(!checked);
238 ui->morseKeyer->setEnabled(!checked);
251 ui->feedbackVolumeText->setText(QString(
"%1").
arg(value / 100.0, 0,
'f', 2));
262 t = t.addSecs(t_sec);
272 QString fileName = QFileDialog::getOpenFileName(
this,
273 tr(
"Open raw audio file"),
".", tr(
"Raw audio Files (*.raw)"), 0, QFileDialog::DontUseNativeDialog);
279 ui->play->setEnabled(
true);
299 qDebug() <<
"FileSourceGui::configureFileName: " <<
m_fileName.toStdString().c_str();
355 setAttribute(Qt::WA_DeleteOnClose,
true);
363 ui->rfBW->setCurrentIndex(6);
368 connect(
this, SIGNAL(customContextMenuRequested(
const QPoint &)),
this, SLOT(
onMenuDialogCalled(
const QPoint &)));
376 connect(audioMuteRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
audioSelect()));
379 connect(feedbackRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
audioFeedbackSelect()));
381 ui->deltaFrequencyLabel->setText(QString(
"%1f").
arg(QChar(0x94, 0x03)));
383 ui->deltaFrequency->setValueRange(
false, 7, -9999999, 9999999);
400 ui->play->setEnabled(
false);
401 ui->play->setChecked(
false);
402 ui->tone->setChecked(
false);
403 ui->mic->setChecked(
false);
413 connect(
m_nfmMod, SIGNAL(levelChanged(qreal, qreal,
int)),
ui->volumeMeter, SLOT(levelChanged(qreal, qreal,
int)));
513 qDebug(
"NFMModGUI::audioSelect");
526 qDebug(
"NFMModGUI::audioFeedbackSelect");
541 ui->channelPower->setText(tr(
"%1 dB").
arg(m_channelPowerDbAvg.asDouble(), 0,
'f', 1));
552 QTime recordLength(0, 0, 0, 0);
554 QString s_time = recordLength.toString(
"HH:mm:ss");
555 ui->recordLengthText->setText(s_time);
571 t = t.addSecs(t_sec);
572 t = t.addMSecs(t_msec);
573 QString s_timems = t.toString(
"HH:mm:ss.zzz");
574 QString s_time = t.toString(
"HH:mm:ss");
575 ui->relTimeText->setText(s_timems);
580 ui->navTimeSlider->setValue((
int) (posRatio * 100.0));
void removeTxChannelInstance(PluginInstanceGUI *pluginGUI)
NFMModGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget *parent=0)
static MainWindow * getInstance()
const QString & getReverseAPIAddress() const
void on_toneFrequency_valueChanged(int value)
static const QString m_channelIdURI
bool deserialize(const QByteArray &data)
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.
void leaveEvent(QEvent *)
static double dbPower(double magsq, double floor=1e-12)
void setName(const QString &name)
void updateWithStreamTime()
void on_ctcss_currentIndexChanged(int index)
static const int m_nbRfBW
bool m_feedbackAudioEnable
void handleSourceMessages()
static const int m_nbCTCSSFreqs
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
ChannelMarker m_channelMarker
void audioFeedbackSelect()
void setReverseAPIChannelIndex(uint16_t channelIndex)
static float getCTCSSFreq(int index)
uint16_t getReverseAPIPort() const
void setChannelMarker(Serializable *channelMarker)
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
void on_play_toggled(bool checked)
void on_feedbackVolume_valueChanged(int value)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
uint16_t getReverseAPIDeviceIndex() const
void enterEvent(QEvent *)
void on_mic_toggled(bool checked)
void on_ctcssOn_toggled(bool checked)
bool deserialize(const QByteArray &data)
qint64 m_inputFrequencyOffset
void updateWithStreamData()
void setSourceOrSinkStream(bool sourceOrSinkStream)
static DSPEngine * instance()
void setHighlighted(bool highlighted)
void applySettings(bool force=false)
void channelMarkerChangedByCursor()
void on_channelMute_toggled(bool checked)
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
virtual void setMessageQueueToGUI(MessageQueue *queue)
const QString & getTitle() const
void on_rfBW_currentIndexChanged(int index)
bool useReverseAPI() const
static bool match(const Message *message)
void setCWKeyerGUI(Serializable *cwKeyerGUI)
void on_feedbackEnable_toggled(bool checked)
virtual bool handleMessage(const Message &message)
void on_morseKeyer_toggled(bool checked)
QString m_audioDeviceName
uint16_t m_reverseAPIDeviceIndex
void on_tone_toggled(bool checked)
void on_playLoop_toggled(bool checked)
float m_feedbackVolumeFactor
void setReverseAPIAddress(const QString &address)
void setColor(const QColor &color)
void on_fmDev_valueChanged(int value)
void onMenuDialogCalled(const QPoint &p)
QByteArray serialize() const
NFMModSettings m_settings
virtual MessageQueue * getInputMessageQueue()
virtual qint64 getCenterFrequency() const
void setVisible(bool visible)
NFMModInputAF m_modAFInput
virtual void setCenterFrequency(qint64 centerFrequency)
void blockApplySettings(bool block)
void setReverseAPIPort(uint16_t port)
QString m_audioDeviceName
This is the audio device you get the audio samples from.
uint16_t getReverseAPIChannelIndex() const
void setBandwidth(int bandwidth)
void on_showFileDialog_clicked(bool checked)
static int getRFBW(int index)
static NFMModGUI * create(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
const QColor & getColor() const
void setTitle(const QString &title)
void on_volume_valueChanged(int value)
void setCenterFrequency(int centerFrequency)
QString m_reverseAPIAddress
QByteArray serialize() const
static int getRFBWIndex(int rfbw)
void on_afBW_valueChanged(int value)
uint16_t m_reverseAPIPort
QString m_feedbackAudioDeviceName
This is the audio device you send the audio samples to for audio feedback.
void setUseReverseAPI(bool useReverseAPI)
void on_deltaFrequency_changed(qint64 value)
DeviceUISet * m_deviceUISet
void onWidgetRolled(QWidget *widget, bool rollDown)
uint16_t m_reverseAPIChannelIndex
void on_navTimeSlider_valueChanged(int value)