Add const to methods that do not modify the object for which it is called
[bitcoinplatinum.git] / src / qt / sendcoinsentry.h
bloba8be670c2aa036199a6d8ef37f8f1506a3cdc842
1 // Copyright (c) 2011-2015 The Bitcoin Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 #ifndef BITCOIN_QT_SENDCOINSENTRY_H
6 #define BITCOIN_QT_SENDCOINSENTRY_H
8 #include "walletmodel.h"
10 #include <QStackedWidget>
12 class WalletModel;
13 class PlatformStyle;
15 namespace Ui {
16 class SendCoinsEntry;
19 /**
20 * A single entry in the dialog for sending bitcoins.
21 * Stacked widget, with different UIs for payment requests
22 * with a strong payee identity.
24 class SendCoinsEntry : public QStackedWidget
26 Q_OBJECT
28 public:
29 explicit SendCoinsEntry(const PlatformStyle *platformStyle, QWidget *parent = 0);
30 ~SendCoinsEntry();
32 void setModel(WalletModel *model);
33 bool validate();
34 SendCoinsRecipient getValue();
36 /** Return whether the entry is still empty and unedited */
37 bool isClear();
39 void setValue(const SendCoinsRecipient &value);
40 void setAddress(const QString &address);
42 /** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases
43 * (issue https://bugreports.qt-project.org/browse/QTBUG-10907).
45 QWidget *setupTabChain(QWidget *prev);
47 void setFocus();
49 public Q_SLOTS:
50 void clear();
52 Q_SIGNALS:
53 void removeEntry(SendCoinsEntry *entry);
54 void payAmountChanged();
55 void subtractFeeFromAmountChanged();
57 private Q_SLOTS:
58 void deleteClicked();
59 void on_payTo_textChanged(const QString &address);
60 void on_addressBookButton_clicked();
61 void on_pasteButton_clicked();
62 void updateDisplayUnit();
64 private:
65 SendCoinsRecipient recipient;
66 Ui::SendCoinsEntry *ui;
67 WalletModel *model;
68 const PlatformStyle *platformStyle;
70 bool updateLabel(const QString &address);
73 #endif // BITCOIN_QT_SENDCOINSENTRY_H