18 #include <QDockWidget> 19 #include <QMainWindow> 20 #include <QFileDialog> 23 #include <QMessageBox> 35 #include "ui_atvmodgui.h" 116 ui->camerFPS->setText(tr(
"%1 FPS").
arg(rpt.
getFPS(), 0,
'f', 2));
118 ui->cameraManualFPSText->setText(tr(
"%1 FPS").
arg(rpt.
getFPSManual(), 0,
'f', 1));
131 else if (status == 2)
148 ui->channelSampleRateText->setText(tr(
"%1k").
arg(sampleRate/1000.0f, 0,
'f', 2));
149 ui->nbPointsPerLineText->setText(tr(
"%1p").
arg(nbPointsPerLine));
189 int scaleFactor = (int) std::log10(sampleRate/2);
216 switch(
ui->nbLines->currentIndex())
265 }
else if (nbLines < 60) {
267 }
else if (nbLines < 90) {
269 }
else if (nbLines < 120) {
271 }
else if (nbLines < 180) {
273 }
else if (nbLines < 240) {
275 }
else if (nbLines < 343) {
277 }
else if (nbLines < 360) {
279 }
else if (nbLines < 405) {
281 }
else if (nbLines < 480) {
283 }
else if (nbLines < 525) {
285 }
else if (nbLines < 625) {
287 }
else if (nbLines < 640) {
296 switch(
ui->fps->currentIndex())
336 }
else if (fps < 2) {
338 }
else if (fps < 5) {
340 }
else if (fps < 8) {
342 }
else if (fps < 10) {
344 }
else if (fps < 12) {
346 }
else if (fps < 16) {
348 }
else if (fps < 20) {
350 }
else if (fps < 25) {
352 }
else if (fps < 30) {
389 ui->rfScalingText->setText(tr(
"%1").
arg(value));
396 ui->fmExcursionText->setText(tr(
"%1").
arg(value / 10.0, 0,
'f', 1));
471 ui->uniformLevelText->setText(QString(
"%1").
arg(value));
503 QString fileName = QFileDialog::getOpenFileName(
this,
504 tr(
"Open image file"),
".", tr(
"Image Files (*.png *.jpg *.bmp *.gif *.tiff)"), 0, QFileDialog::DontUseNativeDialog);
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);
537 ui->navTimeSlider->setEnabled(!checked);
566 ui->camSelect->currentIndex(),
567 ui->cameraManualFPS->value() / 10.0f,
574 ui->cameraManualFPSText->setText(tr(
"%1 FPS").
arg(value / 10.0f, 0,
'f', 1));
576 ui->camSelect->currentIndex(),
578 ui->cameraManualFPSEnable->isChecked());
597 qDebug() <<
"ATVModGUI::configureImageFileName: " <<
m_imageFileName.toStdString().c_str();
604 qDebug() <<
"ATVModGUI::configureVideoFileName: " <<
m_videoFileName.toStdString().c_str();
663 setAttribute(Qt::WA_DeleteOnClose,
true);
665 connect(
this, SIGNAL(customContextMenuRequested(
const QPoint &)),
this, SLOT(
onMenuDialogCalled(
const QPoint &)));
672 ui->deltaFrequencyLabel->setText(QString(
"%1f").
arg(QChar(0x94, 0x03)));
674 ui->deltaFrequency->setValueRange(
false, 7, -9999999, 9999999);
697 connect(
m_atvMod, SIGNAL(levelChanged(qreal, qreal,
int)),
ui->volumeMeter, SLOT(levelChanged(qreal, qreal,
int)));
699 std::vector<int> cameraNumbers;
702 for (std::vector<int>::iterator it = cameraNumbers.begin(); it != cameraNumbers.end(); ++it) {
703 ui->camSelect->addItem(tr(
"%1").
arg(*it));
706 QChar delta = QChar(0x94, 0x03);
707 ui->fmExcursionLabel->setText(delta);
767 ui->fmExcursionText->setText(tr(
"%1").
arg(
ui->fmExcursion->value() / 10.0, 0,
'f', 1));
770 ui->rfScalingText->setText(tr(
"%1").
arg(
ui->rfScaling->value()));
773 ui->nbLines->setCurrentIndex(validNbLinesIndex);
776 ui->fps->setCurrentIndex(validFPSIndex);
785 ui->uniformLevelText->setText(QString(
"%1").
arg(
ui->uniformLevel->value()));
811 ui->channelPower->setText(tr(
"%1 dB").
arg(m_channelPowerDbAvg.asDouble(), 0,
'f', 1));
822 QTime recordLength(0, 0, 0, 0);
824 QString s_time = recordLength.toString(
"HH:mm:ss");
825 ui->recordLengthText->setText(s_time);
838 t_msec = (int) ((secs - t_sec) * 1000.0f);
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);
851 ui->navTimeSlider->setValue((
int) (posRatio * 100.0));
QByteArray serialize() const
void removeTxChannelInstance(PluginInstanceGUI *pluginGUI)
void on_deltaFrequency_changed(qint64 value)
static MainWindow * getInstance()
int getEffectiveSampleRate() const
const QString & getReverseAPIAddress() const
static const QString m_channelIdURI
float m_rfScalingFactor
Scaling factor from +/-1 to +/-2^15.
int getCenterFrequency() const
void on_nbLines_currentIndexChanged(int index)
void registerTxChannelInstance(const QString &channelName, PluginInstanceGUI *pluginGUI)
void enterEvent(QEvent *)
void push(Message *message, bool emitSignal=true)
Push message onto queue.
ATVModulation m_atvModulation
RF modulation type.
void setChannelMarkerBandwidth()
uint16_t m_reverseAPIDeviceIndex
void on_uniformLevel_valueChanged(int value)
static double dbPower(double magsq, double floor=1e-12)
int m_nbLines
Number of lines per full frame.
void onMenuDialogCalled(const QPoint &p)
void on_fmExcursion_valueChanged(int value)
virtual bool handleMessage(const Message &message)
ChannelMarker m_channelMarker
void configureImageFileName()
void on_playVideo_toggled(bool checked)
QByteArray serialize() const
void on_standard_currentIndexChanged(int index)
void on_rfScaling_valueChanged(int value)
void on_modulation_currentIndexChanged(int index)
quint32 m_videoLength
video file length in seconds
void on_navTimeSlider_valueChanged(int value)
void on_camSelect_currentIndexChanged(int index)
MessageQueue * getInputMessageQueue()
Get the queue for asynchronous inbound communication.
void setOppositeBandwidth(int bandwidth)
void setReverseAPIChannelIndex(uint16_t channelIndex)
uint16_t getReverseAPIPort() const
void channelMarkerChangedByCursor()
virtual MessageQueue * getInputMessageQueue()
void addChannelMarker(ChannelMarker *channelMarker)
Add channel marker to spectrum.
void on_imageFileDialog_clicked(bool checked)
void updateWithStreamTime()
void on_fps_currentIndexChanged(int index)
void on_channelMute_toggled(bool checked)
qint64 m_inputFrequencyOffset
offset from baseband center frequency
void handleSourceMessages()
void on_overlayTextShow_toggled(bool checked)
static ATVModGUI * create(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx)
Fixed< IntType, IntBits > arg(const std::complex< Fixed< IntType, IntBits > > &val)
void setReverseAPIDeviceIndex(uint16_t deviceIndex)
uint16_t getReverseAPIDeviceIndex() const
bool m_channelMute
Mute channel baseband output.
bool getFPSManualEnable() const
bool m_forceDecimator
Forces decimator even when channel and source sample rates are equal.
void updateWithStreamData()
int getNbLinesIndex(int nbLines)
void on_rfBW_valueChanged(int value)
float m_videoFrameRate
video file frame rate
void on_rfOppBW_valueChanged(int value)
void setSourceOrSinkStream(bool sourceOrSinkStream)
void on_invertVideo_clicked(bool checked)
void setHighlighted(bool highlighted)
void getCameraNumbers(std::vector< int > &numbers)
int m_fps
Number of frames per second.
uint16_t m_reverseAPIChannelIndex
void addRollupWidget(QWidget *widget)
Add rollup widget to channel window.
virtual void setMessageQueueToGUI(MessageQueue *queue)
QString m_reverseAPIAddress
void on_playCamera_toggled(bool checked)
const QString & getTitle() const
bool useReverseAPI() const
static bool match(const Message *message)
QMessageBox * m_camBusyFPSMessageBox
void on_cameraManualFPS_valueChanged(int value)
void on_overlayText_textEdited(const QString &arg1)
float m_fmExcursion
FM excursion factor relative to full bandwidth.
bool m_showOverlayText
Show overlay text on image.
bool m_invertedVideo
True if video signal is inverted before modulation.
DeviceUISet * m_deviceUISet
void leaveEvent(QEvent *)
void on_cameraManualFPSEnable_toggled(bool checked)
ATVModInput m_atvModInput
Input source type.
int getdeviceNumber() const
void blockApplySettings(bool block)
void setReverseAPIAddress(const QString &address)
ATVModGUI(PluginAPI *pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget *parent=0)
bool m_videoPlay
True to play video and false to pause.
void setColor(const QColor &color)
void applySettings(bool force=false)
virtual void setCenterFrequency(qint64 centerFrequency)
bool m_cameraPlay
True to play camera video and false to pause.
Real m_uniformLevel
Percentage between black and white for uniform screen display.
void onWidgetRolled(QWidget *widget, bool rollDown)
void setVisible(bool visible)
void setReverseAPIPort(uint16_t port)
void on_inputSelect_currentIndexChanged(int index)
uint16_t getReverseAPIChannelIndex() const
void setBandwidth(int bandwidth)
const QColor & getColor() const
bool deserialize(const QByteArray &data)
void setTitle(const QString &title)
Real m_rfBandwidth
Bandwidth of modulated signal or direct sideband for SSB / vestigial SSB.
float getFPSManual() const
void setName(const QString &name)
void setCenterFrequency(int centerFrequency)
void setSidebands(sidebands_t sidebands)
void on_videoFileDialog_clicked(bool checked)
MovingAverageUtil< double, double, 20 > m_channelPowerDbAvg
uint16_t m_reverseAPIPort
void configureVideoFileName()
void setRFFiltersSlidersRange(int sampleRate)
Real m_rfOppBandwidth
Bandwidth of opposite sideband for vestigial SSB.
virtual qint64 getCenterFrequency() const
void on_playLoop_toggled(bool checked)
void setUseReverseAPI(bool useReverseAPI)
ATVModSettings m_settings
void setChannelMarker(Serializable *channelMarker)
bool deserialize(const QByteArray &data)
bool m_videoPlayLoop
Play video in a loop.
void on_forceDecimator_toggled(bool checked)