aboutsummaryrefslogtreecommitdiff
path: root/src/qt/sendcoinsentry.cpp
diff options
context:
space:
mode:
authorPhilip Kaufmann <phil.kaufmann@t-online.de>2013-11-22 13:53:05 +0100
committerPhilip Kaufmann <phil.kaufmann@t-online.de>2013-11-24 16:30:14 +0100
commit84b695cc9d4dc90b1ccb99e2d92e1e76e138d911 (patch)
tree70576340fb9a7ff88c2448111ba032fa74565297 /src/qt/sendcoinsentry.cpp
parentd4cda964d29e370a4b433334b7fe4dcd9fe8b0c6 (diff)
downloadbitcoin-84b695cc9d4dc90b1ccb99e2d92e1e76e138d911.tar.xz
[Qt] allow deletion of payment-requests in sendcoins
- this adds a delete button for insecure and secure payment requests in the sendcoins dialog - it also enables the delete button even for single and empty entries, as this is much easier to handle and doesn't need to special case single entries - big parts of the ui file were changed, because I copied the delete button and had to delete the layout too and created it from scratch (which seems to cleanup the rows and colums in the layout also, which is nice IMHO)
Diffstat (limited to 'src/qt/sendcoinsentry.cpp')
-rw-r--r--src/qt/sendcoinsentry.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/qt/sendcoinsentry.cpp b/src/qt/sendcoinsentry.cpp
index 2641a66af4..4be8bf9ebf 100644
--- a/src/qt/sendcoinsentry.cpp
+++ b/src/qt/sendcoinsentry.cpp
@@ -75,15 +75,13 @@ void SendCoinsEntry::setModel(WalletModel *model)
connect(model->getOptionsModel(), SIGNAL(displayUnitChanged(int)), this, SLOT(updateDisplayUnit()));
connect(ui->payAmount, SIGNAL(textChanged()), this, SIGNAL(payAmountChanged()));
+ connect(ui->deleteButton, SIGNAL(clicked()), this, SLOT(deleteClicked()));
+ connect(ui->deleteButton_is, SIGNAL(clicked()), this, SLOT(deleteClicked()));
+ connect(ui->deleteButton_s, SIGNAL(clicked()), this, SLOT(deleteClicked()));
clear();
}
-void SendCoinsEntry::setRemoveEnabled(bool enabled)
-{
- ui->deleteButton->setEnabled(enabled);
-}
-
void SendCoinsEntry::clear()
{
// clear UI elements for normal payment
@@ -105,7 +103,7 @@ void SendCoinsEntry::clear()
updateDisplayUnit();
}
-void SendCoinsEntry::on_deleteButton_clicked()
+void SendCoinsEntry::deleteClicked()
{
emit removeEntry(this);
}