mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-09-14 20:09:19 +02:00
qt: Add WalletFrame::currentWalletSet signal
The connection of the WalletFrame::currentWalletSet signal to the BitcoinGUI::updateWalletStatus is a shorter and more descriptive way to call both the setHDStatus and setEncryptionStatus member functions of the BitcoinGUI class in comparison to using of the WalletView::updateEncryptionStatus slot.
This commit is contained in:
@@ -113,6 +113,7 @@ BitcoinGUI::BitcoinGUI(interfaces::Node& node, const PlatformStyle *_platformSty
|
|||||||
connect(walletFrame, &WalletFrame::message, [this](const QString& title, const QString& message, unsigned int style) {
|
connect(walletFrame, &WalletFrame::message, [this](const QString& title, const QString& message, unsigned int style) {
|
||||||
this->message(title, message, style);
|
this->message(title, message, style);
|
||||||
});
|
});
|
||||||
|
connect(walletFrame, &WalletFrame::currentWalletSet, [this] { updateWalletStatus(); });
|
||||||
setCentralWidget(walletFrame);
|
setCentralWidget(walletFrame);
|
||||||
} else
|
} else
|
||||||
#endif // ENABLE_WALLET
|
#endif // ENABLE_WALLET
|
||||||
|
@@ -109,7 +109,8 @@ void WalletFrame::setCurrentWallet(WalletModel* wallet_model)
|
|||||||
walletView->updateGeometry();
|
walletView->updateGeometry();
|
||||||
|
|
||||||
walletStack->setCurrentWidget(walletView);
|
walletStack->setCurrentWidget(walletView);
|
||||||
walletView->updateEncryptionStatus();
|
|
||||||
|
Q_EMIT currentWalletSet();
|
||||||
}
|
}
|
||||||
|
|
||||||
void WalletFrame::removeWallet(WalletModel* wallet_model)
|
void WalletFrame::removeWallet(WalletModel* wallet_model)
|
||||||
|
@@ -49,6 +49,7 @@ public:
|
|||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void createWalletButtonClicked();
|
void createWalletButtonClicked();
|
||||||
void message(const QString& title, const QString& message, unsigned int style);
|
void message(const QString& title, const QString& message, unsigned int style);
|
||||||
|
void currentWalletSet();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QStackedWidget *walletStack;
|
QStackedWidget *walletStack;
|
||||||
|
Reference in New Issue
Block a user