Add UpdatedBlockTip signal to CMainSignals and CValidationInterface
[bitcoinplatinum.git] / src / qt / sendcoinsdialog.h
blob391905ffcd7ac06d657f9af90a9efa5c56987d7c
1 // Copyright (c) 2011-2013 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.
5 #ifndef BITCOIN_QT_SENDCOINSDIALOG_H
6 #define BITCOIN_QT_SENDCOINSDIALOG_H
8 #include "walletmodel.h"
10 #include <QDialog>
11 #include <QString>
13 class ClientModel;
14 class OptionsModel;
15 class PlatformStyle;
16 class SendCoinsEntry;
17 class SendCoinsRecipient;
19 namespace Ui {
20 class SendCoinsDialog;
23 QT_BEGIN_NAMESPACE
24 class QUrl;
25 QT_END_NAMESPACE
27 const int defaultConfirmTarget = 25;
29 /** Dialog for sending bitcoins */
30 class SendCoinsDialog : public QDialog
32 Q_OBJECT
34 public:
35 explicit SendCoinsDialog(const PlatformStyle *platformStyle, QWidget *parent = 0);
36 ~SendCoinsDialog();
38 void setClientModel(ClientModel *clientModel);
39 void setModel(WalletModel *model);
41 /** Set up the tab chain manually, as Qt messes up the tab chain by default in some cases (issue https://bugreports.qt-project.org/browse/QTBUG-10907).
43 QWidget *setupTabChain(QWidget *prev);
45 void setAddress(const QString &address);
46 void pasteEntry(const SendCoinsRecipient &rv);
47 bool handlePaymentRequest(const SendCoinsRecipient &recipient);
49 public Q_SLOTS:
50 void clear();
51 void reject();
52 void accept();
53 SendCoinsEntry *addEntry();
54 void updateTabsAndLabels();
55 void setBalance(const CAmount& balance, const CAmount& unconfirmedBalance, const CAmount& immatureBalance,
56 const CAmount& watchOnlyBalance, const CAmount& watchUnconfBalance, const CAmount& watchImmatureBalance);
58 private:
59 Ui::SendCoinsDialog *ui;
60 ClientModel *clientModel;
61 WalletModel *model;
62 bool fNewRecipientAllowed;
63 bool fFeeMinimized;
64 const PlatformStyle *platformStyle;
66 // Process WalletModel::SendCoinsReturn and generate a pair consisting
67 // of a message and message flags for use in Q_EMIT message().
68 // Additional parameter msgArg can be used via .arg(msgArg).
69 void processSendCoinsReturn(const WalletModel::SendCoinsReturn &sendCoinsReturn, const QString &msgArg = QString());
70 void minimizeFeeSection(bool fMinimize);
71 void updateFeeMinimizedLabel();
73 private Q_SLOTS:
74 void on_sendButton_clicked();
75 void on_buttonChooseFee_clicked();
76 void on_buttonMinimizeFee_clicked();
77 void removeEntry(SendCoinsEntry* entry);
78 void updateDisplayUnit();
79 void coinControlFeatureChanged(bool);
80 void coinControlButtonClicked();
81 void coinControlChangeChecked(int);
82 void coinControlChangeEdited(const QString &);
83 void coinControlUpdateLabels();
84 void coinControlClipboardQuantity();
85 void coinControlClipboardAmount();
86 void coinControlClipboardFee();
87 void coinControlClipboardAfterFee();
88 void coinControlClipboardBytes();
89 void coinControlClipboardPriority();
90 void coinControlClipboardLowOutput();
91 void coinControlClipboardChange();
92 void setMinimumFee();
93 void updateFeeSectionControls();
94 void updateMinFeeLabel();
95 void updateSmartFeeLabel();
96 void updateGlobalFeeVariables();
98 Q_SIGNALS:
99 // Fired when a message should be reported to the user
100 void message(const QString &title, const QString &message, unsigned int style);
103 #endif // BITCOIN_QT_SENDCOINSDIALOG_H