25 #include "ui_dsddemodgui.h" 39 #include <QDockWidget> 40 #include <QMainWindow> 110 qDebug(
"DSDDemodGUI::handleMessage: DSDDemod::MsgConfigureDSDDemod");
148 ui->rfBWText->setText(QString(
"%1k").
arg(value / 10.0, 0,
'f', 1));
155 ui->demodGainText->setText(QString(
"%1").
arg(value / 100.0, 0,
'f', 2));
162 ui->fmDeviationText->setText(QString(
"%1%2k").
arg(QChar(0xB1, 0x00)).
arg(value / 10.0, 0,
'f', 1));
169 ui->volumeText->setText(QString(
"%1").
arg(value / 10.0, 0,
'f', 1));
233 ui->squelchGateText->setText(QString(
"%1").
arg(value * 10.0, 0,
'f', 0));
239 ui->squelchText->setText(QString(
"%1").
arg(value / 1.0, 0,
'f', 0));
259 ui->symbolPLLLock->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
261 ui->symbolPLLLock->setStyleSheet(
"QToolButton { background:rgb(53,53,53); }");
307 qDebug(
"DSDDemodGUI::on_viewStatusLog_clicked");
328 ui->screenTV->setColor(
true);
329 ui->screenTV->resizeTVScreen(200,200);
330 setAttribute(Qt::WA_DeleteOnClose,
true);
333 connect(
this, SIGNAL(customContextMenuRequested(
const QPoint &)),
this, SLOT(
onMenuDialogCalled(
const QPoint &)));
337 connect(audioMuteRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
audioSelect()));
345 for (
float x = -0.84; x < 1.0; x += 0.56)
347 for (
float y = -0.84; y < 1.0; y += 0.56)
361 ui->audioMute->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
363 ui->deltaFrequencyLabel->setText(QString(
"%1f").
arg(QChar(0x94, 0x03)));
365 ui->deltaFrequency->setValueRange(
false, 7, -9999999, 9999999);
428 ui->rfBWText->setText(QString(
"%1k").
arg(
ui->rfBW->value() / 10.0, 0,
'f', 1));
431 ui->fmDeviationText->setText(QString(
"%1%2k").
arg(QChar(0xB1, 0x00)).
arg(
ui->fmDeviation->value() / 10.0, 0,
'f', 1));
434 ui->squelchText->setText(QString(
"%1").
arg(
ui->squelch->value() / 1.0, 0,
'f', 0));
437 ui->squelchGateText->setText(QString(
"%1").
arg(
ui->squelchGate->value() * 10.0, 0,
'f', 0));
440 ui->demodGainText->setText(QString(
"%1").
arg(
ui->demodGain->value() / 100.0, 0,
'f', 2));
443 ui->volumeText->setText(QString(
"%1").
arg(
ui->volume->value() / 10.0, 0,
'f', 1));
475 qDebug() <<
"DSDDemodGUI::applySettings";
515 qDebug(
"DSDDemodGUI::audioSelect");
528 double magsqAvg, magsqPeak;
534 ui->channelPowerMeter->levelChanged(
535 (100.0f + powDbAvg) / 100.0f,
536 (100.0f + powDbPeak) / 100.0f,
540 ui->channelPower->setText(tr(
"%1 dB").
arg(powDbAvg, 0,
'f', 1));
548 ui->audioMute->setStyleSheet(
"QToolButton { background-color : green; }");
550 ui->audioMute->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
566 ui->slot1On->setStyleSheet(
"QToolButton { background-color : green; }");
568 ui->slot1On->setStyleSheet(
"QToolButton { background-color : rgb(79,79,79); }");
572 ui->slot2On->setStyleSheet(
"QToolButton { background-color : green; }");
574 ui->slot2On->setStyleSheet(
"QToolButton { background-color : rgb(79,79,79); }");
579 if (frameTypeText[0] ==
'\0') {
580 ui->syncText->setStyleSheet(
"QLabel { background:rgb(53,53,53); }");
582 ui->syncText->setStyleSheet(
"QLabel { background:rgb(37,53,39); }");
585 ui->syncText->setText(QString(frameTypeText));
588 ui->formatStatusText->setText(QString(formatStatusText));
590 if (
ui->activateStatusLog->isChecked()) {
594 if (formatStatusText[0] ==
'\0') {
595 ui->formatStatusText->setStyleSheet(
"QLabel { background:rgb(53,53,53); }");
597 ui->formatStatusText->setStyleSheet(
"QLabel { background:rgb(37,53,39); }");
601 ui->symbolPLLLock->setStyleSheet(
"QToolButton { background-color : green; }");
603 ui->symbolPLLLock->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
float getLatitude() const
static MainWindow * getInstance()
const QString & getReverseAPIAddress() const
QByteArray serialize() const
int getCenterFrequency() const
bool m_enableCosineFiltering
void getMagSqLevels(double &avg, double &peak, int &nbSamples)
void push(Message *message, bool emitSignal=true)
Push message onto queue.
void setChannelMarker(Serializable *channelMarker)
static double dbPower(double magsq, double floor=1e-12)
QString m_audioDeviceName
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
static const QString m_channelIdURI
void onMenuDialogCalled(const QPoint &p)
bool m_syncOrConstellation
int m_traceLengthMutliplier
void channelMarkerHighlightedByCursor()
DSDDemodGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel, QWidget *parent=0)
void on_deltaFrequency_changed(qint64 value)
static unsigned int getRateIndex(unsigned int rate)
void setName(const QString &name)
DSDDemodSettings m_settings
void setReverseAPIChannelIndex(uint16_t channelIndex)
const MainSettings & getMainSettings() const
uint16_t getReverseAPIPort() const
int getCarrierPos() const
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
QByteArray serialize() const
qint64 m_inputFrequencyOffset
void on_traceStroke_valueChanged(int value)
int getSymbolSyncQuality() const
void setScopeXYSink(BasebandSampleSink *sampleSink)
void onWidgetRolled(QWidget *widget, bool rollDown)
bool m_syncOrConstellation
const char * getFrameTypeText() const
void on_squelchGate_valueChanged(int value)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
void channelMarkerChangedByCursor()
uint16_t getReverseAPIDeviceIndex() const
uint16_t m_reverseAPIDeviceIndex
void on_demodGain_valueChanged(int value)
void on_enableCosineFiltering_toggled(bool enable)
void on_slot1On_toggled(bool checked)
void on_highPassFilter_toggled(bool checked)
void setStroke(int stroke)
void blockApplySettings(bool block)
void on_slot2On_toggled(bool checked)
virtual bool handleMessage(const Message &message)
void on_traceLength_valueChanged(int value)
virtual void setMessageQueueToGUI(MessageQueue *queue)
static DSPEngine * instance()
void enterEvent(QEvent *)
virtual qint64 getCenterFrequency() const
bool getSquelchOpen() const
void setHighlighted(bool highlighted)
void setPixelsPerFrame(int pixelsPerFrame)
uint16_t m_reverseAPIPort
void registerRxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
void on_audioMute_toggled(bool checked)
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
void removeRxChannelInstance(PluginInstanceGUI *pluginGUI)
bool deserialize(const QByteArray &data)
const QString & getTitle() const
bool useReverseAPI() const
static bool match(const Message *message)
void on_rfBW_valueChanged(int index)
bool getHighlighted() const
void on_baudRate_currentIndexChanged(int index)
void leaveEvent(QEvent *)
float getLongitude() const
void on_fmDeviation_valueChanged(int value)
void on_volume_valueChanged(int value)
int getZeroCrossingPos() const
void configureMyPosition(MessageQueue *messageQueue, float myLatitude, float myLongitude)
DeviceUISet * m_deviceUISet
QString m_audioDeviceName
ChannelMarker m_channelMarker
void setReverseAPIAddress(const QString &address)
virtual void setCenterFrequency(qint64 centerFrequency)
bool getSymbolPLLLocked() const
void setColor(const QColor &color)
const char * updateAndGetStatusText()
void on_viewStatusLog_clicked()
static DSDDemodGUI * create(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSink *rxChannel)
void on_tdmaStereoSplit_toggled(bool checked)
void applySettings(bool force=false)
void setVisible(bool visible)
void setReverseAPIPort(uint16_t port)
uint16_t m_reverseAPIChannelIndex
uint16_t getReverseAPIChannelIndex() const
void setBandwidth(int bandwidth)
const QColor & getColor() const
void setScale(float scale)
void setTitle(const QString &title)
void on_syncOrConstellation_toggled(bool checked)
virtual MessageQueue * getInputMessageQueue()
void addLine(const QString &line)
void setCenterFrequency(int centerFrequency)
void addGraticulePoint(const std::complex< float > &z)
const DSDDecoder & getDecoder() const
void on_symbolPLLLock_toggled(bool checked)
QString m_reverseAPIAddress
static unsigned int getRate(unsigned int rate_index)
void setUseReverseAPI(bool useReverseAPI)
void calculateGraticule(int rows, int cols)
bool deserialize(const QByteArray &data)
bool m_enableCosineFiltering
void handleInputMessages()
void setGridRGB(const QRgb &gridRGB)
void on_squelch_valueChanged(int value)
DSDStatusTextDialog m_dsdStatusTextDialog
void setPlotRGB(const QRgb &plotRGB)
ScopeVisXY * m_scopeVisXY
void on_traceDecay_valueChanged(int value)