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

Method setWalletModel

src/qt/walletview.cpp:123–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

121}
122
123void WalletView::setWalletModel(WalletModel *_walletModel)
124{
125 this->walletModel = _walletModel;
126
127 // Put transaction list in tabs
128 transactionView->setModel(_walletModel);
129 overviewPage->setWalletModel(_walletModel);
130 receiveCoinsPage->setModel(_walletModel);
131 sendCoinsPage->setModel(_walletModel);
132 usedReceivingAddressesPage->setModel(_walletModel ? _walletModel->getAddressTableModel() : nullptr);
133 usedSendingAddressesPage->setModel(_walletModel ? _walletModel->getAddressTableModel() : nullptr);
134
135 if (_walletModel)
136 {
137 // Receive and pass through messages from wallet model
138 connect(_walletModel, SIGNAL(message(QString,QString,unsigned int)), this, SIGNAL(message(QString,QString,unsigned int)));
139
140 // Handle changes in encryption status
141 connect(_walletModel, SIGNAL(encryptionStatusChanged()), this, SIGNAL(encryptionStatusChanged()));
142 updateEncryptionStatus();
143
144 // update HD status
145 Q_EMIT hdEnabledStatusChanged();
146
147 // Balloon pop-up for new transaction
148 connect(_walletModel->getTransactionTableModel(), SIGNAL(rowsInserted(QModelIndex,int,int)),
149 this, SLOT(processNewTransaction(QModelIndex,int,int)));
150
151 // Ask for passphrase if needed
152 connect(_walletModel, SIGNAL(requireUnlock()), this, SLOT(unlockWallet()));
153
154 // Show progress dialog
155 connect(_walletModel, SIGNAL(showProgress(QString,int)), this, SLOT(showProgress(QString,int)));
156 }
157}
158
159void WalletView::processNewTransaction(const QModelIndex& parent, int start, int /*end*/)
160{

Callers 2

addWalletMethod · 0.45
TestGUIFunction · 0.45

Calls 3

setModelMethod · 0.45
getAddressTableModelMethod · 0.45

Tested by 1

TestGUIFunction · 0.36