Reorganized waterfall controls and timing controls under one sizeable pane
This commit is contained in:
parent
649910302c
commit
a21e46cb4a
@ -2192,8 +2192,7 @@ void MainWindow::writeSettings()
|
||||
m_settings->setValue("BandActivityVisible", ui->tableWidgetRXAll->isVisible());
|
||||
m_settings->setValue("BandHBActivityVisible", ui->actionShow_Band_Heartbeats_and_ACKs->isChecked());
|
||||
m_settings->setValue("TextVerticalSplitter", ui->textVerticalSplitter->saveState());
|
||||
m_settings->setValue("ShowTimeDrift", ui->driftSyncFrame->isVisible());
|
||||
m_settings->setValue("TimeDrift", ui->driftSpinBox->value());
|
||||
m_settings->setValue("TimeDrift", DriftingDateTime::drift());
|
||||
m_settings->setValue("ShowTooltips", ui->actionShow_Tooltips->isChecked());
|
||||
m_settings->setValue("ShowStatusbar", ui->statusBar->isVisible());
|
||||
m_settings->setValue("RXActivity", ui->textEditRX->toHtml());
|
||||
@ -2340,8 +2339,7 @@ void MainWindow::readSettings()
|
||||
if(!verticalState.isEmpty()){
|
||||
ui->textVerticalSplitter->restoreState(verticalState);
|
||||
}
|
||||
ui->driftSyncFrame->setVisible(m_settings->value("ShowTimeDrift", false).toBool());
|
||||
ui->driftSpinBox->setValue(m_settings->value("TimeDrift", 0).toInt());
|
||||
setDrift(m_settings->value("TimeDrift", 0).toInt());
|
||||
ui->actionShow_Tooltips->setChecked(m_settings->value("ShowTooltips", true).toBool());
|
||||
ui->actionShow_Statusbar->setChecked(m_settings->value("ShowStatusbar",true).toBool());
|
||||
ui->statusBar->setVisible(ui->actionShow_Statusbar->isChecked());
|
||||
@ -2841,8 +2839,6 @@ void MainWindow::on_menuWindow_aboutToShow(){
|
||||
ui->actionShow_Waterfall->setChecked(vsizes.last() > 0);
|
||||
ui->actionShow_Waterfall_Controls->setChecked(m_wideGraph->controlsVisible());
|
||||
ui->actionShow_Waterfall_Controls->setEnabled(ui->actionShow_Waterfall->isChecked());
|
||||
ui->actionShow_Time_Drift_Controls->setChecked(ui->driftSyncFrame->isVisible());
|
||||
ui->actionShow_Time_Drift_Controls->setEnabled(ui->actionShow_Waterfall->isChecked());
|
||||
|
||||
QMenu * sortBandMenu = new QMenu(this->menuBar()); //ui->menuWindow);
|
||||
buildBandActivitySortByMenu(sortBandMenu);
|
||||
@ -3026,10 +3022,6 @@ void MainWindow::on_actionShow_Waterfall_Controls_triggered(bool checked){
|
||||
m_wideGraph->setControlsVisible(checked);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionShow_Time_Drift_Controls_triggered(bool checked){
|
||||
ui->driftSyncFrame->setVisible(checked);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionReset_Window_Sizes_triggered(){
|
||||
auto size = this->centralWidget()->size();
|
||||
|
||||
@ -9118,78 +9110,6 @@ void MainWindow::on_freeTextMsg_currentTextChanged (QString const& text)
|
||||
{
|
||||
}
|
||||
|
||||
void MainWindow::on_driftSpinBox_valueChanged(int n){
|
||||
if(n == DriftingDateTime::drift()){
|
||||
return;
|
||||
}
|
||||
|
||||
setDrift(n);
|
||||
}
|
||||
|
||||
void MainWindow::on_driftSyncButton_clicked(){
|
||||
auto now = QDateTime::currentDateTimeUtc();
|
||||
|
||||
int n = 0;
|
||||
int nPos = m_TRperiod - (now.time().second() % m_TRperiod);
|
||||
int nNeg = (now.time().second() % m_TRperiod) - m_TRperiod;
|
||||
|
||||
if(abs(nNeg) < nPos){
|
||||
n = nNeg;
|
||||
} else {
|
||||
n = nPos;
|
||||
}
|
||||
|
||||
setDrift(n * 1000);
|
||||
}
|
||||
|
||||
void MainWindow::on_driftSyncEndButton_clicked(){
|
||||
auto now = QDateTime::currentDateTimeUtc();
|
||||
|
||||
int n = 0;
|
||||
int nPos = m_TRperiod - (now.time().second() % m_TRperiod);
|
||||
int nNeg = (now.time().second() % m_TRperiod) - m_TRperiod;
|
||||
|
||||
if(abs(nNeg) < nPos){
|
||||
n = nNeg + 2;
|
||||
} else {
|
||||
n = nPos - 2;
|
||||
}
|
||||
|
||||
setDrift(n * 1000);
|
||||
}
|
||||
|
||||
void MainWindow::on_driftSyncMinuteButton_clicked(){
|
||||
auto now = QDateTime::currentDateTimeUtc();
|
||||
int n = 0;
|
||||
int s = now.time().second();
|
||||
|
||||
if(s < 30){
|
||||
n = -s;
|
||||
} else {
|
||||
n = 60 - s;
|
||||
}
|
||||
|
||||
setDrift(n * 1000);
|
||||
}
|
||||
|
||||
void MainWindow::on_driftSyncResetButton_clicked(){
|
||||
setDrift(0);
|
||||
resetTimeDeltaAverage();
|
||||
}
|
||||
|
||||
void MainWindow::setDrift(int n){
|
||||
DriftingDateTime::setDrift(n);
|
||||
|
||||
qDebug() << qSetRealNumberPrecision(12) << "Average delta:" << m_timeDeltaMsMMA;
|
||||
qDebug() << qSetRealNumberPrecision(12) << "Drift milliseconds:" << n;
|
||||
qDebug() << qSetRealNumberPrecision(12) << "Clock time:" << QDateTime::currentDateTimeUtc();
|
||||
qDebug() << qSetRealNumberPrecision(12) << "Drifted time:" << DriftingDateTime::currentDateTimeUtc();
|
||||
|
||||
if(ui->driftSpinBox->value() != n){
|
||||
ui->driftSpinBox->setValue(n);
|
||||
}
|
||||
}
|
||||
|
||||
void MainWindow::on_rptSpinBox_valueChanged(int n)
|
||||
{
|
||||
int step=ui->rptSpinBox->singleStep();
|
||||
@ -10380,7 +10300,6 @@ void MainWindow::observeTimeDeltaForAverage(float delta){
|
||||
if(m_timeDeltaMsMMA < -(float)m_TRperiod || m_timeDeltaMsMMA > (float)m_TRperiod){
|
||||
resetTimeDeltaAverage();
|
||||
}
|
||||
ui->driftAvgLabel->setText(QString("Avg Time Delta: %1 ms").arg((int)m_timeDeltaMsMMA));
|
||||
}
|
||||
|
||||
void MainWindow::resetTimeDeltaAverage(){
|
||||
@ -10392,6 +10311,14 @@ void MainWindow::resetTimeDeltaAverage(){
|
||||
}
|
||||
|
||||
|
||||
void MainWindow::setDrift(int n){
|
||||
// drifting functionality moved to the widegraph
|
||||
m_wideGraph->setDrift(n);
|
||||
|
||||
// reset the average if we set a new drift
|
||||
resetTimeDeltaAverage();
|
||||
}
|
||||
|
||||
void MainWindow::processIdleActivity() {
|
||||
auto now = DriftingDateTime::currentDateTimeUtc();
|
||||
|
||||
|
@ -200,7 +200,6 @@ private slots:
|
||||
void on_actionShow_Call_Activity_triggered(bool checked);
|
||||
void on_actionShow_Waterfall_triggered(bool checked);
|
||||
void on_actionShow_Waterfall_Controls_triggered(bool checked);
|
||||
void on_actionShow_Time_Drift_Controls_triggered(bool checked);
|
||||
void on_actionReset_Window_Sizes_triggered();
|
||||
void on_actionSettings_triggered();
|
||||
void openSettings(int tab=0);
|
||||
@ -356,11 +355,6 @@ private slots:
|
||||
int findFreeFreqOffset(int fmin, int fmax, int bw);
|
||||
void checkRepeat();
|
||||
QString calculateDistance(QString const& grid, int *pDistance=nullptr, int *pAzimuth=nullptr);
|
||||
void on_driftSpinBox_valueChanged(int n);
|
||||
void on_driftSyncButton_clicked();
|
||||
void on_driftSyncEndButton_clicked();
|
||||
void on_driftSyncMinuteButton_clicked();
|
||||
void on_driftSyncResetButton_clicked();
|
||||
void setDrift(int n);
|
||||
void on_rptSpinBox_valueChanged(int n);
|
||||
void killFile();
|
||||
|
176
mainwindow.ui
176
mainwindow.ui
@ -1955,172 +1955,6 @@ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #2ecc71, stop:1 #00FF
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="driftSyncFrame">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>0</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::NoFrame</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Plain</enum>
|
||||
</property>
|
||||
<property name="lineWidth">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_18">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="driftAvgLabel">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Minimum" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Avg Time Delta: 0 ms</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_12" rowminimumheight="0,0,0" columnminimumwidth="0,0,0">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="2">
|
||||
<widget class="QPushButton" name="driftSyncMinuteButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sync Time Drift to Now (Minute Start)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QPushButton" name="driftSyncButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Observe signals in the waterfall and click this to synchronize your time drift with the start of a TX cycle.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sync Time Drift to Now (TX Start)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QPushButton" name="driftSyncEndButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string><html><head/><body><p>Observe signals in the waterfall and click this to synchronize your time drift with the end of a TX cycle.</p></body></html></string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Sync Time Drift to Now (TX End)</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QPushButton" name="driftSyncResetButton">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Reset your time drift to zero.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Reset Time Drift</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QSpinBox" name="driftSpinBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>100</width>
|
||||
<height>30</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="wrapping">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::PlusMinus</enum>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string> ms</string>
|
||||
</property>
|
||||
<property name="prefix">
|
||||
<string>Time Drift </string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>-30000</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>30000</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>100</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
@ -4723,7 +4557,6 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionShow_Waterfall"/>
|
||||
<addaction name="actionShow_Waterfall_Controls"/>
|
||||
<addaction name="actionShow_Time_Drift_Controls"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionShow_Fullscreen"/>
|
||||
<addaction name="actionShow_Statusbar"/>
|
||||
@ -5502,13 +5335,8 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<property name="text">
|
||||
<string>Show Wa&terfall Controls</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShow_Time_Drift_Controls">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Time &Drift Controls</string>
|
||||
<property name="shortcut">
|
||||
<string>Shift+F4</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShow_Band_Activity_Columns">
|
||||
|
@ -116,6 +116,11 @@ WideGraph::WideGraph(QSettings * settings, QWidget *parent) :
|
||||
ui->controls_widget->setVisible(!m_settings->value("HideControls", false).toBool());
|
||||
ui->cbControls->setChecked(!m_settings->value("HideControls", false).toBool());
|
||||
|
||||
auto splitState = m_settings->value("SplitState").toByteArray();
|
||||
if(!splitState.isEmpty()){
|
||||
ui->splitter->restoreState(splitState);
|
||||
}
|
||||
|
||||
setFilter(m_settings->value("FilterMinimum", 500).toInt(), m_settings->value("FilterMaximum", 2500).toInt());
|
||||
setFilterEnabled(m_settings->value("FilterEnabled", false).toBool());
|
||||
}
|
||||
@ -177,6 +182,7 @@ void WideGraph::saveSettings() //saveS
|
||||
m_settings->setValue ("FilterMinimum", m_filterMinimum);
|
||||
m_settings->setValue ("FilterMaximum", m_filterMaximum);
|
||||
m_settings->setValue ("FilterEnabled", m_filterEnabled);
|
||||
m_settings->setValue ("SplitState", ui->splitter->saveState());
|
||||
}
|
||||
|
||||
void WideGraph::drawRed(int ia, int ib)
|
||||
@ -664,3 +670,73 @@ void WideGraph::setRedFile(QString fRed)
|
||||
void WideGraph::setTurbo(bool turbo){
|
||||
ui->widePlot->setTurbo(turbo);
|
||||
}
|
||||
|
||||
void WideGraph::on_driftSpinBox_valueChanged(int n){
|
||||
if(n == DriftingDateTime::drift()){
|
||||
return;
|
||||
}
|
||||
|
||||
setDrift(n);
|
||||
}
|
||||
|
||||
void WideGraph::on_driftSyncButton_clicked(){
|
||||
auto now = QDateTime::currentDateTimeUtc();
|
||||
|
||||
int n = 0;
|
||||
int nPos = m_TRperiod - (now.time().second() % m_TRperiod);
|
||||
int nNeg = (now.time().second() % m_TRperiod) - m_TRperiod;
|
||||
|
||||
if(abs(nNeg) < nPos){
|
||||
n = nNeg;
|
||||
} else {
|
||||
n = nPos;
|
||||
}
|
||||
|
||||
setDrift(n * 1000);
|
||||
}
|
||||
|
||||
void WideGraph::on_driftSyncEndButton_clicked(){
|
||||
auto now = QDateTime::currentDateTimeUtc();
|
||||
|
||||
int n = 0;
|
||||
int nPos = m_TRperiod - (now.time().second() % m_TRperiod);
|
||||
int nNeg = (now.time().second() % m_TRperiod) - m_TRperiod;
|
||||
|
||||
if(abs(nNeg) < nPos){
|
||||
n = nNeg + 2;
|
||||
} else {
|
||||
n = nPos - 2;
|
||||
}
|
||||
|
||||
setDrift(n * 1000);
|
||||
}
|
||||
|
||||
void WideGraph::on_driftSyncMinuteButton_clicked(){
|
||||
auto now = QDateTime::currentDateTimeUtc();
|
||||
int n = 0;
|
||||
int s = now.time().second();
|
||||
|
||||
if(s < 30){
|
||||
n = -s;
|
||||
} else {
|
||||
n = 60 - s;
|
||||
}
|
||||
|
||||
setDrift(n * 1000);
|
||||
}
|
||||
|
||||
void WideGraph::on_driftSyncResetButton_clicked(){
|
||||
setDrift(0);
|
||||
}
|
||||
|
||||
void WideGraph::setDrift(int n){
|
||||
DriftingDateTime::setDrift(n);
|
||||
|
||||
qDebug() << qSetRealNumberPrecision(12) << "Drift milliseconds:" << n;
|
||||
qDebug() << qSetRealNumberPrecision(12) << "Clock time:" << QDateTime::currentDateTimeUtc();
|
||||
qDebug() << qSetRealNumberPrecision(12) << "Drifted time:" << DriftingDateTime::currentDateTimeUtc();
|
||||
|
||||
if(ui->driftSpinBox->value() != n){
|
||||
ui->driftSpinBox->setValue(n);
|
||||
}
|
||||
}
|
||||
|
@ -71,6 +71,7 @@ public slots:
|
||||
void setDialFreq(double d);
|
||||
void setControlsVisible(bool visible);
|
||||
bool controlsVisible();
|
||||
void setDrift(int n);
|
||||
|
||||
protected:
|
||||
void keyPressEvent (QKeyEvent *e) override;
|
||||
@ -98,6 +99,13 @@ private slots:
|
||||
void on_filterMaxSpinBox_valueChanged(int n);
|
||||
void on_filterCheckBox_toggled(bool b);
|
||||
|
||||
void on_driftSpinBox_valueChanged(int n);
|
||||
void on_driftSyncButton_clicked();
|
||||
void on_driftSyncEndButton_clicked();
|
||||
void on_driftSyncMinuteButton_clicked();
|
||||
void on_driftSyncResetButton_clicked();
|
||||
|
||||
|
||||
private:
|
||||
void readPalette ();
|
||||
void setRxRange ();
|
||||
|
1599
widegraph.ui
1599
widegraph.ui
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user