Ripped out the fastgraph as it was confusing in the code
This commit is contained in:
parent
3841e1901f
commit
4c386248da
@ -227,8 +227,6 @@ set (wsjtx_CXXSRCS
|
||||
signalmeter.cpp
|
||||
plotter.cpp
|
||||
widegraph.cpp
|
||||
fastgraph.cpp
|
||||
fastplot.cpp
|
||||
about.cpp
|
||||
astro.cpp
|
||||
messageaveraging.cpp
|
||||
@ -526,7 +524,6 @@ set (wsjtx_UISRCS
|
||||
messagewindow.ui
|
||||
about.ui
|
||||
astro.ui
|
||||
fastgraph.ui
|
||||
messageaveraging.ui
|
||||
widegraph.ui
|
||||
logqso.ui
|
||||
|
125
fastgraph.cpp
125
fastgraph.cpp
@ -1,125 +0,0 @@
|
||||
#include "fastgraph.h"
|
||||
|
||||
#include "commons.h"
|
||||
#include <QSettings>
|
||||
#include <QApplication>
|
||||
#include "fastplot.h"
|
||||
#include "SettingsGroup.hpp"
|
||||
|
||||
#include "ui_fastgraph.h"
|
||||
#include "moc_fastgraph.cpp"
|
||||
|
||||
#define NSMAX2 1366
|
||||
|
||||
FastGraph::FastGraph(QSettings * settings, QWidget *parent) :
|
||||
QDialog {parent, Qt::Window | Qt::WindowTitleHint |
|
||||
Qt::WindowCloseButtonHint |
|
||||
Qt::WindowMinimizeButtonHint},
|
||||
m_settings {settings},
|
||||
m_ave {40},
|
||||
ui {new Ui::FastGraph}
|
||||
{
|
||||
ui->setupUi(this);
|
||||
setWindowTitle (QApplication::applicationName () + " - " + tr ("Fast Graph"));
|
||||
installEventFilter(parent); //Installing the filter
|
||||
ui->fastPlot->setCursor(Qt::CrossCursor);
|
||||
|
||||
//Restore user's settings
|
||||
SettingsGroup g {m_settings, "FastGraph"};
|
||||
restoreGeometry (m_settings->value ("geometry", saveGeometry ()).toByteArray ());
|
||||
ui->fastPlot->setPlotZero(m_settings->value("PlotZero", 0).toInt());
|
||||
ui->fastPlot->setPlotGain(m_settings->value("PlotGain", 0).toInt());
|
||||
ui->zeroSlider->setValue(ui->fastPlot->m_plotZero);
|
||||
ui->gainSlider->setValue(ui->fastPlot->m_plotGain);
|
||||
ui->fastPlot->setGreenZero(m_settings->value("GreenZero", 0).toInt());
|
||||
ui->greenZeroSlider->setValue(ui->fastPlot->m_greenZero);
|
||||
// ui->controls_widget->setVisible (!m_settings->value("HideControls", false).toBool ());
|
||||
ui->controls_widget->setVisible(true);
|
||||
connect (ui->fastPlot, &FPlotter::fastPick, this, &FastGraph::fastPick);
|
||||
}
|
||||
|
||||
void FastGraph::closeEvent (QCloseEvent * e)
|
||||
{
|
||||
saveSettings ();
|
||||
QDialog::closeEvent (e);
|
||||
}
|
||||
|
||||
FastGraph::~FastGraph ()
|
||||
{
|
||||
}
|
||||
|
||||
void FastGraph::saveSettings()
|
||||
{
|
||||
//Save user's settings
|
||||
SettingsGroup g {m_settings, "FastGraph"};
|
||||
m_settings->setValue ("geometry", saveGeometry ());
|
||||
m_settings->setValue("PlotZero",ui->fastPlot->m_plotZero);
|
||||
m_settings->setValue("PlotGain",ui->fastPlot->m_plotGain);
|
||||
m_settings->setValue("GreenZero",ui->fastPlot->m_greenZero);
|
||||
m_settings->setValue("GreenGain",ui->fastPlot->m_greenGain);
|
||||
// m_settings->setValue ("HideControls", ui->controls_widget->isHidden ());
|
||||
}
|
||||
|
||||
void FastGraph::plotSpec(bool diskData, int UTCdisk)
|
||||
{
|
||||
ui->fastPlot->m_diskData=diskData;
|
||||
ui->fastPlot->m_UTCdisk=UTCdisk;
|
||||
ui->fastPlot->draw();
|
||||
}
|
||||
|
||||
void FastGraph::on_gainSlider_valueChanged(int value)
|
||||
{
|
||||
ui->fastPlot->setPlotGain(value);
|
||||
ui->fastPlot->draw();
|
||||
}
|
||||
|
||||
void FastGraph::on_zeroSlider_valueChanged(int value)
|
||||
{
|
||||
ui->fastPlot->setPlotZero(value);
|
||||
ui->fastPlot->draw();
|
||||
}
|
||||
|
||||
void FastGraph::on_greenZeroSlider_valueChanged(int value)
|
||||
{
|
||||
ui->fastPlot->setGreenZero(value);
|
||||
ui->fastPlot->draw();
|
||||
}
|
||||
|
||||
void FastGraph::setTRPeriod(int n)
|
||||
{
|
||||
m_TRperiod=n;
|
||||
ui->fastPlot->setTRperiod(m_TRperiod);
|
||||
}
|
||||
|
||||
void FastGraph::on_pbAutoLevel_clicked()
|
||||
{
|
||||
float sum=0.0;
|
||||
for(int i=0; i<=fast_jh; i++) {
|
||||
sum += fast_green[i];
|
||||
}
|
||||
m_ave=sum/fast_jh;
|
||||
ui->gainSlider->setValue(127-int(2.2*m_ave));
|
||||
ui->zeroSlider->setValue(int(m_ave)+20);
|
||||
ui->greenZeroSlider->setValue(160-int(3.3*m_ave));
|
||||
}
|
||||
|
||||
void FastGraph::setMode(QString mode) //setMode
|
||||
{
|
||||
ui->fastPlot->setMode(mode);
|
||||
}
|
||||
|
||||
void FastGraph::keyPressEvent(QKeyEvent *e)
|
||||
{
|
||||
switch(e->key())
|
||||
{
|
||||
/*
|
||||
case Qt::Key_M:
|
||||
if(e->modifiers() & Qt::ControlModifier) {
|
||||
ui->controls_widget->setVisible (!ui->controls_widget->isVisible ());
|
||||
}
|
||||
break;
|
||||
*/
|
||||
default:
|
||||
QDialog::keyPressEvent (e);
|
||||
}
|
||||
}
|
50
fastgraph.h
50
fastgraph.h
@ -1,50 +0,0 @@
|
||||
#ifndef FASTGRAPH_H
|
||||
#define FASTGRAPH_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QScopedPointer>
|
||||
|
||||
namespace Ui {
|
||||
class FastGraph;
|
||||
}
|
||||
|
||||
class QSettings;
|
||||
|
||||
class FastGraph : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit FastGraph(QSettings *, QWidget *parent = 0);
|
||||
~FastGraph ();
|
||||
|
||||
void plotSpec(bool diskData, int UTCdisk);
|
||||
void saveSettings();
|
||||
void setTRPeriod(int n);
|
||||
void setMode(QString mode);
|
||||
|
||||
signals:
|
||||
void fastPick(int x0, int x1, int y);
|
||||
|
||||
private slots:
|
||||
void on_gainSlider_valueChanged(int value);
|
||||
void on_zeroSlider_valueChanged(int value);
|
||||
void on_greenZeroSlider_valueChanged(int value);
|
||||
void on_pbAutoLevel_clicked();
|
||||
|
||||
protected:
|
||||
void closeEvent (QCloseEvent *) override;
|
||||
void keyPressEvent( QKeyEvent *e ) override;
|
||||
|
||||
private:
|
||||
QSettings * m_settings;
|
||||
float m_ave;
|
||||
qint32 m_TRperiod;
|
||||
|
||||
QScopedPointer<Ui::FastGraph> ui;
|
||||
};
|
||||
|
||||
extern float fast_green[703];
|
||||
extern int fast_jh;
|
||||
|
||||
#endif // FASTGRAPH_H
|
238
fastgraph.ui
238
fastgraph.ui
@ -1,238 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>FastGraph</class>
|
||||
<widget class="QDialog" name="FastGraph">
|
||||
<property name="windowTitle">
|
||||
<string>Fast Graph</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="spacing">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetFixedSize</enum>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="FPlotter" name="fastPlot">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Expanding">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>703</width>
|
||||
<height>220</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>703</width>
|
||||
<height>220</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Sunken</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>1</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QWidget" name="controls_widget" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>2</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>99</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="gainSlider">
|
||||
<property name="toolTip">
|
||||
<string>Waterfall gain</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-60</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>140</number>
|
||||
</property>
|
||||
<property name="pageStep">
|
||||
<number>40</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_7">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="zeroSlider">
|
||||
<property name="toolTip">
|
||||
<string>Waterfall zero</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-60</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>120</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>60</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSlider" name="greenZeroSlider">
|
||||
<property name="toolTip">
|
||||
<string>Spectrum zero</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-100</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>160</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>30</number>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_3">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Preferred</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pbAutoLevel">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Set reasonable levels for gain and zero sliders.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Auto Level</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>99</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>FPlotter</class>
|
||||
<extends>QFrame</extends>
|
||||
<header>fastplot.h</header>
|
||||
<container>1</container>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
@ -63,7 +63,7 @@ SOURCES += \
|
||||
getfile.cpp soundout.cpp soundin.cpp meterwidget.cpp signalmeter.cpp \
|
||||
WFPalette.cpp plotter.cpp widegraph.cpp about.cpp WsprTxScheduler.cpp mainwindow.cpp \
|
||||
main.cpp decodedtext.cpp wsprnet.cpp messageaveraging.cpp \
|
||||
fastgraph.cpp fastplot.cpp Modes.cpp \
|
||||
Modes.cpp \
|
||||
WSPRBandHopping.cpp MessageAggregator.cpp qt_helpers.cpp\
|
||||
MultiSettings.cpp PhaseEqualizationDialog.cpp IARURegions.cpp MessageBox.cpp \
|
||||
EqualizationToolsDialog.cpp \
|
||||
@ -103,7 +103,7 @@ HEADERS += qt_helpers.hpp \
|
||||
EmulateSplitTransceiver.hpp DXLabSuiteCommanderTransceiver.hpp HamlibTransceiver.hpp \
|
||||
Configuration.hpp wsprnet.h signalmeter.h meterwidget.h \
|
||||
logbook/logbook.h logbook/countrydat.h logbook/countriesworked.h logbook/adif.h \
|
||||
messageaveraging.h fastgraph.h fastplot.h Modes.hpp WSPRBandHopping.hpp \
|
||||
messageaveraging.h Modes.hpp WSPRBandHopping.hpp \
|
||||
WsprTxScheduler.h MultiSettings.hpp PhaseEqualizationDialog.hpp \
|
||||
IARURegions.hpp MessageBox.hpp EqualizationToolsDialog.hpp \
|
||||
qorderedmap.h \
|
||||
@ -141,7 +141,6 @@ HEADERS += OmniRigTransceiver.hpp
|
||||
|
||||
FORMS += mainwindow.ui about.ui Configuration.ui widegraph.ui astro.ui \
|
||||
logqso.ui wf_palette_design_dialog.ui messageaveraging.ui \
|
||||
fastgraph.ui \
|
||||
messagereplydialog.ui \
|
||||
messagewindow.ui
|
||||
|
||||
|
150
mainwindow.cpp
150
mainwindow.cpp
@ -41,8 +41,6 @@
|
||||
#include "Modulator.hpp"
|
||||
#include "Detector.hpp"
|
||||
#include "plotter.h"
|
||||
#include "fastplot.h"
|
||||
#include "fastgraph.h"
|
||||
#include "about.h"
|
||||
#include "messageaveraging.h"
|
||||
#include "widegraph.h"
|
||||
@ -282,7 +280,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
m_rigErrorMessageBox {MessageBox::Critical, tr ("Rig Control Error")
|
||||
, MessageBox::Cancel | MessageBox::Ok | MessageBox::Retry},
|
||||
m_wideGraph (new WideGraph(m_settings)),
|
||||
m_fastGraph (new FastGraph(m_settings)),
|
||||
// no parent so that it has a taskbar icon
|
||||
m_logDlg (new LogQSO (program_title (), m_settings, &m_config, nullptr)),
|
||||
m_lastDialFreq {0},
|
||||
@ -349,7 +346,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
m_rxDone {false},
|
||||
m_bSimplex {false},
|
||||
m_bTransmittedEcho {false},
|
||||
m_bFastDecodeCalled {false},
|
||||
m_bDoubleClickAfterCQnnn {false},
|
||||
m_bRefSpec {false},
|
||||
m_bClearRefSpec {false},
|
||||
@ -536,10 +532,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
connect(m_wideGraph.data (), SIGNAL(f11f12(int)),this,SLOT(bumpFqso(int)));
|
||||
connect(m_wideGraph.data (), SIGNAL(setXIT2(int)),this,SLOT(setXIT(int)));
|
||||
|
||||
connect (m_fastGraph.data (), &FastGraph::fastPick, this, &MainWindow::fastPick);
|
||||
|
||||
connect (this, &MainWindow::finished, m_wideGraph.data (), &WideGraph::close);
|
||||
connect (this, &MainWindow::finished, m_fastGraph.data (), &FastGraph::close);
|
||||
|
||||
// setup the log QSO dialog
|
||||
connect (m_logDlg.data (), &LogQSO::acceptQSO, this, &MainWindow::acceptQSO);
|
||||
@ -950,8 +943,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
on_actionWide_Waterfall_triggered();
|
||||
ui->cbShMsgs->setChecked(m_bShMsgs);
|
||||
ui->cbSWL->setChecked(m_bSWL);
|
||||
if(m_bFast9) m_bFastMode=true;
|
||||
ui->cbFast9->setChecked(m_bFast9 or m_bFastMode);
|
||||
|
||||
if(true || m_mode=="FT8") on_actionJS8_triggered();
|
||||
|
||||
@ -978,7 +969,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
|
||||
m_UTCdisk=-1;
|
||||
m_fCPUmskrtd=0.0;
|
||||
m_bFastDone=false;
|
||||
m_bAltV=false;
|
||||
m_bNoMoreFiles=false;
|
||||
m_bVHFwarned=false;
|
||||
@ -1004,7 +994,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||
|
||||
statusChanged();
|
||||
|
||||
m_fastGraph->setMode(m_mode);
|
||||
m_wideGraph->setMode(m_mode);
|
||||
m_wideGraph->setModeTx(m_modeTx);
|
||||
|
||||
@ -2207,8 +2196,6 @@ void MainWindow::writeSettings()
|
||||
m_settings->setValue("UploadSpots",m_uploadSpots);
|
||||
m_settings->setValue ("BandHopping", ui->band_hopping_group_box->isChecked ());
|
||||
m_settings->setValue ("TRPeriod", ui->sbTR->value ());
|
||||
m_settings->setValue("FastMode",m_bFastMode);
|
||||
m_settings->setValue("Fast9",m_bFast9);
|
||||
m_settings->setValue ("CQTxfreq", ui->sbCQTxFreq->value ());
|
||||
m_settings->setValue("pwrBandTxMemory",m_pwrBandTxMemory);
|
||||
m_settings->setValue("pwrBandTuneMemory",m_pwrBandTuneMemory);
|
||||
@ -2357,8 +2344,6 @@ void MainWindow::readSettings()
|
||||
ui->cbVHFcontest->setChecked (m_settings->value ("VHFcontest", false).toBool());
|
||||
m_bShMsgs=m_settings->value("ShMsgs",false).toBool();
|
||||
m_bSWL=m_settings->value("SWL",false).toBool();
|
||||
m_bFast9=m_settings->value("Fast9",false).toBool();
|
||||
m_bFastMode=m_settings->value("FastMode",false).toBool();
|
||||
ui->sbTR->setValue (m_settings->value ("TRPeriod", 30).toInt());
|
||||
m_lastMonitoredFrequency = m_settings->value ("DialFreq",
|
||||
QVariant::fromValue<Frequency> (default_frequency)).value<Frequency> ();
|
||||
@ -2542,7 +2527,6 @@ void MainWindow::dataSink(qint64 frames)
|
||||
dec_data.params.nfb=m_wideGraph->Fmax();
|
||||
|
||||
int nsps=m_nsps;
|
||||
if(m_bFastMode) nsps=6912;
|
||||
int nsmo=m_wideGraph->smoothYellow()-1;
|
||||
symspec_(&dec_data,&k,&trmin,&nsps,&m_inGain,&nsmo,&m_px,s,&m_df3,&m_ihsym,&m_npts8,&m_pxmax);
|
||||
|
||||
@ -2706,11 +2690,6 @@ QString MainWindow::save_wave_file (QString const& name, short const * data, int
|
||||
return QString {};
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------- fastSink()
|
||||
void MainWindow::fastSink(qint64 frames)
|
||||
{
|
||||
}
|
||||
|
||||
void MainWindow::showSoundInError(const QString& errorMsg)
|
||||
{
|
||||
if (m_splash && m_splash->isVisible ()) m_splash->hide ();
|
||||
@ -3065,7 +3044,9 @@ void MainWindow::openSettings(int tab){
|
||||
if(b) VHF_features_enabled(b);
|
||||
|
||||
m_config.transceiver_online ();
|
||||
if(!m_bFastMode) setXIT (ui->TxFreqSpinBox->value ());
|
||||
|
||||
setXIT (ui->TxFreqSpinBox->value ());
|
||||
|
||||
if(m_config.single_decode() or m_mode=="JT4") {
|
||||
ui->label_6->setText("Single-Period Decodes");
|
||||
ui->label_7->setText("Average Decodes");
|
||||
@ -3562,11 +3543,6 @@ void MainWindow::on_actionWide_Waterfall_triggered() //Display Waterfalls
|
||||
m_wideGraph->show();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionFast_Graph_triggered()
|
||||
{
|
||||
m_fastGraph->show();
|
||||
}
|
||||
|
||||
void MainWindow::on_actionSolve_FreqCal_triggered()
|
||||
{
|
||||
QString dpath{QDir::toNativeSeparators(m_config.writeable_data_dir().absolutePath()+"/")};
|
||||
@ -3950,9 +3926,6 @@ void MainWindow::decode(int submode, int period)
|
||||
m_msec0=DriftingDateTime::currentMSecsSinceEpoch();
|
||||
if(!m_dataAvailable or m_TRperiod==0) return;
|
||||
ui->DecodeButton->setChecked (true);
|
||||
if(!dec_data.params.nagain && m_diskData && !m_bFastMode && m_mode!="FT8") {
|
||||
dec_data.params.nutc=dec_data.params.nutc/100;
|
||||
}
|
||||
if(dec_data.params.nagain==0 && dec_data.params.newdat==1 && (!m_diskData)) {
|
||||
qint64 ms = DriftingDateTime::currentMSecsSinceEpoch() % 86400000;
|
||||
int imin=ms/60000;
|
||||
@ -3960,7 +3933,7 @@ void MainWindow::decode(int submode, int period)
|
||||
imin=imin % 60;
|
||||
if(m_TRperiod>=60) imin=imin - (imin % (m_TRperiod/60));
|
||||
dec_data.params.nutc=100*ihr + imin;
|
||||
if(m_mode=="ISCAT" or m_mode=="MSK144" or m_bFast9 or m_mode=="FT8") {
|
||||
if(m_mode=="FT8") {
|
||||
QDateTime t=DriftingDateTime::currentDateTimeUtc().addSecs(2-m_TRperiod);
|
||||
ihr=t.toString("hh").toInt();
|
||||
imin=t.toString("mm").toInt();
|
||||
@ -4823,7 +4796,7 @@ void MainWindow::guiUpdate()
|
||||
|
||||
if(m_mode=="FT8") icw[0]=0; //No CW ID in FT8 mode
|
||||
|
||||
if((icw[0]>0) and (!m_bFast9)) tx2 += icw[0]*2560.0/48000.0; //Full length including CW ID
|
||||
if((icw[0]>0)) tx2 += icw[0]*2560.0/48000.0; //Full length including CW ID
|
||||
if(tx2>m_TRperiod) tx2=m_TRperiod;
|
||||
|
||||
qint64 ms = DriftingDateTime::currentMSecsSinceEpoch() % 86400000;
|
||||
@ -5052,10 +5025,6 @@ void MainWindow::guiUpdate()
|
||||
}
|
||||
if(m_restart) {
|
||||
write_transmit_entry ("ALL.TXT");
|
||||
if (m_config.TX_messages ()) {
|
||||
ui->decodedTextBrowser2->displayTransmittedText(m_currentMessage,m_modeTx,
|
||||
ui->TxFreqSpinBox->value(),m_config.color_rx_background(),m_bFastMode);
|
||||
}
|
||||
}
|
||||
|
||||
auto t2 = DriftingDateTime::currentDateTimeUtc ().toString ("hhmm");
|
||||
@ -6854,7 +6823,6 @@ void MainWindow::displayWidgets(qint64 n)
|
||||
ui->cbCQTx->setEnabled (b && (!is_compound || shortList (m_config.my_callsign ())));
|
||||
}
|
||||
if(i==7) ui->cbShMsgs->setVisible(b);
|
||||
if(i==8) ui->cbFast9->setVisible(b);
|
||||
if(i==9) ui->cbAutoSeq->setVisible(b);
|
||||
if(i==10) ui->cbTx6->setVisible(b);
|
||||
if(i==11) ui->pbTxMode->setVisible(b);
|
||||
@ -6996,8 +6964,6 @@ void MainWindow::on_actionJS8_triggered()
|
||||
|
||||
m_wideGraph->setSubMode(m_nSubMode);
|
||||
bool bVHF=m_config.enable_VHF_features();
|
||||
m_bFast9=false;
|
||||
m_bFastMode=false;
|
||||
WSPR_config(false);
|
||||
switch_mode (Modes::JS8);
|
||||
m_modeTx="FT8";
|
||||
@ -7025,7 +6991,6 @@ void MainWindow::on_actionJS8_triggered()
|
||||
else if(m_nSubMode == Varicode::JS8CallUltra){
|
||||
m_TRperiod = JS8D_TX_SECONDS;
|
||||
}
|
||||
m_fastGraph->hide();
|
||||
m_wideGraph->show();
|
||||
ui->decodedTextLabel2->setText(" UTC dB DT Freq Message");
|
||||
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
|
||||
@ -7064,7 +7029,6 @@ void MainWindow::on_actionJS8_triggered()
|
||||
|
||||
void MainWindow::switch_mode (Mode mode)
|
||||
{
|
||||
m_fastGraph->setMode(m_mode);
|
||||
m_config.frequencies ()->filter (m_config.region (), mode);
|
||||
|
||||
#if 0
|
||||
@ -7128,20 +7092,6 @@ void MainWindow::WSPR_config(bool b)
|
||||
enable_DXCC_entity (m_config.DXCC ()); // sets text window proportions and (re)inits the logbook
|
||||
}
|
||||
|
||||
void MainWindow::fast_config(bool b)
|
||||
{
|
||||
m_bFastMode=b;
|
||||
ui->TxFreqSpinBox->setEnabled(!b);
|
||||
ui->sbTR->setVisible(b);
|
||||
if(b and (m_bFast9 or m_mode=="MSK144" or m_mode=="ISCAT")) {
|
||||
m_wideGraph->hide();
|
||||
m_fastGraph->show();
|
||||
} else {
|
||||
m_wideGraph->show();
|
||||
m_fastGraph->hide();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_TxFreqSpinBox_valueChanged(int n)
|
||||
{
|
||||
m_wideGraph->setTxFreq(n);
|
||||
@ -9221,7 +9171,7 @@ void MainWindow::transmitDisplay (bool transmitting)
|
||||
ui->TxFreqSpinBox->setEnabled (true);
|
||||
//###
|
||||
} else {
|
||||
ui->TxFreqSpinBox->setEnabled (QSY_allowed and !m_bFastMode);
|
||||
ui->TxFreqSpinBox->setEnabled (QSY_allowed);
|
||||
ui->pbR2T->setEnabled (QSY_allowed);
|
||||
ui->cbHoldTxFreq->setEnabled (QSY_allowed);
|
||||
}
|
||||
@ -9265,26 +9215,6 @@ void::MainWindow::VHF_features_enabled(bool b)
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_sbTR_valueChanged(int value)
|
||||
{
|
||||
// if(!m_bFastMode and n>m_nSubMode) m_MinW=m_nSubMode;
|
||||
if(m_bFastMode or m_mode=="FreqCal") {
|
||||
m_TRperiod = value;
|
||||
m_fastGraph->setTRPeriod (value);
|
||||
m_modulator->setTRPeriod (value); // TODO - not thread safe
|
||||
m_detector->setTRPeriod (value); // TODO - not thread safe
|
||||
m_wideGraph->setPeriod (value, m_nsps);
|
||||
progressBar.setMaximum (value);
|
||||
}
|
||||
if(m_monitoring) {
|
||||
on_stopButton_clicked();
|
||||
on_monitorButton_clicked(true);
|
||||
}
|
||||
if(m_transmitting) {
|
||||
on_stopTxButton_clicked();
|
||||
}
|
||||
}
|
||||
|
||||
QChar MainWindow::current_submode () const
|
||||
{
|
||||
QChar submode {0};
|
||||
@ -9309,46 +9239,9 @@ void MainWindow::on_sbSubmode_valueChanged(int n)
|
||||
{
|
||||
mode_label.setText (m_mode);
|
||||
}
|
||||
if(m_mode=="ISCAT") {
|
||||
if(m_nSubMode==0) ui->TxFreqSpinBox->setValue(1012);
|
||||
if(m_nSubMode==1) ui->TxFreqSpinBox->setValue(560);
|
||||
}
|
||||
if(m_mode=="JT9") {
|
||||
if(m_nSubMode<4) {
|
||||
ui->cbFast9->setChecked(false);
|
||||
on_cbFast9_clicked(false);
|
||||
ui->cbFast9->setEnabled(false);
|
||||
ui->sbTR->setVisible(false);
|
||||
m_TRperiod=60;
|
||||
} else {
|
||||
ui->cbFast9->setEnabled(true);
|
||||
}
|
||||
ui->sbTR->setVisible(m_bFast9);
|
||||
if(m_bFast9) ui->TxFreqSpinBox->setValue(700);
|
||||
}
|
||||
if(m_transmitting and m_bFast9 and m_nSubMode>=4) transmit (99.0);
|
||||
statusUpdate ();
|
||||
}
|
||||
|
||||
void MainWindow::on_cbFast9_clicked(bool b)
|
||||
{
|
||||
if(m_mode=="JT9") {
|
||||
m_bFast9=b;
|
||||
// ui->cbAutoSeq->setVisible(b);
|
||||
}
|
||||
|
||||
if(b) {
|
||||
m_TRperiod = ui->sbTR->value ();
|
||||
} else {
|
||||
m_TRperiod=60;
|
||||
}
|
||||
progressBar.setMaximum(m_TRperiod);
|
||||
m_wideGraph->setPeriod(m_TRperiod,m_nsps);
|
||||
fast_config(b);
|
||||
statusChanged ();
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::on_cbShMsgs_toggled(bool b)
|
||||
{
|
||||
ui->cbTx6->setEnabled(b);
|
||||
@ -12647,24 +12540,6 @@ void MainWindow::setRig (Frequency f)
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::fastPick(int x0, int x1, int y)
|
||||
{
|
||||
float pixPerSecond=12000.0/512.0;
|
||||
if(m_TRperiod<30) pixPerSecond=12000.0/256.0;
|
||||
if(m_mode!="ISCAT" and m_mode!="MSK144") return;
|
||||
if(!m_decoderBusy) {
|
||||
dec_data.params.newdat=0;
|
||||
dec_data.params.nagain=1;
|
||||
m_blankLine=false; // don't insert the separator again
|
||||
m_nPick=1;
|
||||
if(y > 120) m_nPick=2;
|
||||
m_t0Pick=x0/pixPerSecond;
|
||||
m_t1Pick=x1/pixPerSecond;
|
||||
m_dataAvailable=true;
|
||||
decode();
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_actionMeasure_reference_spectrum_triggered()
|
||||
{
|
||||
if(!m_monitoring) on_monitorButton_clicked (true);
|
||||
@ -12719,19 +12594,6 @@ void MainWindow::on_cbCQTx_toggled(bool b)
|
||||
|
||||
void MainWindow::statusUpdate () const
|
||||
{
|
||||
#if 0
|
||||
if (!ui) return;
|
||||
auto submode = current_submode ();
|
||||
|
||||
m_messageClient->status_update (m_freqNominal, m_mode, m_hisCall,
|
||||
QString::number (ui->rptSpinBox->value ()),
|
||||
m_modeTx, ui->autoButton->isChecked (),
|
||||
m_transmitting, m_decoderBusy,
|
||||
ui->RxFreqSpinBox->value (), ui->TxFreqSpinBox->value (),
|
||||
m_config.my_callsign (), m_config.my_grid (),
|
||||
m_hisGrid, m_tx_watchdog,
|
||||
submode != QChar::Null ? QString {submode} : QString {}, m_bFastMode);
|
||||
#endif
|
||||
}
|
||||
|
||||
void MainWindow::childEvent (QChildEvent * e)
|
||||
|
12
mainwindow.h
12
mainwindow.h
@ -75,7 +75,6 @@ class QSettings;
|
||||
class QLineEdit;
|
||||
class QFont;
|
||||
class QHostInfo;
|
||||
class FastGraph;
|
||||
class WideGraph;
|
||||
class LogQSO;
|
||||
class Transceiver;
|
||||
@ -120,7 +119,6 @@ public slots:
|
||||
void showSoundOutError(const QString& errorMsg);
|
||||
void showStatusMessage(const QString& statusMsg);
|
||||
void dataSink(qint64 frames);
|
||||
void fastSink(qint64 frames);
|
||||
void diskDat();
|
||||
void freezeDecode(int n);
|
||||
void guiUpdate();
|
||||
@ -132,7 +130,6 @@ public slots:
|
||||
bool tryRestoreFreqOffset();
|
||||
void setFreq4(int rxFreq, int txFreq);
|
||||
void msgAvgDecode2();
|
||||
void fastPick(int x0, int x1, int y);
|
||||
|
||||
void playSoundFile(const QString &path);
|
||||
bool hasExistingMessageBufferToMe(int *pOffset);
|
||||
@ -420,13 +417,10 @@ private slots:
|
||||
void uploadResponse(QString response);
|
||||
void on_WSPRfreqSpinBox_valueChanged(int n);
|
||||
void on_pbTxNext_clicked(bool b);
|
||||
void on_actionFast_Graph_triggered();
|
||||
void on_actionMeasure_reference_spectrum_triggered();
|
||||
void on_actionErase_reference_spectrum_triggered();
|
||||
void on_actionMeasure_phase_response_triggered();
|
||||
void on_sbTR_valueChanged (int);
|
||||
void on_sbFtol_valueChanged (int);
|
||||
void on_cbFast9_clicked(bool b);
|
||||
void on_sbCQTxFreq_valueChanged(int n);
|
||||
void on_cbCQTx_toggled(bool b);
|
||||
void splash_done ();
|
||||
@ -487,7 +481,6 @@ private:
|
||||
QScopedPointer<EqualizationToolsDialog> m_equalizationToolsDialog;
|
||||
|
||||
QScopedPointer<WideGraph> m_wideGraph;
|
||||
QScopedPointer<FastGraph> m_fastGraph;
|
||||
QScopedPointer<LogQSO> m_logDlg;
|
||||
QScopedPointer<Astro> m_astroWidget;
|
||||
QScopedPointer<HelpTextWindow> m_shortcuts;
|
||||
@ -619,15 +612,11 @@ private:
|
||||
bool m_rxDone;
|
||||
bool m_bSimplex; // not using split even if it is available
|
||||
bool m_bTransmittedEcho;
|
||||
bool m_bFastMode;
|
||||
bool m_bFast9;
|
||||
bool m_bFastDecodeCalled;
|
||||
bool m_bDoubleClickAfterCQnnn;
|
||||
bool m_bRefSpec;
|
||||
bool m_bClearRefSpec;
|
||||
bool m_bTrain;
|
||||
bool m_bUseRef;
|
||||
bool m_bFastDone;
|
||||
bool m_bAltV;
|
||||
bool m_bNoMoreFiles;
|
||||
bool m_bQRAsyncWarned;
|
||||
@ -1017,7 +1006,6 @@ private:
|
||||
void setRig (Frequency = 0); // zero frequency means no change
|
||||
void WSPR_history(Frequency dialFreq, int ndecodes);
|
||||
QString WSPR_hhmm(int n);
|
||||
void fast_config(bool b);
|
||||
void CQTxFreq();
|
||||
QString save_wave_file (QString const& name
|
||||
, short const * data
|
||||
|
@ -2487,16 +2487,6 @@ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #2ecc71, stop:1 #00FF
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbFast9">
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Check to enable JT9 fast modes</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fast</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbAutoSeq">
|
||||
<property name="toolTip">
|
||||
@ -4653,7 +4643,6 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<addaction name="actionWide_Waterfall"/>
|
||||
<addaction name="actionAstronomical_data"/>
|
||||
<addaction name="actionMessage_averaging"/>
|
||||
<addaction name="actionFast_Graph"/>
|
||||
<addaction name="actionFox_Log"/>
|
||||
<addaction name="separator"/>
|
||||
</widget>
|
||||
@ -5272,14 +5261,6 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<string>ISCAT</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFast_Graph">
|
||||
<property name="text">
|
||||
<string>Fast Graph</string>
|
||||
</property>
|
||||
<property name="shortcut">
|
||||
<string>F9</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="download_samples_action">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
@ -5852,7 +5833,6 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<tabstop>sbCQTxFreq</tabstop>
|
||||
<tabstop>cbCQTx</tabstop>
|
||||
<tabstop>cbShMsgs</tabstop>
|
||||
<tabstop>cbFast9</tabstop>
|
||||
<tabstop>cbAutoSeq</tabstop>
|
||||
<tabstop>cbTx6</tabstop>
|
||||
<tabstop>pbTxMode</tabstop>
|
||||
|
Loading…
Reference in New Issue
Block a user