diff options
Diffstat (limited to 'src/qt/walletmodel.h')
-rw-r--r-- | src/qt/walletmodel.h | 35 |
1 files changed, 25 insertions, 10 deletions
diff --git a/src/qt/walletmodel.h b/src/qt/walletmodel.h index 6abcdaf8cb..f39e9dfca0 100644 --- a/src/qt/walletmodel.h +++ b/src/qt/walletmodel.h @@ -1,19 +1,24 @@ +// Copyright (c) 2011-2013 The Bitcoin developers +// Distributed under the MIT/X11 software license, see the accompanying +// file COPYING or http://www.opensource.org/licenses/mit-license.php. + #ifndef WALLETMODEL_H #define WALLETMODEL_H -#include <QObject> +#include "paymentrequestplus.h" +#include "walletmodeltransaction.h" #include "allocators.h" /* for SecureString */ -#include "wallet.h" -#include "walletmodeltransaction.h" -#include "paymentrequestplus.h" -class OptionsModel; +#include <QObject> + class AddressTableModel; +class OptionsModel; class TransactionTableModel; -class CWallet; class WalletModelTransaction; +class CWallet; + QT_BEGIN_NAMESPACE class QTimer; QT_END_NAMESPACE @@ -21,15 +26,25 @@ QT_END_NAMESPACE class SendCoinsRecipient { public: - SendCoinsRecipient() : amount(0) { } - + explicit SendCoinsRecipient() : amount(0) { } + explicit SendCoinsRecipient(const QString &addr, const QString &label, quint64 amount, const QString &message): + address(addr), label(label), amount(amount), message(message) {} + + // If from an insecure payment request, this is used for storing + // the addresses, e.g. address-A<br />address-B<br />address-C. + // Info: As we don't need to process addresses in here when using + // payment requests, we can abuse it for displaying an address list. + // Todo: This is a hack, should be replaced with a cleaner solution! QString address; QString label; qint64 amount; + // If from a payment request, this is used for storing the memo + QString message; // If from a payment request, paymentRequest.IsInitialized() will be true PaymentRequestPlus paymentRequest; - QString authenticatedMerchant; // Empty if no authentication or invalid signature/cert/etc. + // Empty if no authentication or invalid signature/cert/etc. + QString authenticatedMerchant; }; /** Interface to Bitcoin wallet from Qt view code. */ @@ -157,7 +172,7 @@ signals: // this means that the unlocking failed or was cancelled. void requireUnlock(); - // Asynchronous message notification + // Fired when a message should be reported to the user void message(const QString &title, const QString &message, unsigned int style); // Coins sent: from wallet, to recipient, in (serialized) transaction: |