Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
sendcoinsdialog.h
Go to the documentation of this file.
1// Copyright (c) 2011-2016 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_SENDCOINSDIALOG_H
6#define BITCOIN_QT_SENDCOINSDIALOG_H
7
8#include <qt/clientmodel.h>
9#include <qt/walletmodel.h>
10
11#include <QDialog>
12#include <QMessageBox>
13#include <QString>
14#include <QTimer>
15
16class CCoinControl;
17class PlatformStyle;
18class SendCoinsEntry;
20enum class SynchronizationState;
21
22namespace Ui {
23class SendCoinsDialog;
24}
25
27class QUrl;
29
31class SendCoinsDialog : public QDialog {
33
34public:
36 QWidget *parent = nullptr);
38
41
47 QWidget *setupTabChain(QWidget *prev);
48
49 void setAddress(const QString &address);
50 void pasteEntry(const SendCoinsRecipient &rv);
51 bool handlePaymentRequest(const SendCoinsRecipient &recipient);
52
53public Q_SLOTS:
54 void clear();
55 void reject() override;
56 void accept() override;
60
62 void coinsSent(const uint256 &txid);
63
64private:
65 Ui::SendCoinsDialog *ui;
68 std::unique_ptr<CCoinControl> m_coin_control;
69 std::unique_ptr<WalletModelTransaction> m_current_transaction;
73
74 // Process WalletModel::SendCoinsReturn and generate a pair consisting of a
75 // message and message flags for use in Q_EMIT message().
76 // Additional parameter msgArg can be used via .arg(msgArg).
77 void
79 const QString &msgArg = QString());
81 // Format confirmation message
85 // Update the passed in CCoinControl with state from the GUI
87
88private Q_SLOTS:
92 void removeEntry(SendCoinsEntry *entry);
94 void updateDisplayUnit();
98 void coinControlChangeEdited(const QString &);
111 void updateSmartFeeLabel();
112
114 // Fired when a message should be reported to the user
115 void message(const QString &title, const QString &message,
116 unsigned int style);
117};
118
119#define SEND_CONFIRM_DELAY 3
120
121class SendConfirmationDialog : public QMessageBox {
123
124public:
125 SendConfirmationDialog(const QString &title, const QString &text,
126 const QString &informative_text = "",
127 const QString &detailed_text = "",
129 const QString &confirmText = "Send",
130 QWidget *parent = nullptr);
131 int exec() override;
132
133private Q_SLOTS:
134 void countDown();
135 void updateYesButton();
136
137private:
142};
143
144#endif // BITCOIN_QT_SENDCOINSDIALOG_H
Coin Control Features.
Definition coincontrol.h:21
Model for Bitcoin network client.
Definition clientmodel.h:43
Dialog for sending bitcoins.
void useAvailableBalance(SendCoinsEntry *entry)
WalletModel * model
ClientModel * clientModel
void coinControlChangeEdited(const QString &)
void coinControlChangeChecked(int)
Ui::SendCoinsDialog * ui
void on_buttonChooseFee_clicked()
void processSendCoinsReturn(const WalletModel::SendCoinsReturn &sendCoinsReturn, const QString &msgArg=QString())
void setClientModel(ClientModel *clientModel)
std::unique_ptr< CCoinControl > m_coin_control
SendCoinsEntry * addEntry()
void updateNumberOfBlocks(int count, const QDateTime &blockDate, double nVerificationProgress, SyncType synctype, SynchronizationState sync_state)
void pasteEntry(const SendCoinsRecipient &rv)
void accept() override
const PlatformStyle * platformStyle
void coinControlClipboardQuantity()
void coinControlClipboardAfterFee()
QWidget * setupTabChain(QWidget *prev)
Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://...
bool PrepareSendText(QString &question_string, QString &informative_text, QString &detailed_text)
void setModel(WalletModel *model)
void coinControlClipboardLowOutput()
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
void setBalance(const interfaces::WalletBalances &balances)
void coinControlClipboardAmount()
void updateCoinControlState(CCoinControl &ctrl)
void setAddress(const QString &address)
void coinControlClipboardChange()
std::unique_ptr< WalletModelTransaction > m_current_transaction
void removeEntry(SendCoinsEntry *entry)
void reject() override
void message(const QString &title, const QString &message, unsigned int style)
void coinsSent(const uint256 &txid)
void on_buttonMinimizeFee_clicked()
void coinControlFeatureChanged(bool)
void minimizeFeeSection(bool fMinimize)
A single entry in the dialog for sending bitcoins.
QAbstractButton * yesButton
Interface to Bitcoin wallet from Qt view code.
Definition walletmodel.h:47
256-bit opaque blob.
Definition uint256.h:129
SyncType
Definition clientmodel.h:40
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85
#define SEND_CONFIRM_DELAY
Collection of wallet balances.
Definition wallet.h:347
static int count
Definition tests.c:31
SynchronizationState
Current sync state passed to tip changed callbacks.
Definition validation.h:114