MCPcopy Create free account
hub / github.com/ElementsProject/elements / addWallet

Method addWallet

src/qt/bitcoingui.cpp:651–678  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

649}
650
651void BitcoinGUI::addWallet(WalletModel* walletModel)
652{
653 if (!walletFrame) return;
654
655 WalletView* wallet_view = new WalletView(walletModel, platformStyle, walletFrame);
656 if (!walletFrame->addView(wallet_view)) return;
657
658 rpcConsole->addWallet(walletModel);
659 if (m_wallet_selector->count() == 0) {
660 setWalletActionsEnabled(true);
661 } else if (m_wallet_selector->count() == 1) {
662 m_wallet_selector_label_action->setVisible(true);
663 m_wallet_selector_action->setVisible(true);
664 }
665
666 connect(wallet_view, &WalletView::outOfSyncWarningClicked, this, &BitcoinGUI::showModalOverlay);
667 connect(wallet_view, &WalletView::transactionClicked, this, &BitcoinGUI::gotoHistoryPage);
668 connect(wallet_view, &WalletView::coinsSent, this, &BitcoinGUI::gotoHistoryPage);
669 connect(wallet_view, &WalletView::message, [this](const QString& title, const QString& message, unsigned int style) {
670 this->message(title, message, style);
671 });
672 connect(wallet_view, &WalletView::encryptionStatusChanged, this, &BitcoinGUI::updateWalletStatus);
673 connect(wallet_view, &WalletView::incomingTransaction, this, &BitcoinGUI::incomingTransaction);
674 connect(this, &BitcoinGUI::setPrivacy, wallet_view, &WalletView::setPrivacy);
675 wallet_view->setPrivacy(isPrivacyModeActivated());
676 const QString display_name = walletModel->getDisplayName();
677 m_wallet_selector->addItem(display_name, QVariant::fromValue(walletModel));
678}
679
680void BitcoinGUI::removeWallet(WalletModel* walletModel)
681{

Callers

nothing calls this directly

Calls 5

messageMethod · 0.95
addViewMethod · 0.80
countMethod · 0.80
setPrivacyMethod · 0.80
getDisplayNameMethod · 0.80

Tested by

no test coverage detected