Added menu item to show time drift controls

This commit is contained in:
Jordan Sherer 2018-09-18 18:07:49 -04:00
parent d08096a934
commit 79bc33bcb7
3 changed files with 144 additions and 118 deletions

View File

@ -1673,6 +1673,8 @@ void MainWindow::writeSettings()
m_settings->setValue("MainSplitter", ui->mainSplitter->saveState()); m_settings->setValue("MainSplitter", ui->mainSplitter->saveState());
m_settings->setValue("TextHorizontalSplitter", ui->textHorizontalSplitter->saveState()); m_settings->setValue("TextHorizontalSplitter", ui->textHorizontalSplitter->saveState());
m_settings->setValue("TextVerticalSplitter", ui->textVerticalSplitter->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(); m_settings->endGroup();
@ -1776,6 +1778,8 @@ void MainWindow::readSettings()
if(!verticalState.isEmpty()){ if(!verticalState.isEmpty()){
ui->textVerticalSplitter->restoreState(verticalState); 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(); m_settings->endGroup();
@ -2317,6 +2321,8 @@ void MainWindow::on_menuWindow_aboutToShow(){
ui->actionShow_Waterfall->setChecked(vsizes.last() > 0); ui->actionShow_Waterfall->setChecked(vsizes.last() > 0);
ui->actionShow_Waterfall_Controls->setChecked(m_wideGraph->controlsVisible()); ui->actionShow_Waterfall_Controls->setChecked(m_wideGraph->controlsVisible());
ui->actionShow_Waterfall_Controls->setEnabled(ui->actionShow_Waterfall->isChecked()); 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); QMenu * sortBandMenu = new QMenu(ui->menuWindow);
buildBandActivitySortByMenu(sortBandMenu); buildBandActivitySortByMenu(sortBandMenu);
@ -2331,12 +2337,14 @@ void MainWindow::on_actionShow_Band_Activity_triggered(bool checked){
auto hsizes = ui->textHorizontalSplitter->sizes(); auto hsizes = ui->textHorizontalSplitter->sizes();
hsizes[0] = checked ? ui->textHorizontalSplitter->width()/4 : 0; hsizes[0] = checked ? ui->textHorizontalSplitter->width()/4 : 0;
ui->textHorizontalSplitter->setSizes(hsizes); ui->textHorizontalSplitter->setSizes(hsizes);
ui->tableWidgetRXAll->setVisible(checked);
} }
void MainWindow::on_actionShow_Call_Activity_triggered(bool checked){ void MainWindow::on_actionShow_Call_Activity_triggered(bool checked){
auto hsizes = ui->textHorizontalSplitter->sizes(); auto hsizes = ui->textHorizontalSplitter->sizes();
hsizes[2] = checked ? ui->textHorizontalSplitter->width()/4 : 0; hsizes[2] = checked ? ui->textHorizontalSplitter->width()/4 : 0;
ui->textHorizontalSplitter->setSizes(hsizes); ui->textHorizontalSplitter->setSizes(hsizes);
ui->tableWidgetCalls->setVisible(checked);
} }
void MainWindow::on_actionShow_Waterfall_triggered(bool 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[1] += oldHeight - newHeight;
vsizes[vsizes.length()-1] = newHeight; vsizes[vsizes.length()-1] = newHeight;
ui->mainSplitter->setSizes(vsizes); ui->mainSplitter->setSizes(vsizes);
ui->bandHorizontalWidget->setVisible(checked);
} }
void MainWindow::on_actionShow_Waterfall_Controls_triggered(bool checked){ void MainWindow::on_actionShow_Waterfall_Controls_triggered(bool checked){
m_wideGraph->setControlsVisible(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(){ void MainWindow::on_actionReset_Window_Sizes_triggered(){
auto size = this->centralWidget()->size(); auto size = this->centralWidget()->size();

View File

@ -173,6 +173,7 @@ private slots:
void on_actionShow_Call_Activity_triggered(bool checked); void on_actionShow_Call_Activity_triggered(bool checked);
void on_actionShow_Waterfall_triggered(bool checked); void on_actionShow_Waterfall_triggered(bool checked);
void on_actionShow_Waterfall_Controls_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_actionReset_Window_Sizes_triggered();
void on_actionSettings_triggered(); void on_actionSettings_triggered();
void openSettings(int tab=0); void openSettings(int tab=0);

View File

@ -11,7 +11,7 @@
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
<string>WSJT-X by K1JT</string> <string>FT8Call</string>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
@ -1725,124 +1725,127 @@ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #2ecc71, stop:1 #00FF
</layout> </layout>
</widget> </widget>
</item> </item>
</layout>
</widget>
<widget class="QFrame" name="frame_7">
<property name="minimumSize">
<size>
<width>0</width>
<height>36</height>
</size>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</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> <item>
<widget class="QSpinBox" name="driftSpinBox">
<property name="sizePolicy"> <widget class="QFrame" name="driftSyncFrame">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <property name="minimumSize">
<horstretch>0</horstretch> <size>
<verstretch>0</verstretch> <width>0</width>
</sizepolicy> <height>0</height>
</property> </size>
<property name="minimumSize"> </property>
<size> <property name="frameShape">
<width>100</width> <enum>QFrame::NoFrame</enum>
<height>30</height> </property>
</size> <property name="frameShadow">
</property> <enum>QFrame::Plain</enum>
<property name="wrapping"> </property>
<bool>false</bool> <property name="lineWidth">
</property> <number>0</number>
<property name="alignment"> </property>
<set>Qt::AlignCenter</set> <layout class="QHBoxLayout" name="horizontalLayout_18">
</property> <property name="leftMargin">
<property name="buttonSymbols"> <number>0</number>
<enum>QAbstractSpinBox::PlusMinus</enum> </property>
</property> <property name="topMargin">
<property name="suffix"> <number>0</number>
<string> ms</string> </property>
</property> <property name="rightMargin">
<property name="prefix"> <number>0</number>
<string>Time Drift </string> </property>
</property> <property name="bottomMargin">
<property name="minimum"> <number>0</number>
<number>-15000</number> </property>
</property> <item>
<property name="maximum"> <widget class="QSpinBox" name="driftSpinBox">
<number>15000</number> <property name="sizePolicy">
</property> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<property name="singleStep"> <horstretch>0</horstretch>
<number>100</number> <verstretch>0</verstretch>
</property> </sizepolicy>
</widget> </property>
</item> <property name="minimumSize">
<item> <size>
<widget class="QPushButton" name="driftSyncButton"> <width>100</width>
<property name="minimumSize"> <height>30</height>
<size> </size>
<width>0</width> </property>
<height>30</height> <property name="wrapping">
</size> <bool>false</bool>
</property> </property>
<property name="toolTip"> <property name="alignment">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Observe signals in the waterfall and click this to synchronize your time drift with the start of a TX cycle.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> <set>Qt::AlignCenter</set>
</property> </property>
<property name="text"> <property name="buttonSymbols">
<string>Sync Time to TX Start</string> <enum>QAbstractSpinBox::PlusMinus</enum>
</property> </property>
</widget> <property name="suffix">
</item> <string> ms</string>
<item> </property>
<widget class="QPushButton" name="driftSyncEndButton"> <property name="prefix">
<property name="minimumSize"> <string>Time Drift </string>
<size> </property>
<width>0</width> <property name="minimum">
<height>30</height> <number>-15000</number>
</size> </property>
</property> <property name="maximum">
<property name="toolTip"> <number>15000</number>
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Observe signals in the waterfall and click this to synchronize your time drift with the end of a TX cycle.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string> </property>
</property> <property name="singleStep">
<property name="text"> <number>100</number>
<string>Sync Time to TX End</string> </property>
</property> </widget>
</widget> </item>
</item> <item>
<item> <widget class="QPushButton" name="driftSyncButton">
<widget class="QPushButton" name="driftSyncResetButton"> <property name="minimumSize">
<property name="minimumSize"> <size>
<size> <width>0</width>
<width>0</width> <height>30</height>
<height>30</height> </size>
</size> </property>
</property> <property name="toolTip">
<property name="toolTip"> <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Observe signals in the waterfall and click this to synchronize your time drift with the start of a TX cycle.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
<string>Reset your time drift to zero.</string> </property>
</property> <property name="text">
<property name="text"> <string>Sync Time to TX Start</string>
<string>Reset Drift</string> </property>
</property> </widget>
</widget> </item>
<item>
<widget class="QPushButton" name="driftSyncEndButton">
<property name="minimumSize">
<size>
<width>0</width>
<height>30</height>
</size>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Observe signals in the waterfall and click this to synchronize your time drift with the end of a TX cycle.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string>Sync Time to TX End</string>
</property>
</widget>
</item>
<item>
<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 Drift</string>
</property>
</widget>
</item>
</layout>
</widget>
</item> </item>
</layout> </layout>
</widget> </widget>
@ -4505,6 +4508,7 @@ list. The list can be maintained in Settings (F2).</string>
<addaction name="actionShow_Call_Activity"/> <addaction name="actionShow_Call_Activity"/>
<addaction name="actionShow_Waterfall"/> <addaction name="actionShow_Waterfall"/>
<addaction name="actionShow_Waterfall_Controls"/> <addaction name="actionShow_Waterfall_Controls"/>
<addaction name="actionShow_Time_Drift_Controls"/>
<addaction name="separator"/> <addaction name="separator"/>
<addaction name="actionReset_Window_Sizes"/> <addaction name="actionReset_Window_Sizes"/>
</widget> </widget>
@ -5209,6 +5213,14 @@ list. The list can be maintained in Settings (F2).</string>
<string>Show Waterfall Controls</string> <string>Show Waterfall Controls</string>
</property> </property>
</action> </action>
<action name="actionShow_Time_Drift_Controls">
<property name="checkable">
<bool>true</bool>
</property>
<property name="text">
<string>Show Time Drift Controls</string>
</property>
</action>
</widget> </widget>
<layoutdefault spacing="6" margin="11"/> <layoutdefault spacing="6" margin="11"/>
<customwidgets> <customwidgets>