19 #include <QMessageBox> 25 #include "ui_perseusgui.h" 37 m_deviceUISet(deviceUISet),
38 m_doApplySettings(true),
39 m_forceSettings(true),
42 m_lastEngineState(
DeviceAPI::StNotStarted)
55 connect(startStopRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
openDeviceSettingsDialog(
const QPoint &)));
162 qDebug(
"PerseusGui::handleInputMessages: DSPSignalNotification: SampleRate:%d, CenterFrequency:%llu", notif->
getSampleRate(), notif->
getCenterFrequency());
169 qDebug(
"PerseusGui::handleInputMessages: message: %s", message->
getIdentifier());
207 ui->sampleRate->blockSignals(
true);
211 ui->sampleRate->clear();
213 for (
unsigned int i = 0;
i <
m_rates.size();
i++)
216 ui->sampleRate->addItem(QString(
"%1").
arg(QString(
"%1").
arg(sampleRate, 5, 10, QChar(
' '))));
220 ui->sampleRate->blockSignals(
false);
222 if (savedIndex <
m_rates.size())
224 ui->sampleRate->setCurrentIndex(savedIndex);
228 ui->sampleRate->setCurrentIndex((
int)
m_rates.size()-1);
237 qint64 minLimit = 10 + deltaFrequency;
238 qint64 maxLimit = 40000 + deltaFrequency;
240 minLimit = minLimit < 0 ? 0 : minLimit > 9999999 ? 9999999 : minLimit;
241 maxLimit = maxLimit < 0 ? 0 : maxLimit > 9999999 ? 9999999 : maxLimit;
243 qDebug(
"PerseusGui::updateFrequencyLimits: delta: %lld min: %lld max: %lld", deltaFrequency, minLimit, maxLimit);
245 ui->centerFrequency->setValueRange(7, minLimit, maxLimit);
269 ui->LOppm->setValue(0);
286 if ((index < 0) || (index > 5))
304 ui->record->setStyleSheet(
"QToolButton { background-color : red; }");
306 ui->record->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
346 qDebug() <<
"PerseusGui::updateHardware";
362 ui->startStop->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
365 ui->startStop->setStyleSheet(
"QToolButton { background-color : blue; }");
368 ui->startStop->setStyleSheet(
"QToolButton { background-color : green; }");
371 ui->startStop->setStyleSheet(
"QToolButton { background-color : red; }");
384 if (rate_index <
m_rates.size())
396 for (
unsigned int i=0;
i <
m_rates.size();
i++)
qint64 m_transverterDeltaFrequency
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)
void on_wideband_toggled(bool checked)
quint32 m_devSampleRateIndex
DeviceSampleSource * getSampleSource()
Return pointer to the device sample source (single Rx) or nullptr.
void setUseReverseAPI(bool useReverseAPI)
MessageQueue * getInputMessageQueue()
uint16_t m_reverseAPIDeviceIndex
DeviceUISet * m_deviceUISet
std::vector< uint32_t > m_rates
void on_startStop_toggled(bool checked)
uint16_t getReverseAPIDeviceIndex() const
uint32_t getDevSampleRate(unsigned int index)
void updateFrequencyLimits()
QString errorMessage()
Last error message from the device engine.
QByteArray serialize() const
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
quint64 m_centerFrequency
GLSpectrum * getSpectrum()
Direct spectrum getter.
engine is before initialization
virtual bool handleMessage(const Message &message)
qint64 getCenterFrequency() const
EngineState state() const
Return the state of the device engine corresponding to the stream type.
void on_adcPreamp_toggled(bool checked)
void blockApplySettings(bool block)
QByteArray serialize() const
uint16_t getReverseAPIPort() const
void on_sampleRate_currentIndexChanged(int index)
void on_decim_currentIndexChanged(int index)
void on_resetLOppm_clicked()
void on_attenuator_currentIndexChanged(int index)
bool deserialize(const QByteArray &data)
QString m_reverseAPIAddress
static bool match(const Message *message)
PerseusInput * m_sampleSource
void displaySampleRates()
int getDevSampleRateIndex(uint32_t sampleRate)
void on_record_toggled(bool checked)
PerseusSettings m_settings
void on_adcDither_toggled(bool checked)
bool deserialize(const QByteArray &data)
virtual void setCenterFrequency(qint64 centerFrequency)
quint64 m_deviceCenterFrequency
Center frequency in device.
void on_centerFrequency_changed(quint64 value)
void on_transverter_clicked()
int getSampleRate() const
uint16_t m_reverseAPIPort
void setCenterFrequency(qint64 frequency)
virtual const char * getIdentifier() const
void updateSampleRateAndFrequency()
void setReverseAPIAddress(const QString &address)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
void setReverseAPIPort(uint16_t port)
MessageQueue m_inputMessageQueue
bool useReverseAPI() const
void setName(const QString &name)
void handleInputMessages()
void openDeviceSettingsDialog(const QPoint &p)
virtual qint64 getCenterFrequency() const
void on_LOppm_valueChanged(int value)
PerseusGui(DeviceUISet *deviceUISet, QWidget *parent=0)