Bitcoin ABC  0.22.12
P2P Digital Currency
sendcoinsentry.h
Go to the documentation of this file.
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.
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  Q_OBJECT
30 
31 public:
32  SendCoinsEntry(const PlatformStyle *platformStyle, WalletModel *model,
33  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 Amount amount);
46 
51  QWidget *setupTabChain(QWidget *prev);
52 
53  void setFocus();
54 
55 public Q_SLOTS:
56  void clear();
57  void checkSubtractFeeFromAmount();
58 
59 Q_SIGNALS:
60  void removeEntry(SendCoinsEntry *entry);
61  void useAvailableBalance(SendCoinsEntry *entry);
62  void payAmountChanged();
63  void subtractFeeFromAmountChanged();
64 
65 private Q_SLOTS:
66  void deleteClicked();
67  void useAvailableBalanceClicked();
68  void on_payTo_textChanged(const QString &address);
69  void on_addressBookButton_clicked();
70  void on_pasteButton_clicked();
71  void updateDisplayUnit();
72 
73 private:
75  Ui::SendCoinsEntry *ui;
78 
79  bool updateLabel(const QString &address);
80 };
81 
82 #endif // BITCOIN_QT_SENDCOINSENTRY_H
Ui::SendCoinsEntry * ui
Definition: amount.h:17
A single entry in the dialog for sending bitcoins.
WalletModel * model
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:47
SendCoinsRecipient recipient
const PlatformStyle * platformStyle
Top-level interface for a bitcoin node (bitcoind process).
Definition: node.h:45