[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)
This commit is contained in:
Philip Kaufmann
2013-11-22 13:53:05 +01:00
parent d4cda964d2
commit 84b695cc9d
5 changed files with 162 additions and 134 deletions

View File

@@ -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);
}