aboutsummaryrefslogtreecommitdiff
path: root/src/qt/bitcoingui.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/bitcoingui.h')
-rw-r--r--src/qt/bitcoingui.h24
1 files changed, 21 insertions, 3 deletions
diff --git a/src/qt/bitcoingui.h b/src/qt/bitcoingui.h
index dcaca10557..9ca9e4c926 100644
--- a/src/qt/bitcoingui.h
+++ b/src/qt/bitcoingui.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2011-2018 The Bitcoin Core developers
+// Copyright (c) 2011-2019 The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -20,6 +20,10 @@
#include <QPoint>
#include <QSystemTrayIcon>
+#ifdef Q_OS_MAC
+#include <qt/macos_appnap.h>
+#endif
+
#include <memory>
class ClientModel;
@@ -82,6 +86,11 @@ public:
#endif // ENABLE_WALLET
bool enableWallet = false;
+ /** Get the tray icon status.
+ Some systems have not "system tray" or "notification area" available.
+ */
+ bool hasTrayIcon() const { return trayIcon; }
+
protected:
void changeEvent(QEvent *e);
void closeEvent(QCloseEvent *event);
@@ -143,6 +152,10 @@ private:
HelpMessageDialog* helpMessageDialog = nullptr;
ModalOverlay* modalOverlay = nullptr;
+#ifdef Q_OS_MAC
+ CAppNapInhibitor* m_app_nap_inhibitor = nullptr;
+#endif
+
/** Keep track of previous number of blocks, to detect progress */
int prevBlocks = 0;
int spinnerFrame = 0;
@@ -179,6 +192,8 @@ private:
Q_SIGNALS:
/** Signal raised when a URI was entered or dragged to the GUI */
void receivedURI(const QString &uri);
+ /** Signal raised when RPC console shown */
+ void consoleShown(RPCConsole* console);
public Q_SLOTS:
/** Set number of connections shown in the UI */
@@ -198,7 +213,7 @@ public Q_SLOTS:
void message(const QString &title, const QString &message, unsigned int style, bool *ret = nullptr);
#ifdef ENABLE_WALLET
- bool setCurrentWallet(const QString& name);
+ bool setCurrentWallet(WalletModel* wallet_model);
bool setCurrentWalletBySelectorIndex(int index);
/** Set the UI status indicators based on the currently selected wallet.
*/
@@ -215,7 +230,7 @@ private:
@param[in] hdEnabled current hd enabled status
@see WalletModel::EncryptionStatus
*/
- void setHDStatus(int hdEnabled);
+ void setHDStatus(bool privkeyDisabled, int hdEnabled);
public Q_SLOTS:
bool handlePaymentRequest(const SendCoinsRecipient& recipient);
@@ -260,6 +275,9 @@ public Q_SLOTS:
#ifndef Q_OS_MAC
/** Handle tray icon clicked */
void trayIconActivated(QSystemTrayIcon::ActivationReason reason);
+#else
+ /** Handle macOS Dock icon clicked */
+ void macosDockIconActivated();
#endif
/** Show window if hidden, unminimize when minimized, rise when obscured or show if hidden and fToggleHidden is true */