19 #include <QMessageBox> 26 #include "ui_sdrplaygui.h" 38 m_deviceUISet(deviceUISet),
39 m_doApplySettings(true),
46 ui->centerFrequency->setValueRange(7, 10U, 12000U);
54 ui->ifFrequency->clear();
60 ui->samplerate->clear();
66 ui->bandwidth->clear();
77 connect(startStopRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
openDeviceSettingsDialog(
const QPoint &)));
158 qDebug() <<
"SDRPlayGui::handleMessage: MsgReportSDRPlayGains";
170 ui->gainBasebandText->setText(gainText);
178 ui->gainTunerText->setText(gainText);
204 qDebug(
"SDRPlayGui::handleInputMessages: message: %s", message->
getIdentifier());
211 qDebug(
"SDRPlayGui::handleInputMessages: DSPSignalNotification: SampleRate:%d, CenterFrequency:%llu", notif->
getSampleRate(), notif->
getCenterFrequency());
258 ui->gainTuner->setEnabled(
true);
259 ui->gainLNA->setEnabled(
false);
260 ui->gainMixer->setEnabled(
false);
261 ui->gainBaseband->setEnabled(
false);
264 ui->gainTuner->setValue(gain);
266 gainText.sprintf(
"%03d", gain);
267 ui->gainTunerText->setText(gainText);
272 ui->gainTuner->setEnabled(
false);
273 ui->gainLNA->setEnabled(
true);
274 ui->gainMixer->setEnabled(
true);
275 ui->gainBaseband->setEnabled(
true);
281 ui->gainBaseband->setValue(gain);
283 gainText.sprintf(
"%02d", gain);
284 ui->gainBasebandText->setText(gainText);
296 qDebug() <<
"SDRPlayGui::updateHardware";
312 ui->startStop->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
315 ui->startStop->setStyleSheet(
"QToolButton { background-color : blue; }");
318 ui->startStop->setStyleSheet(
"QToolButton { background-color : green; }");
321 ui->startStop->setStyleSheet(
"QToolButton { background-color : red; }");
347 qDebug(
"SDRPlayGui::on_dcOffset_toggled: %s", checked ?
"on" :
"off");
360 ui->centerFrequency->setValueRange(
404 qDebug(
"SDRPlayGui::on_gainTunerOn_toggled: %s", checked ?
"on" :
"off");
406 ui->gainTuner->setEnabled(
true);
407 ui->gainLNA->setEnabled(
false);
408 ui->gainMixer->setEnabled(
false);
409 ui->gainBaseband->setEnabled(
false);
418 gainText.sprintf(
"%03d", gain);
419 ui->gainTunerText->setText(gainText);
427 qDebug(
"SDRPlayGui::on_gainManualOn_toggled: %s", checked ?
"on" :
"off");
429 ui->gainTuner->setEnabled(
false);
430 ui->gainLNA->setEnabled(
true);
431 ui->gainMixer->setEnabled(
true);
432 ui->gainBaseband->setEnabled(
true);
454 gainText.sprintf(
"%02d", value);
455 ui->gainBasebandText->setText(gainText);
472 ui->record->setStyleSheet(
"QToolButton { background-color : red; }");
474 ui->record->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
static unsigned int getNbRates()
uint32_t m_ifFrequencyIndex
void blockApplySettings(bool block)
void updateSampleRateAndFrequency()
Message * pop()
Pop message from queue.
const QString & getReverseAPIAddress() const
uint16_t m_reverseAPIPort
void on_fBand_currentIndexChanged(int index)
void on_gainLNA_toggled(bool checked)
void push(Message *message, bool emitSignal=true)
Push message onto queue.
void setSampleRate(qint32 sampleRate)
DeviceSampleSource * getSampleSource()
Return pointer to the device sample source (single Rx) or nullptr.
void setUseReverseAPI(bool useReverseAPI)
void handleInputMessages()
MessageQueue * getInputMessageQueue()
static unsigned int getNbBands()
static unsigned int getNbBandwidths()
SDRPlaySettings m_settings
uint16_t getReverseAPIDeviceIndex() const
quint64 m_deviceCenterFrequency
Center frequency in device.
static unsigned int getNbIFs()
QString errorMessage()
Last error message from the device engine.
void on_fcPos_currentIndexChanged(int index)
void setName(const QString &name)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
GLSpectrum * getSpectrum()
Direct spectrum getter.
engine is before initialization
virtual void resetToDefaults()
qint64 getCenterFrequency() const
EngineState state() const
Return the state of the device engine corresponding to the stream type.
virtual qint64 getCenterFrequency() const
void on_startStop_toggled(bool checked)
QString m_reverseAPIAddress
QByteArray serialize() const
uint16_t getReverseAPIPort() const
void on_gainBaseband_valueChanged(int value)
virtual QByteArray serialize() const
static bool match(const Message *message)
void on_gainTunerOn_toggled(bool checked)
uint64_t m_centerFrequency
static unsigned int getBandLow(unsigned int band_index)
static unsigned int getBandwidth(unsigned int bandwidth_index)
uint32_t m_frequencyBandIndex
void on_ppm_valueChanged(int value)
void on_ifFrequency_currentIndexChanged(int index)
void on_centerFrequency_changed(quint64 value)
virtual bool deserialize(const QByteArray &data)
void on_record_toggled(bool checked)
virtual bool handleMessage(const Message &message)
uint32_t m_bandwidthIndex
MessageQueue m_inputMessageQueue
void openDeviceSettingsDialog(const QPoint &p)
void on_dcOffset_toggled(bool checked)
virtual void setCenterFrequency(qint64 centerFrequency)
bool deserialize(const QByteArray &data)
void on_samplerate_currentIndexChanged(int index)
int getSampleRate() const
void setCenterFrequency(qint64 frequency)
virtual const char * getIdentifier() const
static unsigned int getRate(unsigned int rate_index)
void setReverseAPIAddress(const QString &address)
static unsigned int getIF(unsigned int if_index)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
static unsigned int getBandHigh(unsigned int band_index)
DeviceUISet * m_deviceUISet
void on_gainTuner_valueChanged(int value)
void setReverseAPIPort(uint16_t port)
virtual void setMessageQueueToGUI(MessageQueue *queue)=0
void on_iqImbalance_toggled(bool checked)
static QString getBandName(unsigned int band_index)
bool useReverseAPI() const
uint16_t m_reverseAPIDeviceIndex
uint32_t m_devSampleRateIndex
SDRPlayGui(DeviceUISet *deviceUISet, QWidget *parent=0)
DeviceSampleSource * m_sampleSource
void on_decim_currentIndexChanged(int index)
void on_gainManualOn_toggled(bool checked)
void on_bandwidth_currentIndexChanged(int index)
void on_gainMixer_toggled(bool checked)