18 #include <QFileDialog> 19 #include <QMessageBox> 33 #include "ui_filesourcegui.h" 62 (void) centerFrequency;
132 ui->play->setChecked(checked);
133 ui->navTime->setEnabled(!checked);
143 ui->crcLabel->setStyleSheet(
"QLabel { background-color : green; }");
145 ui->crcLabel->setStyleSheet(
"QLabel { background-color : red; }");
178 setAttribute(Qt::WA_DeleteOnClose,
true);
180 connect(
this, SIGNAL(customContextMenuRequested(
const QPoint &)),
this, SLOT(
onMenuDialogCalled(
const QPoint &)));
247 qDebug() <<
"FileSourceGui::configureFileName: " <<
m_fileName.toStdString().c_str();
254 ui->play->blockSignals(
true);
256 ui->play->blockSignals(
false);
264 QTime recordLength(0, 0, 0, 0);
266 QString s_time = recordLength.toString(
"HH:mm:ss");
267 ui->recordLengthText->setText(s_time);
283 t = t.addSecs(t_sec);
284 t = t.addMSecs(t_msec);
285 QString s_timems = t.toString(
"HH:mm:ss.zzz");
286 ui->relTimeText->setText(s_timems);
289 QDateTime dt = QDateTime::fromMSecsSinceEpoch(startingTimeStampMsec);
290 dt = dt.addSecs(t_sec);
291 dt = dt.addMSecs(t_msec);
292 QString s_date = dt.toString(
"yyyy-MM-dd HH:mm:ss.zzz");
293 ui->absTimeText->setText(s_date);
298 ui->navTime->setValue((
int) (posRatio * 1000.0));
327 ui->offsetFrequencyText->setText(tr(
"%1 Hz").
arg(loc.toString(shift)));
328 ui->channelRateText->setText(tr(
"%1k").
arg(QString::number(channelSampleRate / 1000.0,
'g', 5)));
407 ui->gainText->setText(tr(
"%1 dB").
arg(value));
415 QString fileName = QFileDialog::getOpenFileName(
this,
416 tr(
"Open I/Q record file"),
".", tr(
"SDR I/Q Files (*.sdriq)"), 0, QFileDialog::DontUseNativeDialog);
422 ui->crcLabel->setStyleSheet(
"QLabel { background:rgb(79,79,79); }");
441 ui->navTime->setEnabled(!checked);
462 ui->position->setMaximum(maxHash-1);
473 ui->filterChainText->setText(s);
481 double magsqAvg, magsqPeak;
487 ui->channelPowerMeter->levelChanged(
488 (100.0f + powDbAvg) / 100.0f,
489 (100.0f + powDbPeak) / 100.0f,
493 ui->channelPower->setText(QString::number(powDbAvg,
'f', 1));
int getSampleRate() const
void applySettings(bool force=false)
void removeTxChannelInstance(PluginInstanceGUI *pluginGUI)
const QString & getReverseAPIAddress() const
virtual qint64 getCenterFrequency() const
void on_position_valueChanged(int value)
bool deserialize(const QByteArray &data)
void registerTxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
void push(Message *message, bool emitSignal=true)
Push message onto queue.
void channelMarkerChangedByCursor()
QByteArray serialize() const
void updateWithStreamData()
void on_interpolationFactor_currentIndexChanged(int index)
static double dbPower(double magsq, double floor=1e-12)
QString m_reverseAPIAddress
bool getPlayPause() const
quint64 m_startingTimeStamp
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
void setName(const QString &name)
uint32_t m_filterChainHash
const QTimer & getMasterTimer() const
This is the DSPEngine master timer.
void setReverseAPIChannelIndex(uint16_t channelIndex)
uint16_t getReverseAPIPort() const
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
static FileSourceGUI * create(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
void on_playLoop_toggled(bool checked)
void on_navTime_valueChanged(int value)
void updateWithStreamTime()
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
QByteArray serialize() const
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
uint16_t getReverseAPIDeviceIndex() const
void onWidgetRolled(QWidget *widget, bool rollDown)
static double convertToString(unsigned int log2, unsigned int chainHash, QString &chainString)
void enterEvent(QEvent *)
FileSourceGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget *parent=nullptr)
void blockApplySettings(bool block)
void getMagSqLevels(double &avg, double &peak, int &nbSamples)
void displayRateAndShift()
void on_play_toggled(bool checked)
void setSourceOrSinkStream(bool sourceOrSinkStream)
void onMenuDialogCalled(const QPoint &p)
void setMovable(bool movable)
void setHighlighted(bool highlighted)
virtual void setCenterFrequency(qint64 centerFrequency)
FileSourceSettings m_settings
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
virtual void setMessageQueueToGUI(MessageQueue *queue)
const QString & getTitle() const
bool useReverseAPI() const
static bool match(const Message *message)
void handleSourceMessages()
void updateWithAcquisition()
uint16_t m_reverseAPIChannelIndex
void applyInterpolation()
bool deserialize(const QByteArray &data)
uint16_t m_reverseAPIDeviceIndex
FileSource * m_fileSource
void setReverseAPIAddress(const QString &address)
ChannelMarker m_channelMarker
void leaveEvent(QEvent *)
void setColor(const QColor &color)
double m_shiftFrequencyFactor
Channel frequency shift factor.
virtual MessageQueue * getInputMessageQueue()
void on_showFileDialog_clicked(bool checked)
uint16_t m_reverseAPIPort
void setVisible(bool visible)
void setReverseAPIPort(uint16_t port)
uint16_t getReverseAPIChannelIndex() const
void setBandwidth(int bandwidth)
const QColor & getColor() const
void setTitle(const QString &title)
void applyChannelSettings()
virtual bool handleMessage(const Message &message)
void setCenterFrequency(int centerFrequency)
void setChannelMarker(Serializable *channelMarker)
void on_gain_valueChanged(int value)
void setUseReverseAPI(bool useReverseAPI)
static const QString m_channelIdURI
DeviceUISet * m_deviceUISet