19 #include <QMessageBox> 21 #include <libairspy/airspy.h> 29 #include "ui_airspygui.h" 40 m_deviceUISet(deviceUISet),
41 m_doApplySettings(true),
42 m_forceSettings(true),
45 m_lastEngineState(
DeviceAPI::StNotStarted)
58 connect(startStopRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
openDeviceSettingsDialog(
const QPoint &)));
159 qDebug(
"AirspyGui::handleInputMessages: message: %s", message->
getIdentifier());
166 qDebug(
"AirspyGui::handleInputMessages: DSPSignalNotification: SampleRate:%d, CenterFrequency:%llu", notif->
getSampleRate(), notif->
getCenterFrequency());
195 minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit;
196 maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit;
198 qDebug(
"AirspyGui::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit);
200 ui->centerFrequency->setValueRange(7, minLimit, maxLimit);
239 ui->sampleRate->blockSignals(
true);
243 ui->sampleRate->clear();
245 for (
unsigned int i = 0;
i <
m_rates.size();
i++)
247 ui->sampleRate->addItem(QString(
"%1").
arg(QString::number(
m_rates[
i]/1000000.0,
'f', 1)));
251 ui->sampleRate->blockSignals(
false);
253 if (savedIndex <
m_rates.size())
255 ui->sampleRate->setCurrentIndex(savedIndex);
259 ui->sampleRate->setCurrentIndex((
int)
m_rates.size()-1);
320 if ((index <0) || (index > 6))
331 }
else if (index == 1) {
334 }
else if (index == 2) {
342 if ((value < 0) || (value > 14))
345 ui->lnaGainText->setText(tr(
"%1dB").
arg(value));
352 if ((value < 0) || (value > 15))
355 ui->mixText->setText(tr(
"%1dB").
arg(value));
362 if ((value < 0) || (value > 15))
365 ui->vgaText->setText(tr(
"%1dB").
arg(value));
382 ui->record->setStyleSheet(
"QToolButton { background-color : red; }");
384 ui->record->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
403 qDebug() <<
"AirspyGui::updateHardware";
419 ui->startStop->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
422 ui->startStop->setStyleSheet(
"QToolButton { background-color : blue; }");
425 ui->startStop->setStyleSheet(
"QToolButton { background-color : green; }");
428 ui->startStop->setStyleSheet(
"QToolButton { background-color : red; }");
441 if (rate_index <
m_rates.size())
453 for (
unsigned int i=0;
i <
m_rates.size();
i++)
void on_record_toggled(bool checked)
void on_centerFrequency_changed(quint64 value)
quint32 m_devSampleRateIndex
AirspySettings m_settings
quint64 m_centerFrequency
Message * pop()
Pop message from queue.
const QString & getReverseAPIAddress() const
void push(Message *message, bool emitSignal=true)
Push message onto queue.
void setSampleRate(qint32 sampleRate)
std::vector< uint32_t > m_rates
DeviceSampleSource * getSampleSource()
Return pointer to the device sample source (single Rx) or nullptr.
void setUseReverseAPI(bool useReverseAPI)
void blockApplySettings(bool block)
uint32_t getDevSampleRate(unsigned int index)
MessageQueue * getInputMessageQueue()
void on_biasT_stateChanged(int state)
void on_LOppm_valueChanged(int value)
uint16_t getReverseAPIDeviceIndex() const
bool deserialize(const QByteArray &data)
QString errorMessage()
Last error message from the device engine.
void on_lna_valueChanged(int value)
virtual qint64 getCenterFrequency() const
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
MessageQueue m_inputMessageQueue
void updateSampleRateAndFrequency()
GLSpectrum * getSpectrum()
Direct spectrum getter.
DeviceSampleSource * m_sampleSource
engine is before initialization
qint64 getCenterFrequency() const
EngineState state() const
Return the state of the device engine corresponding to the stream type.
void on_decim_currentIndexChanged(int index)
void on_iqImbalance_toggled(bool checked)
uint16_t getReverseAPIPort() const
void on_dcOffset_toggled(bool checked)
void updateFrequencyLimits()
static bool match(const Message *message)
void on_lnaAGC_stateChanged(int state)
qint64 m_transverterDeltaFrequency
void displaySampleRates()
void on_sampleRate_currentIndexChanged(int index)
void setName(const QString &name)
virtual void setCenterFrequency(qint64 centerFrequency)
uint16_t m_reverseAPIPort
void on_vga_valueChanged(int value)
virtual bool handleMessage(const Message &message)
void on_startStop_toggled(bool checked)
int getSampleRate() const
void on_transverter_clicked()
void setCenterFrequency(qint64 frequency)
virtual const char * getIdentifier() const
QString m_reverseAPIAddress
void setReverseAPIAddress(const QString &address)
QByteArray serialize() const
int getDevSampleRateIndex(uint32_t sampleRate)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
quint64 m_deviceCenterFrequency
Center frequency in device.
void setReverseAPIPort(uint16_t port)
virtual void setMessageQueueToGUI(MessageQueue *queue)=0
bool deserialize(const QByteArray &data)
uint16_t m_reverseAPIDeviceIndex
DeviceUISet * m_deviceUISet
AirspyGui(DeviceUISet *deviceUISet, QWidget *parent=0)
bool useReverseAPI() const
void on_mixAGC_stateChanged(int state)
void on_mix_valueChanged(int value)
QByteArray serialize() const
void handleInputMessages()
void on_fcPos_currentIndexChanged(int index)
void openDeviceSettingsDialog(const QPoint &p)