SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
atvmodgui.cpp
Go to the documentation of this file.
1 // Copyright (C) 2017 Edouard Griffiths, F4EXB //
3 // //
4 // This program is free software; you can redistribute it and/or modify //
5 // it under the terms of the GNU General Public License as published by //
6 // the Free Software Foundation as version 3 of the License, or //
7 // (at your option) any later version. //
8 // //
9 // This program is distributed in the hope that it will be useful, //
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of //
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
12 // GNU General Public License V3 for more details. //
13 // //
14 // You should have received a copy of the GNU General Public License //
15 // along with this program. If not, see <http://www.gnu.org/licenses/>. //
17 
18 #include <QDockWidget>
19 #include <QMainWindow>
20 #include <QFileDialog>
21 #include <QTime>
22 #include <QDebug>
23 #include <QMessageBox>
24 
25 #include <cmath>
26 
27 #include "device/deviceuiset.h"
28 #include "plugin/pluginapi.h"
29 #include "util/simpleserializer.h"
30 #include "dsp/dspengine.h"
31 #include "util/db.h"
33 #include "mainwindow.h"
34 
35 #include "ui_atvmodgui.h"
36 #include "atvmodgui.h"
37 
39 {
40  ATVModGUI* gui = new ATVModGUI(pluginAPI, deviceUISet, channelTx);
41  return gui;
42 }
43 
45 {
46  delete this;
47 }
48 
49 void ATVModGUI::setName(const QString& name)
50 {
51  setObjectName(name);
52 }
53 
54 QString ATVModGUI::getName() const
55 {
56  return objectName();
57 }
58 
61 }
62 
63 void ATVModGUI::setCenterFrequency(qint64 centerFrequency)
64 {
65  m_channelMarker.setCenterFrequency(centerFrequency);
66  applySettings();
67 }
68 
70 {
72 }
73 
74 QByteArray ATVModGUI::serialize() const
75 {
76  return m_settings.serialize();
77 }
78 
79 bool ATVModGUI::deserialize(const QByteArray& data)
80 {
81  if(m_settings.deserialize(data))
82  {
84  applySettings(true); // will have true
85  return true;
86  }
87  else
88  {
91  applySettings(true); // will have true
92  return false;
93  }
94 }
95 
96 bool ATVModGUI::handleMessage(const Message& message)
97 {
99  {
101  m_videoLength = ((ATVMod::MsgReportVideoFileSourceStreamData&)message).getVideoLength();
102  m_frameCount = 0;
104  return true;
105  }
107  {
108  m_frameCount = ((ATVMod::MsgReportVideoFileSourceStreamTiming&)message).getFrameCount();
110  return true;
111  }
112  else if (ATVMod::MsgReportCameraData::match(message))
113  {
115  ui->cameraDeviceNumber->setText(tr("#%1").arg(rpt.getdeviceNumber()));
116  ui->camerFPS->setText(tr("%1 FPS").arg(rpt.getFPS(), 0, 'f', 2));
117  ui->cameraImageSize->setText(tr("%1x%2").arg(rpt.getWidth()).arg(rpt.getHeight()));
118  ui->cameraManualFPSText->setText(tr("%1 FPS").arg(rpt.getFPSManual(), 0, 'f', 1));
119  ui->cameraManualFPSEnable->setChecked(rpt.getFPSManualEnable());
120  ui->cameraManualFPS->setValue((int) rpt.getFPSManual()*10.0f);
121 
122  int status = rpt.getStatus();
123 
124  if (status == 1) // camera FPS scan is startng
125  {
126  m_camBusyFPSMessageBox = new QMessageBox();
127  m_camBusyFPSMessageBox->setText("Computing camera FPS. Please wait…");
128  m_camBusyFPSMessageBox->setStandardButtons(0);
129  m_camBusyFPSMessageBox->show();
130  }
131  else if (status == 2) // camera FPS scan is finished
132  {
134  {
135  m_camBusyFPSMessageBox->close();
136  delete m_camBusyFPSMessageBox;
137  }
138 
140  }
141 
142  return true;
143  }
145  {
146  int sampleRate = ((ATVMod::MsgReportEffectiveSampleRate&)message).getSampleRate();
147  uint32_t nbPointsPerLine = ((ATVMod::MsgReportEffectiveSampleRate&)message).gatNbPointsPerLine();
148  ui->channelSampleRateText->setText(tr("%1k").arg(sampleRate/1000.0f, 0, 'f', 2));
149  ui->nbPointsPerLineText->setText(tr("%1p").arg(nbPointsPerLine));
150  setRFFiltersSlidersRange(sampleRate);
151  return true;
152  }
153  else if (ATVMod::MsgConfigureATVMod::match(message))
154  {
156  m_settings = cfg.getSettings();
157  blockApplySettings(true);
158  displaySettings();
159  blockApplySettings(false);
160  return true;
161  }
163  {
165  ui->imageFileText->setText(cfg.getFileName());
166  return true;
167  }
169  {
171  ui->videoFileText->setText(cfg.getFileName());
172  return true;
173  }
174  else
175  {
176  return false;
177  }
178 }
179 
181 {
182  ui->deltaFrequency->setValue(m_channelMarker.getCenterFrequency());
184  applySettings();
185 }
186 
188 {
189  int scaleFactor = (int) std::log10(sampleRate/2);
190  m_rfSliderDivisor = std::pow(10.0, scaleFactor-1);
191 
192  if (sampleRate/m_rfSliderDivisor < 50) {
193  m_rfSliderDivisor /= 10;
194  }
195 
196  if ((ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationLSB) ||
197  (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationUSB) ||
198  (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationVestigialLSB) ||
199  (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationVestigialUSB))
200  {
201  ui->rfBW->setMaximum((sampleRate) / (2*m_rfSliderDivisor));
202  ui->rfOppBW->setMaximum((sampleRate) / (2*m_rfSliderDivisor));
203  }
204  else
205  {
206  ui->rfBW->setMaximum((sampleRate) / m_rfSliderDivisor);
207  ui->rfOppBW->setMaximum((sampleRate) / m_rfSliderDivisor);
208  }
209 
210  ui->rfBWText->setText(QString("%1k").arg((ui->rfBW->value()*m_rfSliderDivisor) / 1000.0, 0, 'f', 1));
211  ui->rfOppBWText->setText(QString("%1k").arg((ui->rfOppBW->value()*m_rfSliderDivisor) / 1000.0, 0, 'f', 1));
212 }
213 
215 {
216  switch(ui->nbLines->currentIndex())
217  {
218  case 0:
219  return 640;
220  break;
221  case 2:
222  return 525;
223  break;
224  case 3:
225  return 480;
226  break;
227  case 4:
228  return 405;
229  break;
230  case 5:
231  return 360;
232  break;
233  case 6:
234  return 343;
235  break;
236  case 7:
237  return 240;
238  break;
239  case 8:
240  return 180;
241  break;
242  case 9:
243  return 120;
244  break;
245  case 10:
246  return 90;
247  break;
248  case 11:
249  return 60;
250  break;
251  case 12:
252  return 32;
253  break;
254  case 1:
255  default:
256  return 625;
257  break;
258  }
259 }
260 
262 {
263  if (nbLines < 32) {
264  return 1;
265  } else if (nbLines < 60) {
266  return 12;
267  } else if (nbLines < 90) {
268  return 11;
269  } else if (nbLines < 120) {
270  return 10;
271  } else if (nbLines < 180) {
272  return 9;
273  } else if (nbLines < 240) {
274  return 8;
275  } else if (nbLines < 343) {
276  return 7;
277  } else if (nbLines < 360) {
278  return 6;
279  } else if (nbLines < 405) {
280  return 5;
281  } else if (nbLines < 480) {
282  return 4;
283  } else if (nbLines < 525) {
284  return 3;
285  } else if (nbLines < 625) {
286  return 2;
287  } else if (nbLines < 640) {
288  return 1;
289  } else {
290  return 0;
291  }
292 }
293 
295 {
296  switch(ui->fps->currentIndex())
297  {
298  case 0:
299  return 30;
300  break;
301  case 2:
302  return 20;
303  break;
304  case 3:
305  return 16;
306  break;
307  case 4:
308  return 12;
309  break;
310  case 5:
311  return 10;
312  break;
313  case 6:
314  return 8;
315  break;
316  case 7:
317  return 5;
318  break;
319  case 8:
320  return 2;
321  break;
322  case 9:
323  return 1;
324  break;
325  case 1:
326  default:
327  return 25;
328  break;
329  }
330 }
331 
333 {
334  if (fps < 1) {
335  return 1;
336  } else if (fps < 2) {
337  return 9;
338  } else if (fps < 5) {
339  return 8;
340  } else if (fps < 8) {
341  return 7;
342  } else if (fps < 10) {
343  return 6;
344  } else if (fps < 12) {
345  return 5;
346  } else if (fps < 16) {
347  return 4;
348  } else if (fps < 20) {
349  return 3;
350  } else if (fps < 25) {
351  return 2;
352  } else if (fps < 30) {
353  return 1;
354  } else {
355  return 0;
356  }
357 }
358 
360 {
361  Message* message;
362 
363  while ((message = getInputMessageQueue()->pop()) != 0)
364  {
365  if (handleMessage(*message))
366  {
367  delete message;
368  }
369  }
370 }
371 
373 {
376  applySettings();
377 }
378 
380 {
384  applySettings();
385 }
386 
388 {
389  ui->rfScalingText->setText(tr("%1").arg(value));
390  m_settings.m_rfScalingFactor = value * 327.68f;
391  applySettings();
392 }
393 
395 {
396  ui->fmExcursionText->setText(tr("%1").arg(value / 10.0, 0, 'f', 1));
397  m_settings.m_fmExcursion = value / 1000.0; // pro mill
398  applySettings();
399 }
400 
402 {
403  ui->rfBWText->setText(QString("%1k").arg((value*m_rfSliderDivisor) / 1000.0, 0, 'f', 1));
404  m_settings.m_rfBandwidth = value * m_rfSliderDivisor * 1.0f;
406  applySettings();
407 }
408 
410 {
411  ui->rfOppBWText->setText(QString("%1k").arg((value*m_rfSliderDivisor) / 1000.0, 0, 'f', 1));
412  m_settings.m_rfOppBandwidth = value * m_rfSliderDivisor * 1.0f;
414  applySettings();
415 }
416 
418 {
419  if (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationLSB)
420  {
423  }
424  else if (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationVestigialLSB)
425  {
429  }
430  else if (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationUSB)
431  {
434  }
435  else if (ui->modulation->currentIndex() == (int) ATVModSettings::ATVModulationVestigialUSB)
436  {
440  }
441  else
442  {
445  }
446 }
447 
449 {
450  (void) index;
452  applySettings();
453 }
454 
456 {
457  (void) index;
458  m_settings.m_fps = getFPS();
459  applySettings();
460 }
461 
462 
464 {
466  applySettings();
467 }
468 
470 {
471  ui->uniformLevelText->setText(QString("%1").arg(value));
472  m_settings.m_uniformLevel = value / 100.0f;
473  applySettings();
474 }
475 
477 {
478  m_settings.m_invertedVideo = checked;
479  applySettings();
480 }
481 
483 {
485  applySettings();
486 }
487 
489 {
490  m_settings.m_channelMute = checked;
491  applySettings();
492 }
493 
495 {
496  m_settings.m_forceDecimator = checked;
497  applySettings();
498 }
499 
501 {
502  (void) checked;
503  QString fileName = QFileDialog::getOpenFileName(this,
504  tr("Open image file"), ".", tr("Image Files (*.png *.jpg *.bmp *.gif *.tiff)"), 0, QFileDialog::DontUseNativeDialog);
505 
506  if (fileName != "")
507  {
508  m_imageFileName = fileName;
509  ui->imageFileText->setText(m_imageFileName);
511  }
512 }
513 
515 {
516  (void) checked;
517  QString fileName = QFileDialog::getOpenFileName(this,
518  tr("Open video file"), ".", tr("Video Files (*.avi *.mpg *.mp4 *.mov *.m4v *.mkv *.vob *.wmv)"), 0, QFileDialog::DontUseNativeDialog);
519 
520  if (fileName != "")
521  {
522  m_videoFileName = fileName;
523  ui->videoFileText->setText(m_videoFileName);
525  }
526 }
527 
529 {
530  m_settings.m_videoPlayLoop = checked;
531  applySettings();
532 }
533 
535 {
536  m_settings.m_videoPlay = checked;
537  ui->navTimeSlider->setEnabled(!checked);
538  m_enableNavTime = !checked;
539  applySettings();
540 }
541 
543 {
544  if (m_enableNavTime && ((value >= 0) && (value <= 100)))
545  {
547  m_atvMod->getInputMessageQueue()->push(message);
548  }
549 }
550 
552 {
553  m_settings.m_cameraPlay = checked;
554  applySettings();
555 }
556 
558 {
560  m_atvMod->getInputMessageQueue()->push(message);
561 }
562 
564 {
566  ui->camSelect->currentIndex(),
567  ui->cameraManualFPS->value() / 10.0f,
568  checked);
569  m_atvMod->getInputMessageQueue()->push(message);
570 }
571 
573 {
574  ui->cameraManualFPSText->setText(tr("%1 FPS").arg(value / 10.0f, 0, 'f', 1));
576  ui->camSelect->currentIndex(),
577  value / 10.0f,
578  ui->cameraManualFPSEnable->isChecked());
579  m_atvMod->getInputMessageQueue()->push(message);
580 }
581 
583 {
584  m_settings.m_showOverlayText = checked;
585  applySettings();
586 }
587 
588 void ATVModGUI::on_overlayText_textEdited(const QString& arg1)
589 {
590  (void) arg1;
591  m_settings.m_overlayText = arg1;
592  applySettings();
593 }
594 
596 {
597  qDebug() << "ATVModGUI::configureImageFileName: " << m_imageFileName.toStdString().c_str();
599  m_atvMod->getInputMessageQueue()->push(message);
600 }
601 
603 {
604  qDebug() << "ATVModGUI::configureVideoFileName: " << m_videoFileName.toStdString().c_str();
606  m_atvMod->getInputMessageQueue()->push(message);
607 }
608 
609 void ATVModGUI::onWidgetRolled(QWidget* widget, bool rollDown)
610 {
611  (void) widget;
612  (void) rollDown;
613 }
614 
615 void ATVModGUI::onMenuDialogCalled(const QPoint &p)
616 {
618  {
625 
626  dialog.move(p);
627  dialog.exec();
628 
637 
638  setWindowTitle(m_settings.m_title);
640 
641  applySettings();
642  }
643 
645 }
646 
647 ATVModGUI::ATVModGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent) :
648  RollupWidget(parent),
649  ui(new Ui::ATVModGUI),
650  m_pluginAPI(pluginAPI),
651  m_deviceUISet(deviceUISet),
652  m_channelMarker(this),
653  m_doApplySettings(true),
654  m_videoLength(0),
655  m_videoFrameRate(48000),
656  m_frameCount(0),
657  m_tickCount(0),
658  m_enableNavTime(false),
660  m_rfSliderDivisor(100000)
661 {
662  ui->setupUi(this);
663  setAttribute(Qt::WA_DeleteOnClose, true);
664  connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool)));
665  connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &)));
666 
667  m_atvMod = (ATVMod*) channelTx; //new ATVMod(m_deviceUISet->m_deviceSinkAPI);
669 
670  connect(&MainWindow::getInstance()->getMasterTimer(), SIGNAL(timeout()), this, SLOT(tick()));
671 
672  ui->deltaFrequencyLabel->setText(QString("%1f").arg(QChar(0x94, 0x03)));
673  ui->deltaFrequency->setColorMapper(ColorMapper(ColorMapper::GrayGold));
674  ui->deltaFrequency->setValueRange(false, 7, -9999999, 9999999);
675 
676  m_channelMarker.blockSignals(true);
680  m_channelMarker.setTitle("ATV Modulator");
682  m_channelMarker.blockSignals(false);
683  m_channelMarker.setVisible(true); // activate signal on the last setting only
684 
687 
691 
692  connect(&m_channelMarker, SIGNAL(changedByCursor()), this, SLOT(channelMarkerChangedByCursor()));
693 
694  resetToDefaults();
695 
696  connect(getInputMessageQueue(), SIGNAL(messageEnqueued()), this, SLOT(handleSourceMessages()));
697  connect(m_atvMod, SIGNAL(levelChanged(qreal, qreal, int)), ui->volumeMeter, SLOT(levelChanged(qreal, qreal, int)));
698 
699  std::vector<int> cameraNumbers;
700  m_atvMod->getCameraNumbers(cameraNumbers);
701 
702  for (std::vector<int>::iterator it = cameraNumbers.begin(); it != cameraNumbers.end(); ++it) {
703  ui->camSelect->addItem(tr("%1").arg(*it));
704  }
705 
706  QChar delta = QChar(0x94, 0x03);
707  ui->fmExcursionLabel->setText(delta);
708 
709  displaySettings();
710  applySettings(true);
711 }
712 
714 {
716  delete m_atvMod; // TODO: check this: when the GUI closes it has to delete the modulator
717  delete ui;
718 }
719 
721 {
722  m_doApplySettings = !block;
723 }
724 
725 void ATVModGUI::applySettings(bool force)
726 {
727  if (m_doApplySettings)
728  {
731  m_atvMod->getInputMessageQueue()->push(msgChan);
732 
735  }
736 }
737 
739 {
740  m_channelMarker.blockSignals(true);
744  m_channelMarker.blockSignals(false);
745  m_channelMarker.setColor(m_settings.m_rgbColor); // activate signal on the last setting only
746 
748  setWindowTitle(m_channelMarker.getTitle());
749 
750  blockApplySettings(true);
751 
752  ui->deltaFrequency->setValue(m_settings.m_inputFrequencyOffset);
753 
754  ui->modulation->setCurrentIndex((int) m_settings.m_atvModulation);
756 
757  ui->rfBW->setValue(roundf(m_settings.m_rfBandwidth / m_rfSliderDivisor));
758  ui->rfBWText->setText(QString("%1k").arg((ui->rfBW->value()*m_rfSliderDivisor) / 1000.0, 0, 'f', 1));
759 
760  ui->rfOppBW->setValue(roundf(m_settings.m_rfOppBandwidth / m_rfSliderDivisor));
761  ui->rfOppBWText->setText(QString("%1k").arg((ui->rfOppBW->value()*m_rfSliderDivisor) / 1000.0, 0, 'f', 1));
762 
763  ui->forceDecimator->setChecked(m_settings.m_forceDecimator);
764  ui->channelMute->setChecked(m_settings.m_channelMute);
765 
766  ui->fmExcursion->setValue(roundf(m_settings.m_fmExcursion * 1000.0));
767  ui->fmExcursionText->setText(tr("%1").arg(ui->fmExcursion->value() / 10.0, 0, 'f', 1));
768 
769  ui->rfScaling->setValue(roundf(m_settings.m_rfScalingFactor / 327.68f));
770  ui->rfScalingText->setText(tr("%1").arg(ui->rfScaling->value()));
771 
772  int validNbLinesIndex = getNbLinesIndex(m_settings.m_nbLines);
773  ui->nbLines->setCurrentIndex(validNbLinesIndex);
774  m_settings.m_nbLines = getNbLines(); // normalize
775  int validFPSIndex = getFPSIndex(m_settings.m_fps);
776  ui->fps->setCurrentIndex(validFPSIndex);
777  m_settings.m_fps = getFPS(); // normalize
778 
779  ui->standard->setCurrentIndex((int) m_settings.m_atvStd);
780  ui->inputSelect->setCurrentIndex((int) m_settings.m_atvModInput);
781 
782  ui->invertVideo->setChecked(m_settings.m_invertedVideo);
783 
784  ui->uniformLevel->setValue(roundf(m_settings.m_uniformLevel * 100.0));
785  ui->uniformLevelText->setText(QString("%1").arg(ui->uniformLevel->value()));
786 
787  ui->overlayText->setText(m_settings.m_overlayText);
788  ui->overlayTextShow->setChecked(m_settings.m_showOverlayText);
789 
790  ui->playCamera->setChecked(m_settings.m_cameraPlay);
791  ui->playVideo->setChecked(m_settings.m_videoPlay);
792  ui->playLoop->setChecked(m_settings.m_videoPlayLoop);
793 
794  blockApplySettings(false);
795 }
796 
798 {
800 }
801 
803 {
805 }
806 
808 {
809  double powDb = CalcDb::dbPower(m_atvMod->getMagSq());
810  m_channelPowerDbAvg(powDb);
811  ui->channelPower->setText(tr("%1 dB").arg(m_channelPowerDbAvg.asDouble(), 0, 'f', 1));
812 
813  if (((++m_tickCount & 0xf) == 0) && (ui->inputSelect->currentIndex() == (int) ATVModSettings::ATVModInputVideo))
814  {
816  m_atvMod->getInputMessageQueue()->push(message);
817  }
818 }
819 
821 {
822  QTime recordLength(0, 0, 0, 0);
823  recordLength = recordLength.addSecs(m_videoLength / m_videoFrameRate);
824  QString s_time = recordLength.toString("HH:mm:ss");
825  ui->recordLengthText->setText(s_time);
827 }
828 
830 {
831  int t_sec = 0;
832  int t_msec = 0;
833 
834  if (m_videoFrameRate > 0.0f)
835  {
836  float secs = m_frameCount / m_videoFrameRate;
837  t_sec = (int) secs;
838  t_msec = (int) ((secs - t_sec) * 1000.0f);
839  }
840 
841  QTime t(0, 0, 0, 0);
842  t = t.addSecs(t_sec);
843  t = t.addMSecs(t_msec);
844  QString s_timems = t.toString("HH:mm:ss.zzz");
845  QString s_time = t.toString("HH:mm:ss");
846  ui->relTimeText->setText(s_timems);
847 
848  if (!m_enableNavTime)
849  {
850  float posRatio = (t_sec * m_videoFrameRate) / m_videoLength;
851  ui->navTimeSlider->setValue((int) (posRatio * 100.0));
852  }
853 }
854 
QByteArray serialize() const
Definition: atvmodgui.cpp:74
void removeTxChannelInstance(PluginInstanceGUI *pluginGUI)
int getFPS()
Definition: atvmodgui.cpp:294
void on_deltaFrequency_changed(qint64 value)
Definition: atvmodgui.cpp:372
static MainWindow * getInstance()
Definition: mainwindow.h:73
int getEffectiveSampleRate() const
Definition: atvmod.h:399
const QString & getReverseAPIAddress() const
static const QString m_channelIdURI
Definition: atvmod.h:406
float m_rfScalingFactor
Scaling factor from +/-1 to +/-2^15.
static MsgConfigureVideoFileName * create(const QString &fileName)
Definition: atvmod.h:124
static MsgConfigureCameraIndex * create(int index)
Definition: atvmod.h:229
int getCenterFrequency() const
Definition: channelmarker.h:42
void on_nbLines_currentIndexChanged(int index)
Definition: atvmodgui.cpp:448
void registerTxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
Definition: deviceuiset.cpp:88
void enterEvent(QEvent *)
Definition: atvmodgui.cpp:802
void push(Message *message, bool emitSignal=true)
Push message onto queue.
ATVModulation m_atvModulation
RF modulation type.
void setChannelMarkerBandwidth()
Definition: atvmodgui.cpp:417
uint16_t m_reverseAPIDeviceIndex
void on_uniformLevel_valueChanged(int value)
Definition: atvmodgui.cpp:469
static double dbPower(double magsq, double floor=1e-12)
Definition: db.cpp:22
int m_nbLines
Number of lines per full frame.
void resetToDefaults()
Definition: atvmodgui.cpp:69
void onMenuDialogCalled(const QPoint &p)
Definition: atvmodgui.cpp:615
void on_fmExcursion_valueChanged(int value)
Definition: atvmodgui.cpp:394
virtual bool handleMessage(const Message &message)
Definition: atvmodgui.cpp:96
ChannelMarker m_channelMarker
Definition: atvmodgui.h:64
void configureImageFileName()
Definition: atvmodgui.cpp:595
void on_playVideo_toggled(bool checked)
Definition: atvmodgui.cpp:534
static MsgConfigureImageFileName * create(const QString &fileName)
Definition: atvmod.h:103
const ATVModSettings & getSettings() const
Definition: atvmod.h:57
QByteArray serialize() const
void on_standard_currentIndexChanged(int index)
Definition: atvmodgui.cpp:463
void on_rfScaling_valueChanged(int value)
Definition: atvmodgui.cpp:387
void on_modulation_currentIndexChanged(int index)
Definition: atvmodgui.cpp:379
quint32 m_videoLength
video file length in seconds
Definition: atvmodgui.h:73
static MsgConfigureVideoFileSourceStreamTiming * create()
Definition: atvmod.h:164
void on_navTimeSlider_valueChanged(int value)
Definition: atvmodgui.cpp:542
Ui::ATVModGUI * ui
Definition: atvmodgui.h:61
virtual ~ATVModGUI()
Definition: atvmodgui.cpp:713
quint32 m_rgbColor
void on_camSelect_currentIndexChanged(int index)
Definition: atvmodgui.cpp:557
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
void setOppositeBandwidth(int bandwidth)
bool m_doApplySettings
Definition: atvmodgui.h:66
void setReverseAPIChannelIndex(uint16_t channelIndex)
void channelMarkerChangedByCursor()
Definition: atvmodgui.cpp:180
void resetContextMenuType()
Definition: rollupwidget.h:50
virtual MessageQueue * getInputMessageQueue()
Definition: atvmodgui.h:54
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
Definition: deviceuiset.cpp:72
void on_imageFileDialog_clicked(bool checked)
Definition: atvmodgui.cpp:500
void updateWithStreamTime()
Definition: atvmodgui.cpp:829
void on_fps_currentIndexChanged(int index)
Definition: atvmodgui.cpp:455
void on_channelMute_toggled(bool checked)
Definition: atvmodgui.cpp:488
qint64 m_inputFrequencyOffset
offset from baseband center frequency
void handleSourceMessages()
Definition: atvmodgui.cpp:359
void on_overlayTextShow_toggled(bool checked)
Definition: atvmodgui.cpp:582
static ATVModGUI * create(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
Definition: atvmodgui.cpp:38
unsigned int uint32_t
Definition: rtptypes_win.h:46
ContextMenuType m_contextMenuType
Definition: rollupwidget.h:33
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
Definition: fixed.h:2401
QString m_overlayText
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
int m_rfSliderDivisor
Definition: atvmodgui.h:79
const QString & getFileName() const
Definition: atvmod.h:122
float getFPS() const
Definition: atvmod.h:278
bool m_channelMute
Mute channel baseband output.
int getFPSIndex(int fps)
Definition: atvmodgui.cpp:332
bool getFPSManualEnable() const
Definition: atvmod.h:280
bool m_forceDecimator
Forces decimator even when channel and source sample rates are equal.
void updateWithStreamData()
Definition: atvmodgui.cpp:820
int getNbLinesIndex(int nbLines)
Definition: atvmodgui.cpp:261
void on_rfBW_valueChanged(int value)
Definition: atvmodgui.cpp:401
float m_videoFrameRate
video file frame rate
Definition: atvmodgui.h:74
PluginAPI * m_pluginAPI
Definition: atvmodgui.h:62
void on_rfOppBW_valueChanged(int value)
Definition: atvmodgui.cpp:409
void setSourceOrSinkStream(bool sourceOrSinkStream)
Definition: channelmarker.h:75
LSB with vestigial USB.
Definition: channelmarker.h:21
void setTitleColor(const QColor &c)
void on_invertVideo_clicked(bool checked)
Definition: atvmodgui.cpp:476
void setHighlighted(bool highlighted)
void getCameraNumbers(std::vector< int > &numbers)
Definition: atvmod.cpp:990
int m_fps
Number of frames per second.
uint16_t m_reverseAPIChannelIndex
QString m_imageFileName
Definition: atvmodgui.h:71
USB with vestigial LSB.
Definition: channelmarker.h:20
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
Definition: deviceuiset.cpp:77
virtual void setMessageQueueToGUI(MessageQueue *queue)
int getNbLines()
Definition: atvmodgui.cpp:214
QString m_reverseAPIAddress
void on_playCamera_toggled(bool checked)
Definition: atvmodgui.cpp:551
const QString & getTitle() const
Definition: channelmarker.h:38
static bool match(const Message *message)
Definition: message.cpp:45
QMessageBox * m_camBusyFPSMessageBox
Definition: atvmodgui.h:78
void on_cameraManualFPS_valueChanged(int value)
Definition: atvmodgui.cpp:572
void on_overlayText_textEdited(const QString &arg1)
Definition: atvmodgui.cpp:588
float m_fmExcursion
FM excursion factor relative to full bandwidth.
bool m_showOverlayText
Show overlay text on image.
void displaySettings()
Definition: atvmodgui.cpp:738
bool m_invertedVideo
True if video signal is inverted before modulation.
static MsgConfigureCameraData * create(int index, float manualFPS, bool manualFPSEnable)
Definition: atvmod.h:252
DeviceUISet * m_deviceUISet
Definition: atvmodgui.h:63
void leaveEvent(QEvent *)
Definition: atvmodgui.cpp:797
void tick()
Definition: atvmodgui.cpp:807
ATVMod * m_atvMod
Definition: atvmodgui.h:68
ATVStd m_atvStd
Standard.
void on_cameraManualFPSEnable_toggled(bool checked)
Definition: atvmodgui.cpp:563
QString m_videoFileName
Definition: atvmodgui.h:72
static MsgConfigureATVMod * create(const ATVModSettings &settings, bool force)
Definition: atvmod.h:60
ATVModInput m_atvModInput
Input source type.
int getdeviceNumber() const
Definition: atvmod.h:277
void blockApplySettings(bool block)
Definition: atvmodgui.cpp:720
bool m_enableNavTime
Definition: atvmodgui.h:77
void setReverseAPIAddress(const QString &address)
ATVModGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget *parent=0)
Definition: atvmodgui.cpp:647
bool m_videoPlay
True to play video and false to pause.
static MsgConfigureVideoFileSourceSeek * create(int seekPercentage)
Definition: atvmod.h:145
void setColor(const QColor &color)
void applySettings(bool force=false)
Definition: atvmodgui.cpp:725
virtual void setCenterFrequency(qint64 centerFrequency)
Definition: atvmodgui.cpp:63
bool m_cameraPlay
True to play camera video and false to pause.
Real m_uniformLevel
Percentage between black and white for uniform screen display.
Definition: atvmod.h:49
std::size_t m_tickCount
Definition: atvmodgui.h:76
void onWidgetRolled(QWidget *widget, bool rollDown)
Definition: atvmodgui.cpp:609
void setVisible(bool visible)
QString getName() const
Definition: atvmodgui.cpp:54
void on_inputSelect_currentIndexChanged(int index)
Definition: atvmodgui.cpp:482
double getMagSq() const
Definition: atvmod.h:400
void setBandwidth(int bandwidth)
const QColor & getColor() const
Definition: channelmarker.h:64
bool deserialize(const QByteArray &data)
Definition: atvmodgui.cpp:79
void setTitle(const QString &title)
Real m_rfBandwidth
Bandwidth of modulated signal or direct sideband for SSB / vestigial SSB.
float getFPSManual() const
Definition: atvmod.h:279
void setName(const QString &name)
Definition: atvmodgui.cpp:49
int m_frameCount
Definition: atvmodgui.h:75
void setCenterFrequency(int centerFrequency)
void setSidebands(sidebands_t sidebands)
void on_videoFileDialog_clicked(bool checked)
Definition: atvmodgui.cpp:514
MovingAverageUtil< double, double, 20 > m_channelPowerDbAvg
Definition: atvmodgui.h:69
uint16_t m_reverseAPIPort
static MsgConfigureChannelizer * create(int centerFrequency)
Definition: atvmod.h:82
void configureVideoFileName()
Definition: atvmodgui.cpp:602
void setRFFiltersSlidersRange(int sampleRate)
Definition: atvmodgui.cpp:187
Real m_rfOppBandwidth
Bandwidth of opposite sideband for vestigial SSB.
virtual qint64 getCenterFrequency() const
Definition: atvmodgui.cpp:59
void widgetRolled(QWidget *widget, bool rollDown)
void on_playLoop_toggled(bool checked)
Definition: atvmodgui.cpp:528
void setUseReverseAPI(bool useReverseAPI)
virtual void destroy()
Definition: atvmodgui.cpp:44
const QString & getFileName() const
Definition: atvmod.h:101
ATVModSettings m_settings
Definition: atvmodgui.h:65
void setChannelMarker(Serializable *channelMarker)
bool deserialize(const QByteArray &data)
bool m_videoPlayLoop
Play video in a loop.
void on_forceDecimator_toggled(bool checked)
Definition: atvmodgui.cpp:494