Bitcoin Core  0.20.99
P2P Digital Currency
sendcoinsentry.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2019 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.
4 
5 #ifndef BITCOIN_QT_SENDCOINSENTRY_H
6 #define BITCOIN_QT_SENDCOINSENTRY_H
7 
9 
10 #include <QStackedWidget>
11 
12 class WalletModel;
13 class PlatformStyle;
14 
15 namespace interfaces {
16 class Node;
17 } // namespace interfaces
18 
19 namespace Ui {
20  class SendCoinsEntry;
21 }
22 
28 class SendCoinsEntry : public QStackedWidget
29 {
30  Q_OBJECT
31 
32 public:
33  explicit SendCoinsEntry(const PlatformStyle *platformStyle, QWidget *parent = nullptr);
34  ~SendCoinsEntry();
35 
36  void setModel(WalletModel *model);
37  bool validate(interfaces::Node& node);
38  SendCoinsRecipient getValue();
39 
41  bool isClear();
42 
43  void setValue(const SendCoinsRecipient &value);
44  void setAddress(const QString &address);
45  void setAmount(const CAmount &amount);
46 
50  QWidget *setupTabChain(QWidget *prev);
51 
52  void setFocus();
53 
54 public Q_SLOTS:
55  void clear();
56  void checkSubtractFeeFromAmount();
57 
58 Q_SIGNALS:
59  void removeEntry(SendCoinsEntry *entry);
60  void useAvailableBalance(SendCoinsEntry* entry);
61  void payAmountChanged();
62  void subtractFeeFromAmountChanged();
63 
64 private Q_SLOTS:
65  void deleteClicked();
66  void useAvailableBalanceClicked();
67  void on_payTo_textChanged(const QString &address);
68  void on_addressBookButton_clicked();
69  void on_pasteButton_clicked();
70  void updateDisplayUnit();
71 
72 private:
74  Ui::SendCoinsEntry *ui;
77 
78  bool updateLabel(const QString &address);
79 };
80 
81 #endif // BITCOIN_QT_SENDCOINSENTRY_H
Ui::SendCoinsEntry * ui
A single entry in the dialog for sending bitcoins.
disconnectpool queuedTx clear()
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
WalletModel * model
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:51
SendCoinsRecipient recipient
const PlatformStyle * platformStyle
Top-level interface for a bitcoin node (bitcoind process).
Definition: node.h:43