Bitcoin Core  22.99.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
interfaces
Definition: dummywallet.cpp:11
SendCoinsEntry::setAddress
void setAddress(const QString &address)
Definition: sendcoinsentry.cpp:209
SendCoinsEntry::changeEvent
void changeEvent(QEvent *e) override
Definition: sendcoinsentry.cpp:241
SendCoinsEntry::~SendCoinsEntry
~SendCoinsEntry()
Definition: sendcoinsentry.cpp:55
WalletModel
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:51
SendCoinsEntry::payAmountChanged
void payAmountChanged()
SendCoinsEntry::setValue
void setValue(const SendCoinsRecipient &value)
Definition: sendcoinsentry.cpp:192
SendCoinsEntry::updateLabel
bool updateLabel(const QString &address)
Definition: sendcoinsentry.cpp:254
SendCoinsEntry::deleteClicked
void deleteClicked()
Definition: sendcoinsentry.cpp:124
SendCoinsEntry::setFocus
void setFocus()
Definition: sendcoinsentry.cpp:225
SendCoinsEntry::setupTabChain
QWidget * setupTabChain(QWidget *prev)
Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://...
Definition: sendcoinsentry.cpp:180
SendCoinsEntry::ui
Ui::SendCoinsEntry * ui
Definition: sendcoinsentry.h:77
SendCoinsEntry::on_payTo_textChanged
void on_payTo_textChanged(const QString &address)
Definition: sendcoinsentry.cpp:79
SendCoinsEntry::clear
void clear()
Definition: sendcoinsentry.cpp:94
SendCoinsEntry::updateDisplayUnit
void updateDisplayUnit()
Definition: sendcoinsentry.cpp:230
SendCoinsRecipient
Definition: sendcoinsrecipient.h:19
SendCoinsEntry::isClear
bool isClear()
Return whether the entry is still empty and unedited.
Definition: sendcoinsentry.cpp:220
CAmount
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
SendCoinsEntry::validate
bool validate(interfaces::Node &node)
Definition: sendcoinsentry.cpp:134
SendCoinsEntry::model
WalletModel * model
Definition: sendcoinsentry.h:78
interfaces::Node
Top-level interface for a bitcoin node (bitcoind process).
Definition: node.h:54
SendCoinsEntry::setModel
void setModel(WalletModel *model)
Definition: sendcoinsentry.cpp:84
SendCoinsEntry::useAvailableBalance
void useAvailableBalance(SendCoinsEntry *entry)
Ui
Definition: addressbookpage.h:14
SendCoinsEntry::recipient
SendCoinsRecipient recipient
Definition: sendcoinsentry.h:76
SendCoinsEntry::useAvailableBalanceClicked
void useAvailableBalanceClicked()
Definition: sendcoinsentry.cpp:129
SendCoinsEntry::removeEntry
void removeEntry(SendCoinsEntry *entry)
SendCoinsEntry::SendCoinsEntry
SendCoinsEntry(const PlatformStyle *platformStyle, QWidget *parent=nullptr)
Definition: sendcoinsentry.cpp:22
SendCoinsEntry::checkSubtractFeeFromAmount
void checkSubtractFeeFromAmount()
Definition: sendcoinsentry.cpp:119
node
Definition: interfaces.cpp:68
SendCoinsEntry
A single entry in the dialog for sending bitcoins.
Definition: sendcoinsentry.h:28
SendCoinsEntry::on_addressBookButton_clicked
void on_addressBookButton_clicked()
Definition: sendcoinsentry.cpp:66
SendCoinsEntry::subtractFeeFromAmountChanged
void subtractFeeFromAmountChanged()
SendCoinsEntry::platformStyle
const PlatformStyle * platformStyle
Definition: sendcoinsentry.h:79
SendCoinsEntry::on_pasteButton_clicked
void on_pasteButton_clicked()
Definition: sendcoinsentry.cpp:60
PlatformStyle
Definition: platformstyle.h:13
SendCoinsEntry::setAmount
void setAmount(const CAmount &amount)
Definition: sendcoinsentry.cpp:215
sendcoinsrecipient.h
SendCoinsEntry::getValue
SendCoinsRecipient getValue()
Definition: sendcoinsentry.cpp:169