You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

70 lines
1.6 KiB

// Copyright (c) 2011-2013 The Bitcoin developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or
#include "walletmodel.h"
#include <QStackedWidget>
class WalletModel;
namespace Ui {
class SendCoinsEntry;
* A single entry in the dialog for sending bitcoins.
* Stacked widget, with different UIs for payment requests
* with a strong payee identity.
class SendCoinsEntry : public QStackedWidget
explicit SendCoinsEntry(QWidget *parent = 0);
void setModel(WalletModel *model);
bool validate();
SendCoinsRecipient getValue();
/** Return whether the entry is still empty and unedited */
bool isClear();
void setValue(const SendCoinsRecipient &value);
void setAddress(const QString &address);
/** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases
* (issue
QWidget *setupTabChain(QWidget *prev);
void setFocus();
public slots:
void clear();
void removeEntry(SendCoinsEntry *entry);
void payAmountChanged();
private slots:
void deleteClicked();
void on_payTo_textChanged(const QString &address);
void on_addressBookButton_clicked();
void on_pasteButton_clicked();
void updateDisplayUnit();
SendCoinsRecipient recipient;
Ui::SendCoinsEntry *ui;
WalletModel *model;
bool updateLabel(const QString &address);