From 42ec06c9e12682f46ea6b8d83ea13291a065feaf Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Sat, 1 Jul 2017 19:05:52 +0000 Subject: [PATCH] Add checkBoxes to (potentially) replace the CTRL+M commands for minimizing window sizes. Suggestions for better positioning, etc, are welcome. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7769 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- mainwindow.cpp | 10 ++++++---- mainwindow.h | 1 + mainwindow.ui | 16 ++++++++++++++++ widegraph.cpp | 5 +++++ widegraph.h | 2 +- widegraph.ui | 22 ++++++++++++++++++++++ 6 files changed, 51 insertions(+), 5 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index e993d3111..b40f6b87a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2070,16 +2070,13 @@ void MainWindow::on_actionFast_Graph_triggered() void MainWindow::on_actionHide_Controls_toggled (bool checked) { int spacing = checked ? 1 : 6; - if (checked) { statusBar ()->removeWidget (&auto_tx_label); minimumSize().setHeight(450); minimumSize().setWidth(700); restoreGeometry(m_geometryNoControls); updateGeometry(); - //resize(450,700); // how to auto-shrink it? - } - else { + } else { m_geometryNoControls = saveGeometry(); statusBar ()->addWidget(&auto_tx_label); minimumSize().setHeight(520); @@ -6422,3 +6419,8 @@ void MainWindow::update_watchdog_label () watchdog_label.setVisible (false); } } + +void MainWindow::on_cbMenus_toggled(bool b) +{ + on_actionHide_Controls_toggled (!b); +} diff --git a/mainwindow.h b/mainwindow.h index 8eec6aed3..baa7a352d 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -234,6 +234,7 @@ private slots: void on_cbShMsgs_toggled(bool b); void on_cbSWL_toggled(bool b); void on_cbTx6_toggled(bool b); + void on_cbMenus_toggled(bool b); void networkError (QString const&); void on_ClrAvgButton_clicked(); void on_actionWSPR_triggered(); diff --git a/mainwindow.ui b/mainwindow.ui index faab4102e..903462577 100644 --- a/mainwindow.ui +++ b/mainwindow.ui @@ -529,6 +529,22 @@ + + + + + 60 + 16777215 + + + + Menus + + + true + + + diff --git a/widegraph.cpp b/widegraph.cpp index 32d0687a5..0ccc5e73e 100644 --- a/widegraph.cpp +++ b/widegraph.cpp @@ -423,6 +423,11 @@ void WideGraph::on_cbRef_toggled(bool b) ui->widePlot->setFlatten(m_bFlatten,m_bRef); } +void WideGraph::on_cbControls_toggled(bool b) +{ + ui->controls_widget->setVisible(b); +} + void WideGraph::on_adjust_palette_push_button_clicked (bool) //Adjust Palette { try diff --git a/widegraph.h b/widegraph.h index 3ef9aef10..6e373bd2d 100644 --- a/widegraph.h +++ b/widegraph.h @@ -73,6 +73,7 @@ private slots: void on_paletteComboBox_activated(const QString &palette); void on_cbFlatten_toggled(bool b); void on_cbRef_toggled(bool b); + void on_cbControls_toggled(bool b); void on_adjust_palette_push_button_clicked (bool); void on_gainSlider_valueChanged(int value); void on_zeroSlider_valueChanged(int value); @@ -101,7 +102,6 @@ private: qint32 m_nSubMode; qint32 m_nsmo; qint32 m_Percent2DScreen; - bool m_lockTxFreq; bool m_bFlatten; bool m_bRef; diff --git a/widegraph.ui b/widegraph.ui index b48046538..1dc394485 100644 --- a/widegraph.ui +++ b/widegraph.ui @@ -49,6 +49,28 @@ 1 + + + + 9 + 10 + 60 + 17 + + + + + 65 + 16777215 + + + + Controls + + + true + +