blob: 6f459fb6690c0c2100fb5c09e4ad32b25e409ee7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#include "sendcoinsdialog.h"
#include "ui_sendcoinsdialog.h"
#include "addressbookdialog.h"
#include "bitcoinaddressvalidator.h"
#include <QApplication>
#include <QClipboard>
SendCoinsDialog::SendCoinsDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::SendCoinsDialog)
{
ui->setupUi(this);
ui->payTo->setValidator(new BitcoinAddressValidator(this));
ui->payAmount->setValidator(new QDoubleValidator(this));
}
SendCoinsDialog::~SendCoinsDialog()
{
delete ui;
}
void SendCoinsDialog::on_sendButton_clicked()
{
accept();
}
void SendCoinsDialog::on_pasteButton_clicked()
{
/* Paste text from clipboard into recipient field */
ui->payTo->setText(QApplication::clipboard()->text());
}
void SendCoinsDialog::on_addressBookButton_clicked()
{
AddressBookDialog dlg;
dlg.exec();
ui->payTo->setText(dlg.getReturnValue());
}
void SendCoinsDialog::on_buttonBox_rejected()
{
reject();
}
|