From 6d5fcad576962e5950641f7e7b113a6ac6f397e5 Mon Sep 17 00:00:00 2001 From: Cristian Mircea Messel Date: Wed, 16 May 2018 23:05:09 +0300 Subject: [gui] Make proxy icon from statusbar clickable Clicking on the proxy icon will open settings showing the network tab Create enum Tab in OptionsModel Use new connect syntax Use lambda for private slots --- src/qt/bitcoingui.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'src/qt/bitcoingui.h') diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h index 4deeb325b3..2b4c19ec59 100644 --- a/src/qt/bitcoingui.h +++ b/src/qt/bitcoingui.h @@ -9,6 +9,8 @@ #include #endif +#include + #include #include @@ -45,6 +47,10 @@ class QProgressBar; class QProgressDialog; QT_END_NAMESPACE +namespace GUIUtil { +class ClickableLabel; +} + /** Bitcoin GUI main class. This class represents the main window of the Bitcoin UI. It communicates with both the client and wallet models to give the user an up-to-date view of the current core state. @@ -93,8 +99,8 @@ private: UnitDisplayStatusBarControl* unitDisplayControl = nullptr; QLabel* labelWalletEncryptionIcon = nullptr; QLabel* labelWalletHDStatusIcon = nullptr; - QLabel* labelProxyIcon = nullptr; - QLabel* connectionsControl = nullptr; + GUIUtil::ClickableLabel* labelProxyIcon = nullptr; + GUIUtil::ClickableLabel* connectionsControl = nullptr; QLabel* labelBlocksIcon = nullptr; QLabel* progressBarLabel = nullptr; QProgressBar* progressBar = nullptr; @@ -166,6 +172,9 @@ private: void updateHeadersSyncProgressLabel(); + /** Open the OptionsDialog on the specified tab index */ + void openOptionsDialogWithTab(OptionsDialog::Tab tab); + Q_SIGNALS: /** Signal raised when a URI was entered or dragged to the GUI */ void receivedURI(const QString &uri); @@ -266,9 +275,6 @@ private Q_SLOTS: /** When hideTrayIcon setting is changed in OptionsModel hide or show the icon accordingly. */ void setTrayIconVisible(bool); - /** Toggle networking */ - void toggleNetworkActive(); - void showModalOverlay(); }; -- cgit v1.2.3