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

Method showProgress

src/qt/walletview.cpp:263–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263void WalletView::showProgress(const QString &title, int nProgress)
264{
265 if (nProgress == 0) {
266 progressDialog = new QProgressDialog(title, tr("Cancel"), 0, 100);
267 GUIUtil::PolishProgressDialog(progressDialog);
268 progressDialog->setWindowModality(Qt::ApplicationModal);
269 progressDialog->setAutoClose(false);
270 progressDialog->setValue(0);
271 } else if (nProgress == 100) {
272 if (progressDialog) {
273 progressDialog->close();
274 progressDialog->deleteLater();
275 progressDialog = nullptr;
276 }
277 } else if (progressDialog) {
278 if (progressDialog->wasCanceled()) {
279 getWalletModel()->wallet().abortRescan();
280 } else {
281 progressDialog->setValue(nProgress);
282 }
283 }
284}

Callers 1

importwalletFunction · 0.45

Calls 6

PolishProgressDialogFunction · 0.85
getWalletModelFunction · 0.85
abortRescanMethod · 0.80
setValueMethod · 0.45
closeMethod · 0.45
walletMethod · 0.45

Tested by

no test coverage detected