5 #ifndef BITCOIN_QT_WALLETMODEL_H 6 #define BITCOIN_QT_WALLETMODEL_H 13 #if defined(HAVE_CONFIG_H) 90 template <
typename Stream,
typename Operation>
92 std::string sAddress =
address.toStdString();
93 std::string sLabel =
label.toStdString();
94 std::string sMessage =
message.toStdString();
110 if (ser_action.ForRead())
112 address = QString::fromStdString(sAddress);
113 label = QString::fromStdString(sLabel);
114 message = QString::fromStdString(sMessage);
277 void message(
const QString &title,
const QString &
message,
unsigned int style);
300 void updateAddressBook(
const QString &address,
const QString &label,
bool isMine,
const QString &purpose,
int status);
307 #endif // BITCOIN_QT_WALLETMODEL_H std::unique_ptr< interfaces::Handler > m_handler_transaction_changed
Definition: walletmodel.h:236
bool isMultiwallet()
Definition: walletmodel.cpp:605
void updateStatus()
Definition: walletmodel.cpp:60
static const int CURRENT_VERSION
Definition: walletmodel.h:85
Definition: walletmodel.h:125
std::unique_ptr< interfaces::Handler > m_handler_show_progress
Definition: walletmodel.h:237
void unsubscribeFromCoreSignals()
Definition: walletmodel.cpp:451
Definition: optionsmodel.h:29
Definition: walletmodel.h:140
void message(const QString &title, const QString &message, unsigned int style)
Definition: moc_walletmodel.cpp:296
std::unique_ptr< interfaces::Handler > m_handler_address_book_changed
Definition: walletmodel.h:235
void updateTransaction()
Definition: walletmodel.cpp:102
UnlockContext(UnlockContext &&obj)
Definition: walletmodel.h:200
Definition: addresstablemodel.h:23
UnlockContext(WalletModel *wallet, bool valid, bool relock)
Definition: walletmodel.cpp:478
QString label
Definition: walletmodel.h:67
Definition: walletmodel.h:189
EncryptionStatus cachedEncryptionStatus
Definition: walletmodel.h:255
bool parse(const QByteArray &data)
Definition: paymentrequestplus.cpp:28
Definition: paymentrequestplus.h:29
std::basic_string< char, std::char_traits< char >, secure_allocator< char > > SecureString
Definition: secure.h:60
bool IsInitialized() const
Definition: paymentrequestplus.cpp:55
Collection of wallet balances.
Definition: wallet.h:321
std::string sPaymentRequest
Definition: walletmodel.h:78
WalletModel(std::unique_ptr< interfaces::Wallet > wallet, interfaces::Node &node, const PlatformStyle *platformStyle, OptionsModel *optionsModel, QObject *parent=nullptr)
Definition: walletmodel.cpp:35
EncryptionStatus getEncryptionStatus() const
Definition: walletmodel.cpp:326
bool canGetAddresses() const
Definition: walletmodel.cpp:589
UnlockContext requestUnlock()
Definition: walletmodel.cpp:464
SendCoinsReturn(StatusCode _status=OK, QString _reasonCommitFailed="")
Definition: walletmodel.h:167
void updateAddressBook(const QString &address, const QString &label, bool isMine, const QString &purpose, int status)
Definition: walletmodel.cpp:108
QString address
Definition: walletmodel.h:66
static bool isWalletEnabled()
Definition: walletmodel.cpp:579
Definition: walletmodel.h:149
void unload()
Definition: moc_walletmodel.cpp:324
TransactionTableModel * getTransactionTableModel()
Definition: walletmodel.cpp:316
OutputType
Definition: outputtype.h:16
std::unique_ptr< interfaces::Handler > m_handler_watch_only_changed
Definition: walletmodel.h:238
bool fSubtractFeeFromAmount
Definition: walletmodel.h:83
Definition: coincontrol.h:16
bool bumpFee(uint256 hash, uint256 &new_hash)
Definition: walletmodel.cpp:519
Definition: walletmodel.h:138
Definition: walletmodel.h:144
int64_t CAmount
Definition: amount.h:12
void updateWatchOnlyFlag(bool fHaveWatchonly)
Definition: walletmodel.cpp:115
bool SerializeToString(std::string *output) const
Definition: paymentrequestplus.cpp:50
bool relock
Definition: walletmodel.h:205
RecentRequestsTableModel * recentRequestsTableModel
Definition: walletmodel.h:251
std::unique_ptr< interfaces::Handler > m_handler_status_changed
Definition: walletmodel.h:234
Definition: walletmodel.h:151
RecentRequestsTableModel * getRecentRequestsTableModel()
Definition: walletmodel.cpp:321
QString getDisplayName() const
Definition: walletmodel.cpp:599
void loadReceiveRequests(std::vector< std::string > &vReceiveRequests)
Definition: walletmodel.cpp:500
Definition: walletmodel.h:150
CAmount amount
Definition: walletmodel.h:68
SendCoinsReturn sendCoins(WalletModelTransaction &transaction)
Definition: walletmodel.cpp:235
Definition: dummywallet.cpp:11
void coinsSent(WalletModel *wallet, SendCoinsRecipient recipient, QByteArray transaction)
Definition: moc_walletmodel.cpp:303
void notifyWatchonlyChanged(bool fHaveWatchonly)
Definition: moc_walletmodel.cpp:317
Definition: transaction.h:18
~UnlockContext()
Definition: walletmodel.cpp:485
std::unique_ptr< interfaces::Handler > m_handler_unload
Definition: walletmodel.h:233
bool privateKeysDisabled() const
Definition: walletmodel.cpp:584
std::unique_ptr< interfaces::Handler > m_handler_can_get_addrs_changed
Definition: walletmodel.h:239
bool setWalletEncrypted(bool encrypted, const SecureString &passphrase)
Definition: walletmodel.cpp:342
Definition: walletmodel.h:139
int cachedNumBlocks
Definition: walletmodel.h:256
interfaces::WalletBalances m_cached_balances
Definition: walletmodel.h:254
void balanceChanged(const interfaces::WalletBalances &balances)
Definition: moc_walletmodel.cpp:277
int nVersion
Definition: walletmodel.h:86
Top-level interface for a bitcoin node (bitcoind process).
Definition: node.h:36
Definition: walletmodeltransaction.h:23
void showProgress(const QString &title, int nProgress)
Definition: moc_walletmodel.cpp:310
UnlockContext & operator=(UnlockContext &&rhs)
Definition: walletmodel.h:201
OptionsModel * getOptionsModel()
Definition: walletmodel.cpp:306
SendCoinsRecipient(const QString &addr, const QString &_label, const CAmount &_amount, const QString &_message)
Definition: walletmodel.h:58
void subscribeToCoreSignals()
Definition: walletmodel.cpp:439
bool validateAddress(const QString &address)
Definition: walletmodel.cpp:121
Definition: walletmodel.h:141
Definition: walletmodel.h:165
TransactionTableModel * transactionTableModel
Definition: walletmodel.h:250
std::unique_ptr< interfaces::Wallet > m_wallet
Definition: walletmodel.h:232
Definition: walletmodel.h:137
bool valid
Definition: walletmodel.h:204
Definition: uint256.h:121
WalletModel * wallet
Definition: walletmodel.h:203
void encryptionStatusChanged()
Definition: moc_walletmodel.cpp:284
AddressTableModel * getAddressTableModel() const
Definition: walletmodel.h:230
void canGetAddressesChanged()
Definition: moc_walletmodel.cpp:330
Definition: walletmodel.h:143
bool fHaveWatchOnly
Definition: walletmodel.h:242
EncryptionStatus
Definition: walletmodel.h:147
bool changePassphrase(const SecureString &oldPass, const SecureString &newPass)
Definition: walletmodel.cpp:370
bool saveReceiveRequest(const std::string &sAddress, const int64_t nId, const std::string &sRequest)
Definition: walletmodel.cpp:505
StatusCode
Definition: walletmodel.h:133
OptionsModel * optionsModel
Definition: walletmodel.h:247
QString reasonCommitFailed
Definition: walletmodel.h:173
void requireUnlock()
Definition: moc_walletmodel.cpp:290
QString authenticatedMerchant
Definition: walletmodel.h:81
AddressTableModel * addressTableModel
Definition: walletmodel.h:249
void checkBalanceChanged(const interfaces::WalletBalances &new_balances)
Definition: walletmodel.cpp:94
interfaces::Node & m_node
Definition: walletmodel.h:240
bool fForceCheckBalanceChanged
Definition: walletmodel.h:243
interfaces::Node & node() const
Definition: walletmodel.h:222
StatusCode status
Definition: walletmodel.h:172
Definition: walletmodel.h:142
Definition: walletmodel.h:136
QString message
Definition: walletmodel.h:70
QTimer * pollTimer
Definition: walletmodel.h:258
signed long long int64_t
Definition: stdint.h:18
void pollBalanceChanged()
Definition: walletmodel.cpp:69
Definition: transactiontablemodel.h:26
QString getWalletName() const
Definition: walletmodel.cpp:594
void SerializationOp(Stream &s, Operation ser_action)
Definition: walletmodel.h:91
void CopyFrom(UnlockContext &&rhs)
Definition: walletmodel.cpp:493
Definition: recentrequeststablemodel.h:56
#define READWRITE(...)
Definition: serialize.h:184
bool setWalletLocked(bool locked, const SecureString &passPhrase=SecureString())
Definition: walletmodel.cpp:356
~WalletModel()
Definition: walletmodel.cpp:55
interfaces::Wallet & wallet() const
Definition: walletmodel.h:223
Definition: walletmodel.h:135
bool isValid() const
Definition: walletmodel.h:195
AddressTableModel * getAddressTableModel()
Definition: walletmodel.cpp:311
Definition: walletmodel.h:54
SendCoinsRecipient()
Definition: walletmodel.h:57
SendCoinsReturn prepareTransaction(WalletModelTransaction &transaction, const CCoinControl &coinControl)
Definition: walletmodel.cpp:126
ADD_SERIALIZE_METHODS
Definition: walletmodel.h:88
Interface for accessing a wallet.
Definition: wallet.h:48