From 79bc33bcb70083c626831378bb0b865049ee4884 Mon Sep 17 00:00:00 2001 From: Jordan Sherer Date: Tue, 18 Sep 2018 18:07:49 -0400 Subject: [PATCH] Added menu item to show time drift controls --- mainwindow.cpp | 13 +++ mainwindow.h | 1 + mainwindow.ui | 248 ++++++++++++++++++++++++++----------------------- 3 files changed, 144 insertions(+), 118 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 2be6ca1..882f332 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1673,6 +1673,8 @@ void MainWindow::writeSettings() m_settings->setValue("MainSplitter", ui->mainSplitter->saveState()); m_settings->setValue("TextHorizontalSplitter", ui->textHorizontalSplitter->saveState()); m_settings->setValue("TextVerticalSplitter", ui->textVerticalSplitter->saveState()); + m_settings->setValue("ShowTimeDrift", ui->actionShow_Time_Drift_Controls->isChecked()); + m_settings->setValue("TimeDrift", ui->driftSpinBox->value()); m_settings->endGroup(); @@ -1776,6 +1778,8 @@ void MainWindow::readSettings() if(!verticalState.isEmpty()){ ui->textVerticalSplitter->restoreState(verticalState); } + ui->actionShow_Time_Drift_Controls->setChecked(m_settings->value("ShowTimeDrift", false).toBool()); + ui->driftSpinBox->setValue(m_settings->value("TimeDrift", 0).toInt()); m_settings->endGroup(); @@ -2317,6 +2321,8 @@ 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(ui->menuWindow); buildBandActivitySortByMenu(sortBandMenu); @@ -2331,12 +2337,14 @@ void MainWindow::on_actionShow_Band_Activity_triggered(bool checked){ auto hsizes = ui->textHorizontalSplitter->sizes(); hsizes[0] = checked ? ui->textHorizontalSplitter->width()/4 : 0; ui->textHorizontalSplitter->setSizes(hsizes); + ui->tableWidgetRXAll->setVisible(checked); } void MainWindow::on_actionShow_Call_Activity_triggered(bool checked){ auto hsizes = ui->textHorizontalSplitter->sizes(); hsizes[2] = checked ? ui->textHorizontalSplitter->width()/4 : 0; ui->textHorizontalSplitter->setSizes(hsizes); + ui->tableWidgetCalls->setVisible(checked); } void MainWindow::on_actionShow_Waterfall_triggered(bool checked){ @@ -2347,12 +2355,17 @@ void MainWindow::on_actionShow_Waterfall_triggered(bool checked){ vsizes[1] += oldHeight - newHeight; vsizes[vsizes.length()-1] = newHeight; ui->mainSplitter->setSizes(vsizes); + ui->bandHorizontalWidget->setVisible(checked); } 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(); diff --git a/mainwindow.h b/mainwindow.h index 351de1d..a7ef933 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -173,6 +173,7 @@ 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); diff --git a/mainwindow.ui b/mainwindow.ui index 5a1690a..a969af4 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -11,7 +11,7 @@ - WSJT-X by K1JT + FT8Call @@ -1725,124 +1725,127 @@ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #2ecc71, stop:1 #00FF - - - - - - 0 - 36 - - - - QFrame::StyledPanel - - - QFrame::Plain - - - 0 - - - - 0 - - - 0 - - - 0 - - - 0 - - - - - 0 - 0 - - - - - 100 - 30 - - - - false - - - Qt::AlignCenter - - - QAbstractSpinBox::PlusMinus - - - ms - - - Time Drift - - - -15000 - - - 15000 - - - 100 - - - - - - - - 0 - 30 - - - - <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> - - - Sync Time to TX Start - - - - - - - - 0 - 30 - - - - <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> - - - Sync Time to TX End - - - - - - - - 0 - 30 - - - - Reset your time drift to zero. - - - Reset Drift - - + + + + + 0 + 0 + + + + QFrame::NoFrame + + + QFrame::Plain + + + 0 + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 0 + 0 + + + + + 100 + 30 + + + + false + + + Qt::AlignCenter + + + QAbstractSpinBox::PlusMinus + + + ms + + + Time Drift + + + -15000 + + + 15000 + + + 100 + + + + + + + + 0 + 30 + + + + <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> + + + Sync Time to TX Start + + + + + + + + 0 + 30 + + + + <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> + + + Sync Time to TX End + + + + + + + + 0 + 30 + + + + Reset your time drift to zero. + + + Reset Drift + + + + + @@ -4505,6 +4508,7 @@ list. The list can be maintained in Settings (F2). + @@ -5209,6 +5213,14 @@ list. The list can be maintained in Settings (F2). Show Waterfall Controls + + + true + + + Show Time Drift Controls + +