| 608 | } |
| 609 | |
| 610 | SendCoinsEntry *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 | |
| 633 | void SendCoinsDialog::updateTabsAndLabels() |
| 634 | { |