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

Method addEntry

src/qt/sendcoinsdialog.cpp:610–631  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

608}
609
610SendCoinsEntry *SendCoinsDialog::addEntry()
611{
612 SendCoinsEntry *entry = new SendCoinsEntry(platformStyle, this);
613 entry->setModel(model);
614 ui->entries->addWidget(entry);
615 connect(entry, &SendCoinsEntry::removeEntry, this, &SendCoinsDialog::removeEntry);
616 connect(entry, &SendCoinsEntry::useAvailableBalance, this, &SendCoinsDialog::useAvailableBalance);
617 connect(entry, &SendCoinsEntry::payAmountChanged, this, &SendCoinsDialog::coinControlUpdateLabels);
618 connect(entry, &SendCoinsEntry::subtractFeeFromAmountChanged, this, &SendCoinsDialog::coinControlUpdateLabels);
619
620 // Focus the field, so that entry can start immediately
621 entry->clear();
622 entry->setFocus();
623 ui->scrollAreaWidgetContents->resize(ui->scrollAreaWidgetContents->sizeHint());
624 qApp->processEvents();
625 QScrollBar* bar = ui->scrollArea->verticalScrollBar();
626 if(bar)
627 bar->setSliderPosition(bar->maximum());
628
629 updateTabsAndLabels();
630 return entry;
631}
632
633void SendCoinsDialog::updateTabsAndLabels()
634{

Callers

nothing calls this directly

Calls 5

setFocusMethod · 0.80
maximumMethod · 0.80
setModelMethod · 0.45
clearMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected