23 #include <QFileDialog> 24 #include <QMessageBox> 26 #include "ui_fileinputgui.h" 44 m_deviceUISet(deviceUISet),
46 m_doApplySettings(true),
53 m_startingTimeStamp(0),
56 m_enableNavTime(false),
57 m_lastEngineState(
DeviceAPI::StNotStarted)
61 ui->centerFrequency->setValueRange(7, 0, pow(10,7));
63 ui->crcLabel->setStyleSheet(
"QLabel { background:rgb(79,79,79); }");
70 connect(startStopRightClickEnabler, SIGNAL(rightClick(
const QPoint &)),
this, SLOT(
openDeviceSettingsDialog(
const QPoint &)));
75 ui->navTimeSlider->setEnabled(
false);
76 ui->acceleration->setEnabled(
false);
151 qDebug(
"FileInputGUI::handleInputMessages: DSPSignalNotification: SampleRate:%d, CenterFrequency:%llu", notif->
getSampleRate(), notif->
getCenterFrequency());
210 ui->play->setChecked(checked);
211 ui->navTimeSlider->setEnabled(!checked);
212 ui->acceleration->setEnabled(!checked);
221 ui->crcLabel->setStyleSheet(
"QLabel { background-color : green; }");
223 ui->crcLabel->setStyleSheet(
"QLabel { background-color : red; }");
281 ui->startStop->setStyleSheet(
"QToolButton { background:rgb(79,79,79); }");
284 ui->startStop->setStyleSheet(
"QToolButton { background-color : blue; }");
287 ui->startStop->setStyleSheet(
"QToolButton { background-color : green; }");
290 ui->startStop->setStyleSheet(
"QToolButton { background-color : red; }");
305 ui->navTimeSlider->setEnabled(!checked);
306 ui->acceleration->setEnabled(!checked);
322 QString fileName = QFileDialog::getOpenFileName(
this,
323 tr(
"Open I/Q record file"),
".", tr(
"SDR I/Q Files (*.sdriq)"), 0, QFileDialog::DontUseNativeDialog);
329 ui->crcLabel->setStyleSheet(
"QLabel { background:rgb(79,79,79); }");
346 qDebug() <<
"FileInputGUI::configureFileName: " <<
m_fileName.toStdString().c_str();
364 QTime recordLength(0, 0, 0, 0);
366 QString s_time = recordLength.toString(
"HH:mm:ss");
367 ui->recordLengthText->setText(s_time);
382 t = t.addSecs(t_sec);
383 t = t.addMSecs(t_msec);
384 QString s_timems = t.toString(
"HH:mm:ss.zzz");
385 ui->relTimeText->setText(s_timems);
388 QDateTime dt = QDateTime::fromMSecsSinceEpoch(startingTimeStampMsec);
389 dt = dt.addSecs(t_sec);
390 dt = dt.addMSecs(t_msec);
391 QString s_date = dt.toString(
"yyyy-MM-dd HH:mm:ss.zzz");
392 ui->absTimeText->setText(s_date);
397 ui->navTimeSlider->setValue((
int) (posRatio * 1000.0));
411 ui->acceleration->blockSignals(
true);
412 ui->acceleration->clear();
413 ui->acceleration->addItem(QString(
"1"));
418 int m = pow(10.0,
i);
421 ui->acceleration->addItem(s);
424 ui->acceleration->addItem(s);
427 ui->acceleration->addItem(s);
430 ui->acceleration->blockSignals(
false);
437 }
else if (n < 100000) {
438 s = tr(
"%1k").arg(n/1000);
439 }
else if (n < 1000000) {
440 s = tr(
"%1e5").arg(n/100000);
441 }
else if (n < 1000000000) {
442 s = tr(
"%1M").arg(n/1000000);
444 s = tr(
"%1G").arg(n/1000000000);
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)
DeviceSampleSource * getSampleSource()
Return pointer to the device sample source (single Rx) or nullptr.
void setUseReverseAPI(bool useReverseAPI)
MessageQueue * getInputMessageQueue()
uint16_t getReverseAPIDeviceIndex() const
const QTimer & getMasterTimer() const
This is the DSPEngine master timer.
QString errorMessage()
Last error message from the device engine.
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
GLSpectrum * getSpectrum()
Direct spectrum getter.
engine is before initialization
qint64 getCenterFrequency() const
EngineState state() const
Return the state of the device engine corresponding to the stream type.
uint16_t getReverseAPIPort() const
static bool match(const Message *message)
int getSampleRate() const
void setCenterFrequency(qint64 frequency)
void setReverseAPIAddress(const QString &address)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
void setReverseAPIPort(uint16_t port)
virtual void setMessageQueueToGUI(MessageQueue *queue)=0
bool useReverseAPI() const