MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / addWallet

Method addWallet

src/qt/walletframe.cpp:43–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43bool WalletFrame::addWallet(WalletModel *walletModel)
44{
45 if (!gui || !clientModel || !walletModel) {
46 return false;
47 }
48
49 const QString name = walletModel->getWalletName();
50 if (mapWalletViews.count(name) > 0) {
51 return false;
52 }
53
54 WalletView *walletView = new WalletView(platformStyle, this);
55 walletView->setBitcoinGUI(gui);
56 walletView->setClientModel(clientModel);
57 walletView->setWalletModel(walletModel);
58 walletView->showOutOfSyncWarning(bOutOfSync);
59
60 WalletView* current_wallet_view = currentWalletView();
61 if (current_wallet_view) {
62 walletView->setCurrentIndex(current_wallet_view->currentIndex());
63 } else {
64 walletView->gotoOverviewPage();
65 }
66
67 walletStack->addWidget(walletView);
68 mapWalletViews[name] = walletView;
69
70 // Ensure a walletView is able to show the main window
71 connect(walletView, SIGNAL(showNormalIfMinimized()), gui, SLOT(showNormalIfMinimized()));
72
73 connect(walletView, SIGNAL(outOfSyncWarningClicked()), this, SLOT(outOfSyncWarningClicked()));
74
75 return true;
76}
77
78bool WalletFrame::setCurrentWallet(const QString& name)
79{

Callers

nothing calls this directly

Calls 7

setBitcoinGUIMethod · 0.80
getWalletNameMethod · 0.45
countMethod · 0.45
setClientModelMethod · 0.45
setWalletModelMethod · 0.45
showOutOfSyncWarningMethod · 0.45
gotoOverviewPageMethod · 0.45

Tested by

no test coverage detected