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,17 +1725,17 @@ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #2ecc71, stop:1 #00FF
</layout> </layout>
</widget> </widget>
</item> </item>
</layout> <item>
</widget>
<widget class="QFrame" name="frame_7"> <widget class="QFrame" name="driftSyncFrame">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>36</height> <height>0</height>
</size> </size>
</property> </property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::NoFrame</enum>
</property> </property>
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Plain</enum> <enum>QFrame::Plain</enum>
@ -1842,6 +1842,9 @@ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #2ecc71, stop:1 #00FF
<property name="text"> <property name="text">
<string>Reset Drift</string> <string>Reset Drift</string>
</property> </property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
</layout> </layout>
@ -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>