Added window menu for showing/hiding band activity, call activity, and waterfall...as well as reset all of those sizes to their defaults
This commit is contained in:
parent
49224f5b81
commit
aa59cc547f
@ -1391,6 +1391,11 @@ void MainWindow::writeSettings()
|
||||
m_settings->setValue("FoxNlist",ui->sbNlist->value());
|
||||
m_settings->setValue("FoxNslots",ui->sbNslots->value());
|
||||
m_settings->setValue("FoxMaxDB",ui->sbMax_dB->value());
|
||||
|
||||
m_settings->setValue("MainSplitter", ui->mainSplitter->saveState());
|
||||
m_settings->setValue("TextHorizontalSplitter", ui->textHorizontalSplitter->saveState());
|
||||
m_settings->setValue("TextVerticalSplitter", ui->textVerticalSplitter->saveState());
|
||||
|
||||
m_settings->endGroup();
|
||||
|
||||
m_settings->beginGroup("Common");
|
||||
@ -1477,6 +1482,11 @@ void MainWindow::readSettings()
|
||||
ui->sbNlist->setValue(m_settings->value("FoxNlist",12).toInt());
|
||||
ui->sbNslots->setValue(m_settings->value("FoxNslots",5).toInt());
|
||||
ui->sbMax_dB->setValue(m_settings->value("FoxMaxDB",30).toInt());
|
||||
|
||||
ui->mainSplitter->restoreState(m_settings->value("MainSplitter", ui->mainSplitter->saveState()).toByteArray());
|
||||
ui->textHorizontalSplitter->restoreState(m_settings->value("TextHorizontalSplitter", ui->textHorizontalSplitter->saveState()).toByteArray());
|
||||
ui->textVerticalSplitter->restoreState(m_settings->value("TextVerticalSplitter", ui->textVerticalSplitter->saveState()).toByteArray());
|
||||
|
||||
m_settings->endGroup();
|
||||
|
||||
// do this outside of settings group because it uses groups internally
|
||||
@ -1995,6 +2005,60 @@ void MainWindow::showSoundOutError(const QString& errorMsg)
|
||||
void MainWindow::showStatusMessage(const QString& statusMsg)
|
||||
{statusBar()->showMessage(statusMsg);}
|
||||
|
||||
|
||||
void MainWindow::on_menuWindow_aboutToShow(){
|
||||
auto hsizes = ui->textHorizontalSplitter->sizes();
|
||||
ui->actionShow_Band_Activity->setChecked(hsizes.at(0) > 0);
|
||||
ui->actionShow_Call_Activity->setChecked(hsizes.at(2) > 0);
|
||||
|
||||
auto vsizes = ui->mainSplitter->sizes();
|
||||
ui->actionShow_Waterfall->setChecked(vsizes.last() > 0);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionShow_Waterfall_triggered(bool checked){
|
||||
auto vsizes = ui->mainSplitter->sizes();
|
||||
vsizes[0] = qMin(vsizes[0], ui->logHorizontalWidget->minimumHeight());
|
||||
int oldHeight = vsizes[vsizes.length()-1];
|
||||
int newHeight = checked ? ui->mainSplitter->height()/4 : 0;
|
||||
vsizes[1] += oldHeight - newHeight;
|
||||
vsizes[vsizes.length()-1] = newHeight;
|
||||
ui->mainSplitter->setSizes(vsizes);
|
||||
}
|
||||
|
||||
void MainWindow::on_actionReset_Window_Sizes_triggered(){
|
||||
auto size = this->centralWidget()->size();
|
||||
|
||||
ui->mainSplitter->setSizes({
|
||||
ui->logHorizontalWidget->minimumHeight(),
|
||||
ui->mainSplitter->height()/2,
|
||||
ui->macroHorizonalWidget->minimumHeight(),
|
||||
ui->mainSplitter->height()/4
|
||||
});
|
||||
|
||||
ui->textHorizontalSplitter->setSizes({
|
||||
ui->textHorizontalSplitter->width()/4,
|
||||
ui->textHorizontalSplitter->width()/2,
|
||||
ui->textHorizontalSplitter->width()/4
|
||||
});
|
||||
|
||||
ui->textVerticalSplitter->setSizes({
|
||||
ui->textVerticalSplitter->height()/2,
|
||||
ui->textVerticalSplitter->height()/2
|
||||
});
|
||||
}
|
||||
|
||||
void MainWindow::on_actionSettings_triggered() //Setup Dialog
|
||||
{
|
||||
// things that might change that we need know about
|
||||
@ -5566,12 +5630,15 @@ void MainWindow::displayTextForFreq(QString text, int freq, QDateTime date, bool
|
||||
block = -1;
|
||||
m_rxFrameBlockNumbers.remove(freq);
|
||||
}
|
||||
|
||||
if(newLine){
|
||||
m_rxFrameBlockNumbers.remove(freq);
|
||||
block = -1;
|
||||
}
|
||||
|
||||
block = writeMessageTextToUI(date, text, freq, bold, block);
|
||||
|
||||
// TODO: jsherer - might be better to see if the bits are "last" versus checking for the EOT
|
||||
if(!text.contains("\u2301")){
|
||||
m_rxFrameBlockNumbers.insert(freq, block);
|
||||
}
|
||||
|
@ -158,6 +158,11 @@ private slots:
|
||||
void on_tx4_editingFinished();
|
||||
void on_tx5_currentTextChanged (QString const&);
|
||||
void on_tx6_editingFinished();
|
||||
void on_menuWindow_aboutToShow();
|
||||
void on_actionShow_Band_Activity_triggered(bool checked);
|
||||
void on_actionShow_Call_Activity_triggered(bool checked);
|
||||
void on_actionShow_Waterfall_triggered(bool checked);
|
||||
void on_actionReset_Window_Sizes_triggered();
|
||||
void on_actionSettings_triggered();
|
||||
void preparePSKReporter();
|
||||
void on_spotButton_clicked(bool checked);
|
||||
|
119
mainwindow.ui
119
mainwindow.ui
@ -1669,14 +1669,14 @@ background: qlineargradient(x1:0, y1:0, x2:1, y2:1, stop:0 #2ecc71, stop:1 #00FF
|
||||
<widget class="QWidget" name="layoutWidget">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="cbMoreCQs">
|
||||
<property name="text">
|
||||
<string>More CQs</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QCheckBox" name="cbMoreCQs">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>More CQs</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_6">
|
||||
@ -4205,9 +4205,9 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<addaction name="actionExit"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuView">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>View</string>
|
||||
</property>
|
||||
@ -4220,9 +4220,9 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<addaction name="separator"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuDecode">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Decode</string>
|
||||
</property>
|
||||
@ -4263,9 +4263,9 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<addaction name="actionAbout"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuMode">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Mode</string>
|
||||
</property>
|
||||
@ -4304,6 +4304,16 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<addaction name="actionFrequency_calibration"/>
|
||||
<addaction name="actionSolve_FreqCal"/>
|
||||
</widget>
|
||||
<widget class="QMenu" name="menuWindow">
|
||||
<property name="title">
|
||||
<string>Window</string>
|
||||
</property>
|
||||
<addaction name="actionShow_Band_Activity"/>
|
||||
<addaction name="actionShow_Call_Activity"/>
|
||||
<addaction name="actionShow_Waterfall"/>
|
||||
<addaction name="separator"/>
|
||||
<addaction name="actionReset_Window_Sizes"/>
|
||||
</widget>
|
||||
<addaction name="menuFile"/>
|
||||
<addaction name="menuConfig"/>
|
||||
<addaction name="menuView"/>
|
||||
@ -4311,6 +4321,7 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<addaction name="menuDecode"/>
|
||||
<addaction name="menuSave"/>
|
||||
<addaction name="menuTools"/>
|
||||
<addaction name="menuWindow"/>
|
||||
<addaction name="menuHelp"/>
|
||||
</widget>
|
||||
<widget class="QStatusBar" name="statusBar"/>
|
||||
@ -4430,9 +4441,6 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOnline_User_Guide">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
@ -4442,6 +4450,9 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<property name="shortcut">
|
||||
<string>F1</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionKeyboard_shortcuts">
|
||||
<property name="enabled">
|
||||
@ -4670,12 +4681,12 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>List of Type 1 prefixes and suffixes</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSettings">
|
||||
<property name="text">
|
||||
@ -4686,15 +4697,15 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionLocal_User_Guide">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Local User Guide</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionOpen_log_directory">
|
||||
<property name="text">
|
||||
@ -4919,9 +4930,6 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFox_Log">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Fox Log</string>
|
||||
</property>
|
||||
@ -4931,28 +4939,69 @@ list. The list can be maintained in Settings (F2).</string>
|
||||
<property name="toolTip">
|
||||
<string>Fox Log</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionErase_FoxQSO_txt">
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Erase FoxQSO.txt</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionFT8_DXpedition_Mode_User_Guide">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>FT8 DXpedition Mode User Guide</string>
|
||||
</property>
|
||||
<property name="visible">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShow_Band_Activity">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Band Activity</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShow_Call_Activity">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Call Activity</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionShow_Waterfall">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Show Waterfall</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionReset_Window_Sizes">
|
||||
<property name="text">
|
||||
<string>Reset Window Sizes</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
|
Loading…
Reference in New Issue
Block a user