mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-29 13:32:33 +02:00
qt, refactor: Drop unused QFrame
s in SendCoinsEntry
This commit is contained in:
parent
269fa667f2
commit
6420fb2005
File diff suppressed because it is too large
Load Diff
@ -30,25 +30,18 @@ SendCoinsEntry::SendCoinsEntry(const PlatformStyle *_platformStyle, QWidget *par
|
|||||||
ui->addressBookButton->setIcon(platformStyle->SingleColorIcon(":/icons/address-book"));
|
ui->addressBookButton->setIcon(platformStyle->SingleColorIcon(":/icons/address-book"));
|
||||||
ui->pasteButton->setIcon(platformStyle->SingleColorIcon(":/icons/editpaste"));
|
ui->pasteButton->setIcon(platformStyle->SingleColorIcon(":/icons/editpaste"));
|
||||||
ui->deleteButton->setIcon(platformStyle->SingleColorIcon(":/icons/remove"));
|
ui->deleteButton->setIcon(platformStyle->SingleColorIcon(":/icons/remove"));
|
||||||
ui->deleteButton_is->setIcon(platformStyle->SingleColorIcon(":/icons/remove"));
|
|
||||||
ui->deleteButton_s->setIcon(platformStyle->SingleColorIcon(":/icons/remove"));
|
|
||||||
|
|
||||||
setCurrentWidget(ui->SendCoins);
|
setCurrentWidget(ui->SendCoins);
|
||||||
|
|
||||||
if (platformStyle->getUseExtraSpacing())
|
if (platformStyle->getUseExtraSpacing())
|
||||||
ui->payToLayout->setSpacing(4);
|
ui->payToLayout->setSpacing(4);
|
||||||
|
|
||||||
// normal bitcoin address field
|
|
||||||
GUIUtil::setupAddressWidget(ui->payTo, this);
|
GUIUtil::setupAddressWidget(ui->payTo, this);
|
||||||
// just a label for displaying bitcoin address(es)
|
|
||||||
ui->payTo_is->setFont(GUIUtil::fixedPitchFont());
|
|
||||||
|
|
||||||
// Connect signals
|
// Connect signals
|
||||||
connect(ui->payAmount, &BitcoinAmountField::valueChanged, this, &SendCoinsEntry::payAmountChanged);
|
connect(ui->payAmount, &BitcoinAmountField::valueChanged, this, &SendCoinsEntry::payAmountChanged);
|
||||||
connect(ui->checkboxSubtractFeeFromAmount, &QCheckBox::toggled, this, &SendCoinsEntry::subtractFeeFromAmountChanged);
|
connect(ui->checkboxSubtractFeeFromAmount, &QCheckBox::toggled, this, &SendCoinsEntry::subtractFeeFromAmountChanged);
|
||||||
connect(ui->deleteButton, &QPushButton::clicked, this, &SendCoinsEntry::deleteClicked);
|
connect(ui->deleteButton, &QPushButton::clicked, this, &SendCoinsEntry::deleteClicked);
|
||||||
connect(ui->deleteButton_is, &QPushButton::clicked, this, &SendCoinsEntry::deleteClicked);
|
|
||||||
connect(ui->deleteButton_s, &QPushButton::clicked, this, &SendCoinsEntry::deleteClicked);
|
|
||||||
connect(ui->useAvailableBalanceButton, &QPushButton::clicked, this, &SendCoinsEntry::useAvailableBalanceClicked);
|
connect(ui->useAvailableBalanceButton, &QPushButton::clicked, this, &SendCoinsEntry::useAvailableBalanceClicked);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -103,14 +96,6 @@ void SendCoinsEntry::clear()
|
|||||||
ui->messageTextLabel->clear();
|
ui->messageTextLabel->clear();
|
||||||
ui->messageTextLabel->hide();
|
ui->messageTextLabel->hide();
|
||||||
ui->messageLabel->hide();
|
ui->messageLabel->hide();
|
||||||
// clear UI elements for unauthenticated payment request
|
|
||||||
ui->payTo_is->clear();
|
|
||||||
ui->memoTextLabel_is->clear();
|
|
||||||
ui->payAmount_is->clear();
|
|
||||||
// clear UI elements for authenticated payment request
|
|
||||||
ui->payTo_s->clear();
|
|
||||||
ui->memoTextLabel_s->clear();
|
|
||||||
ui->payAmount_s->clear();
|
|
||||||
|
|
||||||
// update the display unit, to not use the default ("BTC")
|
// update the display unit, to not use the default ("BTC")
|
||||||
updateDisplayUnit();
|
updateDisplayUnit();
|
||||||
@ -219,7 +204,7 @@ void SendCoinsEntry::setAmount(const CAmount &amount)
|
|||||||
|
|
||||||
bool SendCoinsEntry::isClear()
|
bool SendCoinsEntry::isClear()
|
||||||
{
|
{
|
||||||
return ui->payTo->text().isEmpty() && ui->payTo_is->text().isEmpty() && ui->payTo_s->text().isEmpty();
|
return ui->payTo->text().isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendCoinsEntry::setFocus()
|
void SendCoinsEntry::setFocus()
|
||||||
@ -229,12 +214,8 @@ void SendCoinsEntry::setFocus()
|
|||||||
|
|
||||||
void SendCoinsEntry::updateDisplayUnit()
|
void SendCoinsEntry::updateDisplayUnit()
|
||||||
{
|
{
|
||||||
if(model && model->getOptionsModel())
|
if (model && model->getOptionsModel()) {
|
||||||
{
|
|
||||||
// Update payAmount with the current unit
|
|
||||||
ui->payAmount->setDisplayUnit(model->getOptionsModel()->getDisplayUnit());
|
ui->payAmount->setDisplayUnit(model->getOptionsModel()->getDisplayUnit());
|
||||||
ui->payAmount_is->setDisplayUnit(model->getOptionsModel()->getDisplayUnit());
|
|
||||||
ui->payAmount_s->setDisplayUnit(model->getOptionsModel()->getDisplayUnit());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -244,8 +225,6 @@ void SendCoinsEntry::changeEvent(QEvent* e)
|
|||||||
ui->addressBookButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/address-book")));
|
ui->addressBookButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/address-book")));
|
||||||
ui->pasteButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/editpaste")));
|
ui->pasteButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/editpaste")));
|
||||||
ui->deleteButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
|
ui->deleteButton->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
|
||||||
ui->deleteButton_is->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
|
|
||||||
ui->deleteButton_s->setIcon(platformStyle->SingleColorIcon(QStringLiteral(":/icons/remove")));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QStackedWidget::changeEvent(e);
|
QStackedWidget::changeEvent(e);
|
||||||
|
Loading…
Reference in New Issue
Block a user