Accept "bitcoin:" URL drops from browsers
[novacoin.git] / src / qt / sendcoinsdialog.h
1 #ifndef SENDCOINSDIALOG_H
2 #define SENDCOINSDIALOG_H
3
4 #include <QDialog>
5
6 namespace Ui {
7     class SendCoinsDialog;
8 }
9 class WalletModel;
10 class SendCoinsEntry;
11 class SendCoinsRecipient;
12
13 QT_BEGIN_NAMESPACE
14 class QUrl;
15 QT_END_NAMESPACE
16
17 class SendCoinsDialog : public QDialog
18 {
19     Q_OBJECT
20
21 public:
22     explicit SendCoinsDialog(QWidget *parent = 0);
23     ~SendCoinsDialog();
24
25     void setModel(WalletModel *model);
26
27     // Qt messes up the tab chain by default in some cases (issue http://bugreports.qt.nokia.com/browse/QTBUG-10907)
28     // Hence we have to set it up manually
29     QWidget *setupTabChain(QWidget *prev);
30
31     void pasteEntry(const SendCoinsRecipient &rv);
32     void handleURL(const QUrl *url);
33
34 public slots:
35     void clear();
36     void reject();
37     void accept();
38     SendCoinsEntry *addEntry();
39     void updateRemoveEnabled();
40
41 private:
42     Ui::SendCoinsDialog *ui;
43     WalletModel *model;
44
45 private slots:
46     void on_sendButton_clicked();
47
48     void removeEntry(SendCoinsEntry* entry);
49 };
50
51 #endif // SENDCOINSDIALOG_H