Changeset View
Changeset View
Standalone View
Standalone View
src/qt/bitcoingui.h
Show All 30 Lines | |||||
class HelpMessageDialog; | class HelpMessageDialog; | ||||
class ModalOverlay; | class ModalOverlay; | ||||
class Config; | class Config; | ||||
class CWallet; | class CWallet; | ||||
QT_BEGIN_NAMESPACE | QT_BEGIN_NAMESPACE | ||||
class QAction; | class QAction; | ||||
class QComboBox; | |||||
class QProgressBar; | class QProgressBar; | ||||
class QProgressDialog; | class QProgressDialog; | ||||
QT_END_NAMESPACE | QT_END_NAMESPACE | ||||
/** | /** | ||||
* 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 | ||||
public: | public: | ||||
static const QString DEFAULT_WALLET; | |||||
static const std::string DEFAULT_UIPLATFORM; | static const std::string DEFAULT_UIPLATFORM; | ||||
explicit BitcoinGUI(const Config *, const PlatformStyle *platformStyle, | explicit BitcoinGUI(const Config *, const PlatformStyle *platformStyle, | ||||
const NetworkStyle *networkStyle, QWidget *parent = 0); | const NetworkStyle *networkStyle, QWidget *parent = 0); | ||||
~BitcoinGUI(); | ~BitcoinGUI(); | ||||
/** | /** | ||||
* Set the client model. | * Set the client model. | ||||
* The client model represents the part of the core that communicates with | * The client model represents the part of the core that communicates with | ||||
* the P2P network, and is wallet-agnostic. | * the P2P network, and is wallet-agnostic. | ||||
*/ | */ | ||||
void setClientModel(ClientModel *clientModel); | void setClientModel(ClientModel *clientModel); | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
/** | /** | ||||
* Set the wallet model. | * Set the wallet model. | ||||
* The wallet model represents a bitcoin wallet, and offers access to the | * The wallet model represents a bitcoin wallet, and offers access to the | ||||
* list of transactions, address book and sending functionality. | * list of transactions, address book and sending functionality. | ||||
*/ | */ | ||||
bool addWallet(const QString &name, WalletModel *walletModel); | bool addWallet(WalletModel *walletModel); | ||||
bool setCurrentWallet(const QString &name); | |||||
void removeAllWallets(); | void removeAllWallets(); | ||||
#endif // ENABLE_WALLET | #endif // ENABLE_WALLET | ||||
bool enableWallet = false; | bool enableWallet = false; | ||||
protected: | protected: | ||||
void changeEvent(QEvent *e) override; | void changeEvent(QEvent *e) override; | ||||
void closeEvent(QCloseEvent *event) override; | void closeEvent(QCloseEvent *event) override; | ||||
void showEvent(QShowEvent *event) override; | void showEvent(QShowEvent *event) override; | ||||
Show All 10 Lines | private: | ||||
QLabel *labelWalletHDStatusIcon = nullptr; | QLabel *labelWalletHDStatusIcon = nullptr; | ||||
QLabel *connectionsControl = nullptr; | QLabel *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; | |||||
QAction *overviewAction = nullptr; | QAction *overviewAction = nullptr; | ||||
QAction *historyAction = nullptr; | QAction *historyAction = nullptr; | ||||
QAction *quitAction = nullptr; | QAction *quitAction = nullptr; | ||||
QAction *sendCoinsAction = nullptr; | QAction *sendCoinsAction = nullptr; | ||||
QAction *sendCoinsMenuAction = nullptr; | QAction *sendCoinsMenuAction = nullptr; | ||||
QAction *usedSendingAddressesAction = nullptr; | QAction *usedSendingAddressesAction = nullptr; | ||||
QAction *usedReceivingAddressesAction = nullptr; | QAction *usedReceivingAddressesAction = nullptr; | ||||
QAction *signMessageAction = nullptr; | QAction *signMessageAction = nullptr; | ||||
QAction *verifyMessageAction = nullptr; | QAction *verifyMessageAction = nullptr; | ||||
QAction *aboutAction = nullptr; | QAction *aboutAction = nullptr; | ||||
QAction *receiveCoinsAction = nullptr; | QAction *receiveCoinsAction = nullptr; | ||||
QAction *receiveCoinsMenuAction = nullptr; | QAction *receiveCoinsMenuAction = nullptr; | ||||
QAction *optionsAction = nullptr; | QAction *optionsAction = nullptr; | ||||
QAction *toggleHideAction = nullptr; | QAction *toggleHideAction = nullptr; | ||||
QAction *encryptWalletAction = nullptr; | QAction *encryptWalletAction = nullptr; | ||||
QAction *backupWalletAction = nullptr; | QAction *backupWalletAction = nullptr; | ||||
QAction *changePassphraseAction = nullptr; | QAction *changePassphraseAction = nullptr; | ||||
QAction *aboutQtAction = nullptr; | QAction *aboutQtAction = nullptr; | ||||
QAction *openRPCConsoleAction = nullptr; | QAction *openRPCConsoleAction = nullptr; | ||||
QAction *openAction = nullptr; | QAction *openAction = nullptr; | ||||
QAction *showHelpMessageAction = nullptr; | QAction *showHelpMessageAction = nullptr; | ||||
QLabel *m_wallet_selector_label = nullptr; | |||||
QComboBox *m_wallet_selector = nullptr; | |||||
QSystemTrayIcon *trayIcon = nullptr; | QSystemTrayIcon *trayIcon = nullptr; | ||||
QMenu *trayIconMenu = nullptr; | QMenu *trayIconMenu = nullptr; | ||||
Notificator *notificator = nullptr; | Notificator *notificator = nullptr; | ||||
RPCConsole *rpcConsole = nullptr; | RPCConsole *rpcConsole = nullptr; | ||||
HelpMessageDialog *helpMessageDialog = nullptr; | HelpMessageDialog *helpMessageDialog = nullptr; | ||||
ModalOverlay *modalOverlay = nullptr; | ModalOverlay *modalOverlay = nullptr; | ||||
/** Keep track of previous number of blocks, to detect progress */ | /** Keep track of previous number of blocks, to detect progress */ | ||||
▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | /** Notify the user of an event from the core network or transaction | ||||
@see CClientUIInterface::MessageBoxFlags | @see CClientUIInterface::MessageBoxFlags | ||||
@param[in] ret pointer to a bool that will be modified to whether | @param[in] ret pointer to a bool that will be modified to whether | ||||
Ok was clicked (modal only) | Ok was clicked (modal only) | ||||
*/ | */ | ||||
void message(const QString &title, const QString &message, | void message(const QString &title, const QString &message, | ||||
unsigned int style, bool *ret = nullptr); | unsigned int style, bool *ret = nullptr); | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
bool setCurrentWallet(const QString &name); | |||||
/** Set the UI status indicators based on the currently selected wallet. | |||||
*/ | |||||
void updateWalletStatus(); | |||||
private: | |||||
/** Set the encryption status as shown in the UI. | /** Set the encryption status as shown in the UI. | ||||
@param[in] status current encryption status | @param[in] status current encryption status | ||||
@see WalletModel::EncryptionStatus | @see WalletModel::EncryptionStatus | ||||
*/ | */ | ||||
void setEncryptionStatus(int status); | void setEncryptionStatus(int status); | ||||
/** Set the hd-enabled status as shown in the UI. | /** Set the hd-enabled status as shown in the UI. | ||||
@param[in] status current hd enabled status | @param[in] status current hd enabled status | ||||
@see WalletModel::EncryptionStatus | @see WalletModel::EncryptionStatus | ||||
*/ | */ | ||||
void setHDStatus(int hdEnabled); | void setHDStatus(int hdEnabled); | ||||
public Q_SLOTS: | |||||
bool handlePaymentRequest(const SendCoinsRecipient &recipient); | bool handlePaymentRequest(const SendCoinsRecipient &recipient); | ||||
/** Show incoming transaction notification for new transactions. */ | /** Show incoming transaction notification for new transactions. */ | ||||
void incomingTransaction(const QString &date, int unit, const Amount amount, | void incomingTransaction(const QString &date, int unit, const Amount amount, | ||||
const QString &type, const QString &address, | const QString &type, const QString &address, | ||||
const QString &label); | const QString &label, const QString &walletName); | ||||
#endif // ENABLE_WALLET | #endif // ENABLE_WALLET | ||||
private Q_SLOTS: | private Q_SLOTS: | ||||
#ifdef ENABLE_WALLET | #ifdef ENABLE_WALLET | ||||
/** Switch to overview (home) page */ | /** Switch to overview (home) page */ | ||||
void gotoOverviewPage(); | void gotoOverviewPage(); | ||||
/** Switch to history (transactions) page */ | /** Switch to history (transactions) page */ | ||||
void gotoHistoryPage(); | void gotoHistoryPage(); | ||||
▲ Show 20 Lines • Show All 81 Lines • Show Last 20 Lines |