Options (via Ctrl+M) to minimize size of Main Window and Wide Graph; add separate Start/End times to logging information. Thanks to W9MDB!

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7430 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor
2016-12-30 15:45:31 +00:00
parent 8015dfea7f
commit 220c866b8f
20 changed files with 1135 additions and 806 deletions
+61
View File
@@ -6,6 +6,7 @@
#include "Configuration.hpp"
#include "MessageBox.hpp"
#include "moc_widegraph.cpp"
#include "SettingsGroup.hpp"
namespace
{
@@ -82,6 +83,9 @@ WideGraph::WideGraph(QSettings * settings, QWidget *parent) :
int m_fMin = m_settings->value ("Fmin", 2500).toInt ();
ui->fSplitSpinBox->setValue (m_fMin);
setRxRange (m_fMin);
m_bHideControls = m_settings->value("HideControls", false).toBool ();
m_bHideControls = !m_bHideControls; // we're not toggling here so we start in opposite state
on_hideControls();
m_settings->endGroup();
saveSettings (); // update config with defaults
@@ -112,6 +116,57 @@ void WideGraph::closeEvent (QCloseEvent * e)
QDialog::closeEvent (e);
}
void WideGraph::on_hideControls()
{
m_bHideControls = !m_bHideControls;
ui->verticalLayout->setEnabled(!m_bHideControls);
ui->gridLayout->setEnabled(!m_bHideControls);
ui->horizontalLayout->setEnabled(!m_bHideControls);
ui->horizontalLayout_2->setEnabled(!m_bHideControls);
ui->horizontalLayout_3->setEnabled(!m_bHideControls);
if (!m_bHideControls) {
ui->adjust_palette_push_button->show();
ui->labPalette->show();
ui->smoSpinBox->show();
ui->cbFlatten->show();
ui->cbRef->show();
ui->bppSpinBox->show();
ui->fSplitSpinBox->show();
ui->fStartSpinBox->show();
ui->gain2dSlider->show();
ui->gainSlider->show();
ui->line->show();
ui->line_2->show();
ui->paletteComboBox->show();
ui->sbPercent2dPlot->show();
ui->spec2dComboBox->show();
ui->waterfallAvgSpinBox->show();
ui->zero2dSlider->show();
ui->zeroSlider->show();
}
else {
ui->adjust_palette_push_button->hide();
ui->labPalette->hide();
ui->smoSpinBox->hide();
ui->cbFlatten->hide();
ui->cbRef->hide();
ui->bppSpinBox->hide();
ui->fSplitSpinBox->hide();
ui->fStartSpinBox->hide();
ui->gain2dSlider->hide();
ui->gainSlider->hide();
ui->line->hide();
ui->line_2->hide();
ui->paletteComboBox->hide();
ui->sbPercent2dPlot->hide();
ui->spec2dComboBox->hide();
ui->waterfallAvgSpinBox->hide();
ui->zero2dSlider->hide();
ui->zeroSlider->hide();
ui->widePlot->adjustSize();
}
}
void WideGraph::saveSettings() //saveSettings
{
m_settings->beginGroup ("WideGraph");
@@ -136,6 +191,7 @@ void WideGraph::saveSettings() //saveS
m_settings->setValue ("Fmin", m_fMin);
m_settings->setValue("Flatten",m_bFlatten);
m_settings->setValue("UseRef",m_bRef);
m_settings->setValue("HideControls",m_bHideControls);
m_settings->endGroup ();
}
@@ -217,6 +273,11 @@ void WideGraph::keyPressEvent(QKeyEvent *e) //F1
if(e->modifiers() & Qt::ControlModifier) n+=100;
emit f11f12(n);
break;
case Qt::Key_M:
if(e->modifiers() & Qt::ControlModifier) {
on_hideControls();
}
break;
default:
QDialog::keyPressEvent (e);
}