Bitcoin Core  22.0.0
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);
35 
36  void setModel(WalletModel *model);
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();
57 
58 Q_SIGNALS:
59  void removeEntry(SendCoinsEntry *entry);
61  void payAmountChanged();
63 
64 private Q_SLOTS:
65  void deleteClicked();
67  void on_payTo_textChanged(const QString &address);
70  void updateDisplayUnit();
71 
72 protected:
73  void changeEvent(QEvent* e) override;
74 
75 private:
77  Ui::SendCoinsEntry *ui;
80 
81  bool updateLabel(const QString &address);
82 };
83 
84 #endif // BITCOIN_QT_SENDCOINSENTRY_H
Ui::SendCoinsEntry * ui
void setValue(const SendCoinsRecipient &value)
void payAmountChanged()
void setFocus()
SendCoinsRecipient getValue()
void setAddress(const QString &address)
~SendCoinsEntry()
bool updateLabel(const QString &address)
void deleteClicked()
void on_payTo_textChanged(const QString &address)
void updateDisplayUnit()
A single entry in the dialog for sending bitcoins.
QWidget * setupTabChain(QWidget *prev)
Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://...
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
void clear()
bool validate(interfaces::Node &node)
void removeEntry(SendCoinsEntry *entry)
void checkSubtractFeeFromAmount()
bool isClear()
Return whether the entry is still empty and unedited.
void subtractFeeFromAmountChanged()
void on_pasteButton_clicked()
WalletModel * model
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:51
SendCoinsEntry(const PlatformStyle *platformStyle, QWidget *parent=nullptr)
SendCoinsRecipient recipient
void setAmount(const CAmount &amount)
void on_addressBookButton_clicked()
void setModel(WalletModel *model)
void useAvailableBalance(SendCoinsEntry *entry)
const PlatformStyle * platformStyle
void useAvailableBalanceClicked()
Top-level interface for a bitcoin node (bitcoind process).
Definition: node.h:54
void changeEvent(QEvent *e) override