Fabcoin Core  0.16.2
P2P Digital Currency
sendcoinsdialog.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2017 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 FABCOIN_QT_SENDCOINSDIALOG_H
6 #define FABCOIN_QT_SENDCOINSDIALOG_H
7 
8 #include <walletmodel.h>
9 
10 #include <QDialog>
11 #include <QMessageBox>
12 #include <QString>
13 #include <QTimer>
14 
15 class ClientModel;
16 class PlatformStyle;
17 class SendCoinsEntry;
18 class SendCoinsRecipient;
19 
20 namespace Ui {
21  class SendCoinsDialog;
22 }
23 
24 QT_BEGIN_NAMESPACE
25 class QUrl;
26 QT_END_NAMESPACE
27 
29 class SendCoinsDialog : public QDialog
30 {
31  Q_OBJECT
32 
33 public:
34  explicit SendCoinsDialog(const PlatformStyle *platformStyle, QWidget *parent = 0);
35  ~SendCoinsDialog();
36 
37  void setClientModel(ClientModel *clientModel);
38  void setModel(WalletModel *model);
39 
42  QWidget *setupTabChain(QWidget *prev);
43 
44  void setAddress(const QString &address);
45  void pasteEntry(const SendCoinsRecipient &rv);
46  bool handlePaymentRequest(const SendCoinsRecipient &recipient);
47 
48 public Q_SLOTS:
49  void clear();
50  void reject();
51  void accept();
52  SendCoinsEntry *addEntry();
53  void updateTabsAndLabels();
54  void setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance, const CAmount& stake,
55  const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance, const CAmount& watchOnlyStake);
56 
57 private:
63 
64  // Process WalletModel::SendCoinsReturn and generate a pair consisting
65  // of a message and message flags for use in Q_EMIT message().
66  // Additional parameter msgArg can be used via .arg(msgArg).
67  void processSendCoinsReturn(const WalletModel::SendCoinsReturn &sendCoinsReturn, const QString &msgArg = QString());
68  // Update the passed in CCoinControl with state from the GUI
69  void updateCoinControlState(CCoinControl& ctrl);
70 
71 private Q_SLOTS:
72  void on_sendButton_clicked();
73  void removeEntry(SendCoinsEntry* entry);
74  void updateDisplayUnit();
75  void coinControlFeatureChanged(bool);
76  void coinControlButtonClicked();
77  void coinControlChangeChecked(int);
78  void coinControlChangeEdited(const QString &);
79  void coinControlUpdateLabels();
80  void coinControlClipboardQuantity();
81  void coinControlClipboardAmount();
82  void coinControlClipboardFee();
83  void coinControlClipboardAfterFee();
84  void coinControlClipboardBytes();
85  void coinControlClipboardLowOutput();
86  void coinControlClipboardChange();
87  void setMinimumFee();
88  void updateFeeSectionControls();
89  void updateMinFeeLabel();
90  void updateSmartFeeLabel();
91 
92 Q_SIGNALS:
93  // Fired when a message should be reported to the user
94  void message(const QString &title, const QString &message, unsigned int style);
95 };
96 
97 
98 #define SEND_CONFIRM_DELAY 3
99 
100 class SendConfirmationDialog : public QMessageBox
101 {
102  Q_OBJECT
103 
104 public:
105  SendConfirmationDialog(const QString &title, const QString &text, int secDelay = SEND_CONFIRM_DELAY, QWidget *parent = 0);
106  int exec();
107 
108 private Q_SLOTS:
109  void countDown();
110  void updateYesButton();
111 
112 private:
113  QAbstractButton *yesButton;
115  int secDelay;
116 };
117 
118 #endif // FABCOIN_QT_SENDCOINSDIALOG_H
struct evm_uint256be balance(struct evm_env *env, struct evm_uint160be address)
Definition: capi.c:7
#define SEND_CONFIRM_DELAY
A single entry in the dialog for sending fabcoins.
Coin Control Features.
Definition: coincontrol.h:16
int64_t CAmount
Amount in lius (Can be negative)
Definition: amount.h:15
Ui::SendCoinsDialog * ui
ClientModel * clientModel
WalletModel * model
Dialog for sending fabcoins.
Model for Fabcoin network client.
Definition: clientmodel.h:38
Interface to Fabcoin wallet from Qt view code.
Definition: walletmodel.h:103
const PlatformStyle * platformStyle
struct evm_uint160be address(struct evm_env *env)
Definition: capi.c:13
QAbstractButton * yesButton