18 #include <QDockWidget> 19 #include <QMainWindow> 20 #include <QFileDialog> 37 #include "ui_freedvmodgui.h" 85 qDebug(
"FreeDVModGUI::deserialize");
134 ui->cwKeyerGUI->displaySettings();
179 if ((value < 0) || (value > 4)) {
194 ui->toneFrequencyText->setText(QString(
"%1k").
arg(value / 100.0, 0,
'f', 2));
201 ui->volumeText->setText(QString(
"%1").
arg(value / 10.0, 0,
'f', 1));
228 ui->tone->setEnabled(!checked);
229 ui->morseKeyer->setEnabled(!checked);
230 ui->mic->setEnabled(!checked);
233 ui->navTimeSlider->setEnabled(!checked);
239 ui->play->setEnabled(!checked);
240 ui->morseKeyer->setEnabled(!checked);
241 ui->mic->setEnabled(!checked);
248 ui->play->setEnabled(!checked);
249 ui->tone->setEnabled(!checked);
250 ui->mic->setEnabled(!checked);
257 ui->play->setEnabled(!checked);
258 ui->morseKeyer->setEnabled(!checked);
259 ui->tone->setEnabled(!checked);
270 t = t.addSecs(t_sec);
280 QString fileName = QFileDialog::getOpenFileName(
this,
281 tr(
"Open raw audio file"),
".", tr(
"Raw audio Files (*.raw)"), 0, QFileDialog::DontUseNativeDialog);
287 ui->play->setEnabled(
true);
294 qDebug() <<
"FileSourceGui::configureFileName: " <<
m_fileName.toStdString().c_str();
352 setAttribute(Qt::WA_DeleteOnClose,
true);
354 connect(
this, SIGNAL(customContextMenuRequested(
const QPoint &)),
this, SLOT(
onMenuDialogCalled(
const QPoint &)));
365 ui->glSpectrum->setDisplayWaterfall(
true);
366 ui->glSpectrum->setDisplayMaxHold(
true);
367 ui->glSpectrum->setSsbSpectrum(
true);
373 connect(audioMuteRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
audioSelect()));
375 ui->deltaFrequencyLabel->setText(QString(
"%1f").
arg(QChar(0x94, 0x03)));
377 ui->deltaFrequency->setValueRange(
false, 7, -9999999, 9999999);
396 connect(
m_freeDVMod, SIGNAL(levelChanged(qreal, qreal,
int)),
ui->volumeMeter, SLOT(levelChanged(qreal, qreal,
int)));
442 qDebug() <<
"FreeDVModGUI::displayBandwidths:" 443 <<
" spanLog2: " << spanLog2
445 <<
" bwMax: " << bwMax;
447 QString spanStr = QString::number(bwMax/10.0,
'f', 1);
449 ui->spanText->setText(tr(
"%1k").
arg(spanStr));
452 ui->glSpectrum->setSsbSpectrum(
true);
453 ui->glSpectrum->setLsbDisplay(
false);
477 ui->spanLog2->blockSignals(
true);
480 ui->spanLog2->blockSignals(
false);
524 qDebug(
"FreeDVModGUI::audioSelect");
539 ui->channelPower->setText(tr(
"%1 dB").
arg(m_channelPowerDbAvg.asDouble(), 0,
'f', 1));
550 QTime recordLength(0, 0, 0, 0);
552 QString s_time = recordLength.toString(
"HH:mm:ss");
553 ui->recordLengthText->setText(s_time);
569 t = t.addSecs(t_sec);
570 t = t.addMSecs(t_msec);
571 QString s_timems = t.toString(
"HH:mm:ss.zzz");
572 QString s_time = t.toString(
"HH:mm:ss");
573 ui->relTimeText->setText(s_timems);
578 ui->navTimeSlider->setValue((
int) (posRatio * 100.0));
MovingAverageUtil< double, double, 20 > m_channelPowerDbAvg
void removeTxChannelInstance(PluginInstanceGUI *pluginGUI)
void setSpectrumGUI(Serializable *spectrumGUI)
static MainWindow * getInstance()
void on_showFileDialog_clicked(bool checked)
const QString & getReverseAPIAddress() const
void on_deltaFrequency_changed(qint64 value)
int getCenterFrequency() const
void setLowCutoff(int lowCutoff)
void registerTxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
void on_play_toggled(bool checked)
void updateWithStreamTime()
uint16_t m_reverseAPIDeviceIndex
void push(Message *message, bool emitSignal=true)
Push message onto queue.
static double dbPower(double magsq, double floor=1e-12)
void enterEvent(QEvent *)
void applyBandwidths(int spanLog2, bool force=false)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
bool blockApplySettings(bool block)
bool deserialize(const QByteArray &data)
QString m_audioDeviceName
QByteArray serialize() const
void displayBandwidths(int spanLog2)
static int getLowCutoff(FreeDVMode freeDVMode)
void leaveEvent(QEvent *)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
void onMenuDialogCalled(const QPoint &p)
void setReverseAPIChannelIndex(uint16_t channelIndex)
void setSpectrumSampleSink(BasebandSampleSink *sampleSink)
uint16_t getReverseAPIPort() const
static FreeDVModGUI * create(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
void setChannelMarker(Serializable *channelMarker)
void on_tone_toggled(bool checked)
bool m_gaugeInputElseModem
Volume gauge shows speech input level else modem level.
void handleSourceMessages()
static int getHiCutoff(FreeDVMode freeDVMode)
virtual bool handleMessage(const Message &message)
void on_mic_toggled(bool checked)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
uint16_t getReverseAPIDeviceIndex() const
void on_audioMute_toggled(bool checked)
QByteArray serialize() const
void setSourceOrSinkStream(bool sourceOrSinkStream)
static DSPEngine * instance()
void onWidgetRolled(QWidget *widget, bool rollDown)
void setCWKeyerGUI(Serializable *cwKeyerGUI)
void updateWithStreamData()
void setHighlighted(bool highlighted)
FreeDVModGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget *parent=0)
FreeDVModSettings m_settings
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
virtual void setMessageQueueToGUI(MessageQueue *queue)
const QString & getTitle() const
DeviceUISet * m_deviceUISet
bool useReverseAPI() const
static bool match(const Message *message)
FreeDVModInputAF m_modAFInput
SpectrumVis * m_spectrumVis
void on_playLoop_toggled(bool checked)
void on_toneFrequency_valueChanged(int value)
QString m_audioDeviceName
void setReverseAPIAddress(const QString &address)
bool deserialize(const QByteArray &data)
virtual qint64 getCenterFrequency() const
void on_freeDVMode_currentIndexChanged(int index)
void setColor(const QColor &color)
void setVisible(bool visible)
void setReverseAPIPort(uint16_t port)
virtual void setCenterFrequency(qint64 centerFrequency)
uint16_t getReverseAPIChannelIndex() const
static const QString m_channelIdURI
void setBandwidth(int bandwidth)
void applySettings(bool force=false)
const QColor & getColor() const
void channelMarkerUpdate()
void setTitle(const QString &title)
QString m_reverseAPIAddress
ChannelMarker m_channelMarker
virtual MessageQueue * getInputMessageQueue()
void setCenterFrequency(int centerFrequency)
void setSidebands(sidebands_t sidebands)
qint64 m_inputFrequencyOffset
void on_gaugeInput_toggled(bool checked)
uint16_t m_reverseAPIChannelIndex
uint32_t getModemSampleRate() const
void on_navTimeSlider_valueChanged(int value)
void on_spanLog2_valueChanged(int value)
void setUseReverseAPI(bool useReverseAPI)
void channelMarkerChangedByCursor()
void setName(const QString &name)
void on_volume_valueChanged(int value)
void on_morseKeyer_toggled(bool checked)
uint16_t m_reverseAPIPort