Accept "bitcoin:" URL drops from browsers
[novacoin.git] / src / qt / sendcoinsentry.h
1 #ifndef SENDCOINSENTRY_H
2 #define SENDCOINSENTRY_H
3
4 #include <QFrame>
5
6 namespace Ui {
7     class SendCoinsEntry;
8 }
9 class WalletModel;
10 class SendCoinsRecipient;
11
12 class SendCoinsEntry : public QFrame
13 {
14     Q_OBJECT
15
16 public:
17     explicit SendCoinsEntry(QWidget *parent = 0);
18     ~SendCoinsEntry();
19
20     void setModel(WalletModel *model);
21     bool validate();
22     SendCoinsRecipient getValue();
23
24     // Return true if the entry is still empty and unedited
25     bool isClear();
26
27     void setValue(const SendCoinsRecipient &value);
28
29     // Qt messes up the tab chain by default in some cases (issue http://bugreports.qt.nokia.com/browse/QTBUG-10907)
30     // Hence we have to set it up manually
31     QWidget *setupTabChain(QWidget *prev);
32
33 public slots:
34     void setRemoveEnabled(bool enabled);
35     void clear();
36
37 signals:
38     void removeEntry(SendCoinsEntry *entry);
39
40 private slots:
41     void on_deleteButton_clicked();
42     void on_payTo_textChanged(const QString &address);
43     void on_addressBookButton_clicked();
44     void on_pasteButton_clicked();
45
46 private:
47     Ui::SendCoinsEntry *ui;
48     WalletModel *model;
49 };
50
51 #endif // SENDCOINSENTRY_H