18 #include <QDockWidget> 19 #include <QMainWindow> 20 #include <QFileDialog> 36 #include "ui_ammodgui.h" 123 ui->cwKeyerGUI->displaySettings();
161 ui->rfBWText->setText(QString(
"%1 kHz").
arg(value / 10.0, 0,
'f', 1));
169 ui->modPercentText->setText(QString(
"%1").
arg(value));
176 ui->volumeText->setText(QString(
"%1").
arg(value / 10.0, 0,
'f', 1));
183 ui->toneFrequencyText->setText(QString(
"%1k").
arg(value / 100.0, 0,
'f', 2));
203 ui->tone->setEnabled(!checked);
204 ui->morseKeyer->setEnabled(!checked);
205 ui->mic->setEnabled(!checked);
208 ui->navTimeSlider->setEnabled(!checked);
214 ui->play->setEnabled(!checked);
215 ui->morseKeyer->setEnabled(!checked);
216 ui->mic->setEnabled(!checked);
223 ui->play->setEnabled(!checked);
224 ui->tone->setEnabled(!checked);
225 ui->mic->setEnabled(!checked);
232 ui->play->setEnabled(!checked);
233 ui->morseKeyer->setEnabled(!checked);
234 ui->tone->setEnabled(!checked);
247 ui->feedbackVolumeText->setText(QString(
"%1").
arg(value / 100.0, 0,
'f', 2));
258 t = t.addSecs(t_sec);
268 QString fileName = QFileDialog::getOpenFileName(
this,
269 tr(
"Open raw audio file"),
".", tr(
"Raw audio Files (*.raw)"), 0, QFileDialog::DontUseNativeDialog);
275 ui->play->setEnabled(
true);
282 qDebug() <<
"FileSourceGui::configureFileName: " <<
m_fileName.toStdString().c_str();
338 setAttribute(Qt::WA_DeleteOnClose,
true);
340 connect(
this, SIGNAL(customContextMenuRequested(
const QPoint &)),
this, SLOT(
onMenuDialogCalled(
const QPoint &)));
348 connect(audioMuteRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
audioSelect()));
351 connect(feedbackRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
audioFeedbackSelect()));
353 ui->deltaFrequencyLabel->setText(QString(
"%1f").
arg(QChar(0x94, 0x03)));
355 ui->deltaFrequency->setValueRange(
false, 7, -9999999, 9999999);
375 ui->play->setEnabled(
false);
376 ui->play->setChecked(
false);
377 ui->tone->setChecked(
false);
378 ui->morseKeyer->setChecked(
false);
379 ui->mic->setChecked(
false);
384 connect(
m_amMod, SIGNAL(levelChanged(qreal, qreal,
int)),
ui->volumeMeter, SLOT(levelChanged(qreal, qreal,
int)));
437 ui->modPercent->setValue(modPercent);
438 ui->modPercentText->setText(QString(
"%1").
arg(modPercent));
478 qDebug(
"AMModGUI::audioSelect");
491 qDebug(
"AMModGUI::audioFeedbackSelect");
506 ui->channelPower->setText(tr(
"%1 dB").
arg(m_channelPowerDbAvg.asDouble(), 0,
'f', 1));
517 QTime recordLength(0, 0, 0, 0);
519 QString s_time = recordLength.toString(
"HH:mm:ss");
520 ui->recordLengthText->setText(s_time);
536 t = t.addSecs(t_sec);
537 t = t.addMSecs(t_msec);
538 QString s_timems = t.toString(
"HH:mm:ss.zzz");
539 QString s_time = t.toString(
"HH:mm:ss");
540 ui->relTimeText->setText(s_timems);
545 ui->navTimeSlider->setValue((
int) (posRatio * 100.0));
void enterEvent(QEvent *)
void removeTxChannelInstance(PluginInstanceGUI *pluginGUI)
virtual qint64 getCenterFrequency() const
static MainWindow * getInstance()
void blockApplySettings(bool block)
const QString & getReverseAPIAddress() const
void on_deltaFrequency_changed(qint64 value)
static const QString m_channelIdURI
float m_feedbackVolumeFactor
void on_modPercent_valueChanged(int value)
void on_feedbackVolume_valueChanged(int value)
void channelMarkerChangedByCursor()
int getCenterFrequency() const
void registerTxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
void push(Message *message, bool emitSignal=true)
Push message onto queue.
bool m_feedbackAudioEnable
uint16_t m_reverseAPIDeviceIndex
void handleSourceMessages()
static double dbPower(double magsq, double floor=1e-12)
void on_channelMute_toggled(bool checked)
void leaveEvent(QEvent *)
virtual MessageQueue * getInputMessageQueue()
void updateWithStreamData()
void on_play_toggled(bool checked)
void updateWithStreamTime()
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
QByteArray serialize() const
void on_rfBW_valueChanged(int value)
void setReverseAPIChannelIndex(uint16_t channelIndex)
QString m_reverseAPIAddress
uint16_t getReverseAPIPort() const
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
MovingAverageUtil< double, double, 20 > m_channelPowerDbAvg
void on_mic_toggled(bool checked)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
DeviceUISet * m_deviceUISet
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
uint16_t getReverseAPIDeviceIndex() const
void audioFeedbackSelect()
QByteArray serialize() const
bool deserialize(const QByteArray &data)
void onWidgetRolled(QWidget *widget, bool rollDown)
void setChannelMarker(Serializable *channelMarker)
void setSourceOrSinkStream(bool sourceOrSinkStream)
static DSPEngine * instance()
void setHighlighted(bool highlighted)
virtual bool handleMessage(const Message &message)
void on_morseKeyer_toggled(bool checked)
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
virtual void setMessageQueueToGUI(MessageQueue *queue)
void onMenuDialogCalled(const QPoint &p)
const QString & getTitle() const
bool useReverseAPI() const
static bool match(const Message *message)
void on_navTimeSlider_valueChanged(int value)
ChannelMarker m_channelMarker
QString m_feedbackAudioDeviceName
This is the audio device you send the audio samples to for audio feedback.
void on_tone_toggled(bool checked)
void setCWKeyerGUI(Serializable *cwKeyerGUI)
uint16_t m_reverseAPIChannelIndex
QString m_audioDeviceName
void on_feedbackEnable_toggled(bool checked)
qint64 m_inputFrequencyOffset
void setReverseAPIAddress(const QString &address)
QString m_audioDeviceName
This is the audio device you get the audio samples from.
void setColor(const QColor &color)
virtual void setCenterFrequency(qint64 centerFrequency)
void on_playLoop_toggled(bool checked)
void applySettings(bool force=false)
void setVisible(bool visible)
void setReverseAPIPort(uint16_t port)
static AMModGUI * create(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
uint16_t getReverseAPIChannelIndex() const
void setBandwidth(int bandwidth)
const QColor & getColor() const
void setTitle(const QString &title)
void setName(const QString &name)
void on_toneFrequency_valueChanged(int value)
void setCenterFrequency(int centerFrequency)
AMModInputAF m_modAFInput
bool deserialize(const QByteArray &data)
void on_showFileDialog_clicked(bool checked)
void setUseReverseAPI(bool useReverseAPI)
void on_volume_valueChanged(int value)
AMModGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget *parent=0)
uint16_t m_reverseAPIPort