24 #include <QMessageBox> 28 #include <QNetworkAccessManager> 29 #include <QNetworkReply> 30 #include <QJsonParseError> 31 #include <QJsonObject> 33 #include "ui_localoutputgui.h" 50 m_deviceUISet(deviceUISet),
54 m_streamSampleRate(0),
55 m_streamCenterFrequency(0),
56 m_lastEngineState(
DeviceAPI::StNotStarted),
59 m_doApplySettings(true),
68 ui->centerFrequency->setValueRange(7, 0, 9999999U);
71 ui->centerFrequencyHz->setValueRange(3, 0, 999U);
74 connect(startStopRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
openDeviceSettingsDialog(
const QPoint &)));
88 connect(
m_networkManager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(networkManagerFinished(QNetworkReply*)));
96 disconnect(
m_networkManager, SIGNAL(finished(QNetworkReply*)),
this, SLOT(networkManagerFinished(QNetworkReply*)));
136 qDebug(
"LocalOutputGui::deserialize");
159 (void) centerFrequency;
215 qDebug(
"LocalOutputGui::handleInputMessages: DSPSignalNotification: SampleRate:%d, CenterFrequency:%llu", notif->
getSampleRate(), notif->
getCenterFrequency());
274 qDebug() <<
"LocalOutputGui::updateHardware";
292 ui->startStop->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
295 ui->startStop->setStyleSheet(
"QToolButton { background-color : blue; }");
298 ui->startStop->setStyleSheet(
"QToolButton { background-color : green; }");
301 ui->startStop->setStyleSheet(
"QToolButton { background-color : red; }");
virtual ~LocalOutputGui()
LocalOutputSettings m_settings
current settings
virtual void setMessageQueueToGUI(MessageQueue *queue)
Message * pop()
Pop message from queue.
const QString & getReverseAPIAddress() const
QPalette m_paletteWhiteText
void push(Message *message, bool emitSignal=true)
Push message onto queue.
void setSampleRate(qint32 sampleRate)
void setUseReverseAPI(bool useReverseAPI)
static MsgStartStop * create(bool startStop)
QByteArray serialize() const
void updateSampleRateAndFrequency()
QByteArray serialize() const
DeviceUISet * m_deviceUISet
MessageQueue m_inputMessageQueue
uint16_t getReverseAPIDeviceIndex() const
int m_streamSampleRate
Sample rate of received stream.
QNetworkAccessManager * m_networkManager
QString errorMessage()
Last error message from the device engine.
DeviceSampleSink * getSampleSink()
Return pointer to the device sample sink (single Tx) or nullptr.
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
GLSpectrum * getSpectrum()
Direct spectrum getter.
bool getStartStop() const
bool deserialize(const QByteArray &data)
engine is before initialization
int getSampleRate() const
qint64 getCenterFrequency() const
EngineState state() const
Return the state of the device engine corresponding to the stream type.
virtual void setCenterFrequency(qint64 centerFrequency)
LocalOutput * m_sampleSink
MessageQueue * getInputMessageQueue()
uint16_t getReverseAPIPort() const
virtual qint64 getCenterFrequency() const
void handleInputMessages()
void setName(const QString &name)
uint16_t m_reverseAPIDeviceIndex
static bool match(const Message *message)
bool deserialize(const QByteArray &data)
uint16_t m_reverseAPIPort
int getSampleRate() const
quint64 m_streamCenterFrequency
Center frequency of received stream.
void setCenterFrequency(qint64 frequency)
void setReverseAPIAddress(const QString &address)
LocalOutputGui(DeviceUISet *deviceUISet, QWidget *parent=0)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
void on_startStop_toggled(bool checked)
void setReverseAPIPort(uint16_t port)
QPalette m_paletteGreenText
void openDeviceSettingsDialog(const QPoint &p)
bool useReverseAPI() const
virtual bool handleMessage(const Message &message)
QString m_reverseAPIAddress
void blockApplySettings(bool block)
int getCenterFrequency() const