Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

sendcoinsdialog.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_SENDCOINSDIALOG_H
6 #define BITCOIN_QT_SENDCOINSDIALOG_H
7 
8 #include <qt/walletmodel.h>
9 
10 #include <QDialog>
11 #include <QMessageBox>
12 #include <QShowEvent>
13 #include <QString>
14 #include <QTimer>
15 
16 static const int MAX_SEND_POPUP_ENTRIES = 10;
17 
18 class ClientModel;
19 class SendCoinsEntry;
20 class SendCoinsRecipient;
21 
22 namespace Ui {
23  class SendCoinsDialog;
24 }
25 
26 QT_BEGIN_NAMESPACE
27 class QUrl;
28 QT_END_NAMESPACE
29 
31 class SendCoinsDialog : public QDialog
32 {
33  Q_OBJECT
34 
35 public:
36  explicit SendCoinsDialog(bool fPrivateSend = false, QWidget* parent = 0);
38 
40  void setModel(WalletModel *model);
41 
44  QWidget *setupTabChain(QWidget *prev);
45 
46  void setAddress(const QString &address);
47  void pasteEntry(const SendCoinsRecipient &rv);
48  bool handlePaymentRequest(const SendCoinsRecipient &recipient);
49 
50 public Q_SLOTS:
51  void clear();
52  void reject();
53  void accept();
55  void updateTabsAndLabels();
56  void setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance, const CAmount& anonymizedBalance,
57  const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance);
58 
59 private:
60  Ui::SendCoinsDialog *ui;
64  void send(QList<SendCoinsRecipient> recipients);
67 
68  // Process WalletModel::SendCoinsReturn and generate a pair consisting
69  // of a message and message flags for use in Q_EMIT message().
70  // Additional parameter msgArg can be used via .arg(msgArg).
71  void processSendCoinsReturn(const WalletModel::SendCoinsReturn &sendCoinsReturn, const QString &msgArg = QString());
72  void minimizeFeeSection(bool fMinimize);
74  // Update the passed in CCoinControl with state from the GUI
76 
77  void showEvent(QShowEvent* event);
78 
79 private Q_SLOTS:
80  void on_sendButton_clicked();
83  void removeEntry(SendCoinsEntry* entry);
85  void updateDisplayUnit();
86  void coinControlFeatureChanged(bool);
88  void coinControlChangeChecked(int);
89  void coinControlChangeEdited(const QString &);
98  void setMinimumFee();
100  void updateMinFeeLabel();
101  void updateSmartFeeLabel();
102 
103 Q_SIGNALS:
104  // Fired when a message should be reported to the user
105  void message(const QString &title, const QString &message, unsigned int style);
106 };
107 
108 
109 
110 class SendConfirmationDialog : public QMessageBox
111 {
112  Q_OBJECT
113 
114 public:
115  SendConfirmationDialog(const QString &title, const QString &text, int secDelay = 0, QWidget *parent = 0);
116  int exec();
117 
118 private Q_SLOTS:
119  void countDown();
120  void updateYesButton();
121 
122 private:
123  QAbstractButton *yesButton;
125  int secDelay;
126 };
127 
128 #endif // BITCOIN_QT_SENDCOINSDIALOG_H
void removeEntry(SendCoinsEntry *entry)
void updateFeeMinimizedLabel()
void on_buttonChooseFee_clicked()
void coinControlClipboardQuantity()
void coinControlClipboardAfterFee()
void updateCoinControlState(CCoinControl &ctrl)
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
void send(QList< SendCoinsRecipient > recipients)
A single entry in the dialog for sending bitcoins.
Coin Control Features.
Definition: coincontrol.h:28
void coinControlFeatureChanged(bool)
int64_t CAmount
Amount in satoshis (Can be negative)
Definition: amount.h:12
QWidget * setupTabChain(QWidget *prev)
Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://...
Ui::SendCoinsDialog * ui
SendCoinsEntry * addEntry()
void setAddress(const QString &address)
void coinControlClipboardChange()
void useAvailableBalance(SendCoinsEntry *entry)
void setClientModel(ClientModel *clientModel)
ClientModel * clientModel
void showEvent(QShowEvent *event)
SendCoinsDialog(bool fPrivateSend=false, QWidget *parent=0)
WalletModel * model
Dialog for sending bitcoins.
void coinControlChangeEdited(const QString &)
Model for Dash network client.
Definition: clientmodel.h:42
void coinControlUpdateLabels()
void setModel(WalletModel *model)
void coinControlClipboardLowOutput()
void minimizeFeeSection(bool fMinimize)
void updateFeeSectionControls()
SendConfirmationDialog(const QString &title, const QString &text, int secDelay=0, QWidget *parent=0)
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:100
static const int MAX_SEND_POPUP_ENTRIES
void processSendCoinsReturn(const WalletModel::SendCoinsReturn &sendCoinsReturn, const QString &msgArg=QString())
void coinControlClipboardBytes()
void coinControlClipboardAmount()
void on_buttonMinimizeFee_clicked()
void pasteEntry(const SendCoinsRecipient &rv)
QAbstractButton * yesButton
void message(const QString &title, const QString &message, unsigned int style)
void setBalance(const CAmount &balance, const CAmount &unconfirmedBalance, const CAmount &immatureBalance, const CAmount &anonymizedBalance, const CAmount &watchOnlyBalance, const CAmount &watchUnconfBalance, const CAmount &watchImmatureBalance)
void coinControlButtonClicked()
void coinControlClipboardFee()
void coinControlChangeChecked(int)
Released under the MIT license