Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoingui.h
// Copyright (c) 2011-2016 The Bitcoin Core developers | // Copyright (c) 2011-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#ifndef BITCOIN_QT_BITCOINGUI_H | #ifndef BITCOIN_QT_BITCOINGUI_H | ||||
#define BITCOIN_QT_BITCOINGUI_H | #define BITCOIN_QT_BITCOINGUI_H | ||||
#if defined(HAVE_CONFIG_H) | #if defined(HAVE_CONFIG_H) | ||||
#include <config/bitcoin-config.h> | #include <config/bitcoin-config.h> | ||||
#endif | #endif | ||||
#include <qt/optionsdialog.h> | |||||
#include <amount.h> | #include <amount.h> | ||||
#include <QLabel> | #include <QLabel> | ||||
#include <QMainWindow> | #include <QMainWindow> | ||||
#include <QMap> | #include <QMap> | ||||
#include <QMenu> | #include <QMenu> | ||||
#include <QPoint> | #include <QPoint> | ||||
#include <QSystemTrayIcon> | #include <QSystemTrayIcon> | ||||
Show All 22 Lines | |||||
QT_BEGIN_NAMESPACE | QT_BEGIN_NAMESPACE | ||||
class QAction; | class QAction; | ||||
class QComboBox; | class QComboBox; | ||||
class QProgressBar; | class QProgressBar; | ||||
class QProgressDialog; | class QProgressDialog; | ||||
QT_END_NAMESPACE | QT_END_NAMESPACE | ||||
namespace GUIUtil { | |||||
class ClickableLabel; | |||||
} | |||||
/** | /** | ||||
* Bitcoin GUI main class. This class represents the main window of the Bitcoin | * 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 | * UI. It communicates with both the client and wallet models to give the user | ||||
* an up-to-date view of the current core state. | * an up-to-date view of the current core state. | ||||
*/ | */ | ||||
class BitcoinGUI : public QMainWindow { | class BitcoinGUI : public QMainWindow { | ||||
Q_OBJECT | Q_OBJECT | ||||
Show All 37 Lines | private: | ||||
std::unique_ptr<interfaces::Handler> m_handler_message_box; | std::unique_ptr<interfaces::Handler> m_handler_message_box; | ||||
std::unique_ptr<interfaces::Handler> m_handler_question; | std::unique_ptr<interfaces::Handler> m_handler_question; | ||||
ClientModel *clientModel = nullptr; | ClientModel *clientModel = nullptr; | ||||
WalletFrame *walletFrame = nullptr; | WalletFrame *walletFrame = nullptr; | ||||
UnitDisplayStatusBarControl *unitDisplayControl = nullptr; | UnitDisplayStatusBarControl *unitDisplayControl = nullptr; | ||||
QLabel *labelWalletEncryptionIcon = nullptr; | QLabel *labelWalletEncryptionIcon = nullptr; | ||||
QLabel *labelWalletHDStatusIcon = nullptr; | QLabel *labelWalletHDStatusIcon = nullptr; | ||||
QLabel *labelProxyIcon = nullptr; | GUIUtil::ClickableLabel *labelProxyIcon = nullptr; | ||||
QLabel *connectionsControl = nullptr; | GUIUtil::ClickableLabel *connectionsControl = nullptr; | ||||
QLabel *labelBlocksIcon = nullptr; | QLabel *labelBlocksIcon = nullptr; | ||||
QLabel *progressBarLabel = nullptr; | QLabel *progressBarLabel = nullptr; | ||||
QProgressBar *progressBar = nullptr; | QProgressBar *progressBar = nullptr; | ||||
QProgressDialog *progressDialog = nullptr; | QProgressDialog *progressDialog = nullptr; | ||||
QMenuBar *appMenuBar = nullptr; | QMenuBar *appMenuBar = nullptr; | ||||
QToolBar *appToolBar = nullptr; | QToolBar *appToolBar = nullptr; | ||||
QAction *overviewAction = nullptr; | QAction *overviewAction = nullptr; | ||||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | private: | ||||
/** Disconnect core signals from GUI client */ | /** Disconnect core signals from GUI client */ | ||||
void unsubscribeFromCoreSignals(); | void unsubscribeFromCoreSignals(); | ||||
/** Update UI with latest network info from model. */ | /** Update UI with latest network info from model. */ | ||||
void updateNetworkState(); | void updateNetworkState(); | ||||
void updateHeadersSyncProgressLabel(); | void updateHeadersSyncProgressLabel(); | ||||
/** Open the OptionsDialog on the specified tab index */ | |||||
void openOptionsDialogWithTab(OptionsDialog::Tab tab); | |||||
Q_SIGNALS: | Q_SIGNALS: | ||||
/** Signal raised when a URI was entered or dragged to the GUI */ | /** Signal raised when a URI was entered or dragged to the GUI */ | ||||
void receivedURI(const QString &uri); | void receivedURI(const QString &uri); | ||||
public Q_SLOTS: | public Q_SLOTS: | ||||
/** Set number of connections shown in the UI */ | /** Set number of connections shown in the UI */ | ||||
void setNumConnections(int count); | void setNumConnections(int count); | ||||
/** Set network state shown in the UI */ | /** Set network state shown in the UI */ | ||||
▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | #endif | ||||
/** Show progress dialog e.g. for verifychain */ | /** Show progress dialog e.g. for verifychain */ | ||||
void showProgress(const QString &title, int nProgress); | void showProgress(const QString &title, int nProgress); | ||||
/** When hideTrayIcon setting is changed in OptionsModel hide or show the | /** When hideTrayIcon setting is changed in OptionsModel hide or show the | ||||
* icon accordingly. */ | * icon accordingly. */ | ||||
void setTrayIconVisible(bool); | void setTrayIconVisible(bool); | ||||
/** Toggle networking */ | |||||
void toggleNetworkActive(); | |||||
void showModalOverlay(); | void showModalOverlay(); | ||||
}; | }; | ||||
class UnitDisplayStatusBarControl : public QLabel { | class UnitDisplayStatusBarControl : public QLabel { | ||||
Q_OBJECT | Q_OBJECT | ||||
public: | public: | ||||
explicit UnitDisplayStatusBarControl(const PlatformStyle *platformStyle); | explicit UnitDisplayStatusBarControl(const PlatformStyle *platformStyle); | ||||
Show All 26 Lines |