Bitcoin Core  27.99.0
P2P Digital Currency
sendcoinsentry.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2022 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 <QWidget>
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 
26 class SendCoinsEntry : public QWidget
27 {
28  Q_OBJECT
29 
30 public:
31  explicit SendCoinsEntry(const PlatformStyle *platformStyle, QWidget *parent = nullptr);
33 
34  void setModel(WalletModel *model);
37 
39  bool isClear();
40 
41  void setValue(const SendCoinsRecipient &value);
42  void setAddress(const QString &address);
43  void setAmount(const CAmount &amount);
44 
48  QWidget *setupTabChain(QWidget *prev);
49 
50  void setFocus();
51 
52 public Q_SLOTS:
53  void clear();
55 
56 Q_SIGNALS:
61 
62 private Q_SLOTS:
63  void deleteClicked();
65  void on_payTo_textChanged(const QString &address);
68  void updateDisplayUnit();
69 
70 protected:
71  void changeEvent(QEvent* e) override;
72 
73 private:
75  Ui::SendCoinsEntry *ui;
76  WalletModel* model{nullptr};
78 
79  bool updateLabel(const QString &address);
80 };
81 
82 #endif // BITCOIN_QT_SENDCOINSENTRY_H
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
A single entry in the dialog for sending bitcoins.
WalletModel * model
void setFocus()
bool updateLabel(const QString &address)
void setAddress(const QString &address)
bool isClear()
Return whether the entry is still empty and unedited.
void subtractFeeFromAmountChanged()
void useAvailableBalance(SendCoinsEntry *entry)
~SendCoinsEntry()
SendCoinsRecipient recipient
void setValue(const SendCoinsRecipient &value)
void changeEvent(QEvent *e) override
void updateDisplayUnit()
void on_payTo_textChanged(const QString &address)
void on_pasteButton_clicked()
SendCoinsEntry(const PlatformStyle *platformStyle, QWidget *parent=nullptr)
void setModel(WalletModel *model)
void useAvailableBalanceClicked()
void removeEntry(SendCoinsEntry *entry)
void payAmountChanged()
void setAmount(const CAmount &amount)
QWidget * setupTabChain(QWidget *prev)
Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://...
const PlatformStyle * platformStyle
void deleteClicked()
void clear()
void on_addressBookButton_clicked()
bool validate(interfaces::Node &node)
Ui::SendCoinsEntry * ui
void checkSubtractFeeFromAmount()
SendCoinsRecipient getValue()
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:48
Top-level interface for a bitcoin node (bitcoind process).
Definition: node.h:70
Definition: init.h:25