Bitcoin ABC  0.24.10
P2P Digital Currency
walletview.cpp
Go to the documentation of this file.
1 // Copyright (c) 2011-2016 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 #include <qt/walletview.h>
6 
7 #include <config.h> // For GetConfig
8 #include <interfaces/node.h>
9 #include <node/psbt.h>
10 #include <node/transaction.h>
11 #include <node/ui_interface.h>
12 #include <policy/policy.h>
13 #include <qt/addressbookpage.h>
14 #include <qt/askpassphrasedialog.h>
15 #include <qt/clientmodel.h>
16 #include <qt/guiutil.h>
17 #include <qt/optionsmodel.h>
18 #include <qt/overviewpage.h>
19 #include <qt/platformstyle.h>
20 #include <qt/receivecoinsdialog.h>
21 #include <qt/sendcoinsdialog.h>
24 #include <qt/transactionview.h>
25 #include <qt/walletmodel.h>
26 #include <util/strencodings.h>
27 
28 #include <QAction>
29 #include <QActionGroup>
30 #include <QFileDialog>
31 #include <QHBoxLayout>
32 #include <QProgressDialog>
33 #include <QPushButton>
34 #include <QVBoxLayout>
35 
36 WalletView::WalletView(const PlatformStyle *_platformStyle,
37  WalletModel *_walletModel, QWidget *parent)
38  : QStackedWidget(parent), clientModel(nullptr), walletModel(_walletModel),
39  platformStyle(_platformStyle) {
40  // Create tabs
42 
43  transactionsPage = new QWidget(this);
44  QVBoxLayout *vbox = new QVBoxLayout();
45  QHBoxLayout *hbox_buttons = new QHBoxLayout();
47  vbox->addWidget(transactionView);
48  QPushButton *exportButton = new QPushButton(tr("&Export"), this);
49  exportButton->setToolTip(
50  tr("Export the data in the current tab to a file"));
52  exportButton->setIcon(platformStyle->SingleColorIcon(":/icons/export"));
53  }
54  hbox_buttons->addStretch();
55  hbox_buttons->addWidget(exportButton);
56  vbox->addLayout(hbox_buttons);
57  transactionsPage->setLayout(vbox);
58 
61 
68 
69  addWidget(overviewPage);
70  addWidget(transactionsPage);
71  addWidget(receiveCoinsPage);
72  addWidget(sendCoinsPage);
73 
76  // Clicking on a transaction on the overview pre-selects the transaction on
77  // the transaction history page
79  static_cast<void (TransactionView::*)(const QModelIndex &)>(
81 
84 
87  // Highlight transaction after send
89  static_cast<void (TransactionView::*)(const uint256 &)>(
91 
92  // Clicking on "Export" allows to export the transaction list
93  connect(exportButton, &QPushButton::clicked, transactionView,
95 
96  // Pass through messages from sendCoinsPage
99  // Pass through messages from transactionView
102  connect(this, &WalletView::setPrivacy, overviewPage,
104 
105  // Set the model properly.
107 }
108 
110 
112  this->clientModel = _clientModel;
113 
114  overviewPage->setClientModel(_clientModel);
115  sendCoinsPage->setClientModel(_clientModel);
116  if (walletModel) {
117  walletModel->setClientModel(_clientModel);
118  }
119 }
120 
122  this->walletModel = _walletModel;
123 
124  // Put transaction list in tabs
125  transactionView->setModel(_walletModel);
126  overviewPage->setWalletModel(_walletModel);
127  receiveCoinsPage->setModel(_walletModel);
128  sendCoinsPage->setModel(_walletModel);
130  _walletModel ? _walletModel->getAddressTableModel() : nullptr);
132  _walletModel ? _walletModel->getAddressTableModel() : nullptr);
133 
134  if (_walletModel) {
135  // Receive and pass through messages from wallet model
136  connect(_walletModel, &WalletModel::message, this,
138 
139  // Handle changes in encryption status
140  connect(_walletModel, &WalletModel::encryptionStatusChanged, this,
143 
144  // update HD status
145  Q_EMIT hdEnabledStatusChanged();
146 
147  // Balloon pop-up for new transaction
148  connect(_walletModel->getTransactionTableModel(),
149  &TransactionTableModel::rowsInserted, this,
151 
152  // Ask for passphrase if needed
153  connect(_walletModel, &WalletModel::requireUnlock, this,
155 
156  // Show progress dialog
157  connect(_walletModel, &WalletModel::showProgress, this,
159  }
160 }
161 
162 void WalletView::processNewTransaction(const QModelIndex &parent, int start,
163  int end) {
164  // Prevent balloon-spam when initial block download is in progress
165  if (!walletModel || !clientModel ||
167  return;
168  }
169 
171  if (!ttm || ttm->processingQueuedTransactions()) {
172  return;
173  }
174 
175  QString date = ttm->index(start, TransactionTableModel::Date, parent)
176  .data()
177  .toString();
178  qint64 amount = ttm->index(start, TransactionTableModel::Amount, parent)
179  .data(Qt::EditRole)
180  .toULongLong();
181  QString type = ttm->index(start, TransactionTableModel::Type, parent)
182  .data()
183  .toString();
184  QModelIndex index = ttm->index(start, 0, parent);
185  QString address =
186  ttm->data(index, TransactionTableModel::AddressRole).toString();
187  QString label = GUIUtil::HtmlEscape(
188  ttm->data(index, TransactionTableModel::LabelRole).toString());
189 
190  Q_EMIT incomingTransaction(
192  int64_t(amount) * SATOSHI, type, address, label,
194 }
195 
197  setCurrentWidget(overviewPage);
198 }
199 
201  setCurrentWidget(transactionsPage);
202 }
203 
205  setCurrentWidget(receiveCoinsPage);
206 }
207 
208 void WalletView::gotoSendCoinsPage(QString addr) {
209  setCurrentWidget(sendCoinsPage);
210 
211  if (!addr.isEmpty()) {
212  sendCoinsPage->setAddress(addr);
213  }
214 }
215 
216 void WalletView::gotoSignMessageTab(QString addr) {
217  // calls show() in showTab_SM()
218  SignVerifyMessageDialog *signVerifyMessageDialog =
220  signVerifyMessageDialog->setAttribute(Qt::WA_DeleteOnClose);
221  signVerifyMessageDialog->setModel(walletModel);
222  signVerifyMessageDialog->showTab_SM(true);
223 
224  if (!addr.isEmpty()) {
225  signVerifyMessageDialog->setAddress_SM(addr);
226  }
227 }
228 
230  // calls show() in showTab_VM()
231  SignVerifyMessageDialog *signVerifyMessageDialog =
233  signVerifyMessageDialog->setAttribute(Qt::WA_DeleteOnClose);
234  signVerifyMessageDialog->setModel(walletModel);
235  signVerifyMessageDialog->showTab_VM(true);
236 
237  if (!addr.isEmpty()) {
238  signVerifyMessageDialog->setAddress_VM(addr);
239  }
240 }
241 
243  QString filename = GUIUtil::getOpenFileName(
244  this, tr("Load Transaction Data"), QString(),
245  tr("Partially Signed Transaction (*.psbt)"), nullptr);
246  if (filename.isEmpty()) {
247  return;
248  }
249  if (GetFileSize(filename.toLocal8Bit().data(), MAX_FILE_SIZE_PSBT) ==
251  Q_EMIT message(tr("Error"),
252  tr("PSBT file must be smaller than 100 MiB"),
254  return;
255  }
256  std::ifstream in(filename.toLocal8Bit().data(), std::ios::binary);
257  std::string dataStr(std::istreambuf_iterator<char>{in}, {});
258 
259  std::string error;
261  if (!DecodeRawPSBT(psbtx, dataStr, error)) {
262  Q_EMIT message(tr("Error"),
263  tr("Unable to decode PSBT file") + "\n" +
264  QString::fromStdString(error),
266  return;
267  }
268 
270  bool complete = false;
271  PSBTAnalysis analysis = AnalyzePSBT(psbtx);
272  QMessageBox msgBox;
273  msgBox.setText("PSBT");
274  switch (analysis.next) {
275  case PSBTRole::CREATOR:
276  case PSBTRole::UPDATER:
277  msgBox.setInformativeText(
278  "PSBT is incomplete. Copy to clipboard for manual inspection?");
279  break;
280  case PSBTRole::SIGNER:
281  msgBox.setInformativeText(
282  "Transaction needs more signatures. Copy to clipboard?");
283  break;
284  case PSBTRole::FINALIZER:
285  case PSBTRole::EXTRACTOR:
286  complete = FinalizeAndExtractPSBT(psbtx, mtx);
287  if (complete) {
288  msgBox.setInformativeText(
289  tr("Would you like to send this transaction?"));
290  } else {
291  // The analyzer missed something, e.g. if there are
292  // final_scriptSig but with invalid signatures.
293  msgBox.setInformativeText(
294  tr("There was an unexpected problem processing the PSBT. "
295  "Copy to clipboard for manual inspection?"));
296  }
297  }
298 
299  msgBox.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
300  switch (msgBox.exec()) {
301  case QMessageBox::Yes: {
302  if (complete) {
303  std::string err_string;
305 
307  *clientModel->node().context(), GetConfig(), tx, err_string,
308  DEFAULT_MAX_RAW_TX_FEE_RATE.GetFeePerK(), /* relay */ true,
309  /* wait_callback */ false);
310  if (result == TransactionError::OK) {
311  Q_EMIT message(tr("Success"),
312  tr("Broadcasted transaction successfully."),
315  } else {
316  Q_EMIT message(tr("Error"),
317  QString::fromStdString(err_string),
319  }
320  } else {
321  // Serialize the PSBT
323  ssTx << psbtx;
324  GUIUtil::setClipboard(EncodeBase64(ssTx.str()).c_str());
325  Q_EMIT message(tr("PSBT copied"), "Copied to clipboard",
327  return;
328  }
329  }
330  case QMessageBox::Cancel:
331  break;
332  default:
333  assert(false);
334  }
335 }
336 
338  return sendCoinsPage->handlePaymentRequest(recipient);
339 }
340 
343 }
344 
346  Q_EMIT encryptionStatusChanged();
347 }
348 
350  if (!walletModel) {
351  return;
352  }
354  dlg.setModel(walletModel);
355  dlg.exec();
356 
358 }
359 
361  QString filename =
362  GUIUtil::getSaveFileName(this, tr("Backup Wallet"), QString(),
363  tr("Wallet Data (*.dat)"), nullptr);
364 
365  if (filename.isEmpty()) {
366  return;
367  }
368 
369  if (!walletModel->wallet().backupWallet(filename.toLocal8Bit().data())) {
370  Q_EMIT message(
371  tr("Backup Failed"),
372  tr("There was an error trying to save the wallet data to %1.")
373  .arg(filename),
375  } else {
376  Q_EMIT message(
377  tr("Backup Successful"),
378  tr("The wallet data was successfully saved to %1.").arg(filename),
380  }
381 }
382 
385  dlg.setModel(walletModel);
386  dlg.exec();
387 }
388 
390  if (!walletModel) {
391  return;
392  }
393 
394  // Unlock wallet when requested by wallet model
397  dlg.setModel(walletModel);
398  dlg.exec();
399  }
400 }
401 
403  if (!walletModel) {
404  return;
405  }
406 
408 }
409 
411  if (!walletModel) {
412  return;
413  }
414 
416 }
417 
418 void WalletView::showProgress(const QString &title, int nProgress) {
419  if (nProgress == 0) {
420  progressDialog = new QProgressDialog(title, tr("Cancel"), 0, 100);
422  progressDialog->setWindowModality(Qt::ApplicationModal);
423  progressDialog->setMinimumDuration(0);
424  progressDialog->setAutoClose(false);
425  progressDialog->setValue(0);
426  } else if (nProgress == 100) {
427  if (progressDialog) {
428  progressDialog->close();
429  progressDialog->deleteLater();
430  progressDialog = nullptr;
431  }
432  } else if (progressDialog) {
433  if (progressDialog->wasCanceled()) {
435  } else {
436  progressDialog->setValue(nProgress);
437  }
438  }
439 }
440 
442  Q_EMIT outOfSyncWarningClicked();
443 }
WalletView::sendCoinsPage
SendCoinsDialog * sendCoinsPage
Definition: walletview.h:67
signverifymessagedialog.h
TransactionView
Widget showing the transaction list for a wallet, including a filter row.
Definition: transactionview.h:33
policy.h
CClientUIInterface::MSG_INFORMATION
@ MSG_INFORMATION
Predefined combinations for certain default usage cases.
Definition: ui_interface.h:71
WalletModel::getOptionsModel
OptionsModel * getOptionsModel()
Definition: walletmodel.cpp:315
transactiontablemodel.h
WalletView::platformStyle
const PlatformStyle * platformStyle
Definition: walletview.h:74
AddressBookPage::setModel
void setModel(AddressTableModel *model)
Definition: addressbookpage.cpp:162
CClientUIInterface::MODAL
@ MODAL
Force blocking, modal message box dialog (not just OS notification)
Definition: ui_interface.h:65
AddressBookPage::SendingTab
@ SendingTab
Definition: addressbookpage.h:29
fsbridge::ifstream
fs::ifstream ifstream
Definition: fs.h:234
ReceiveCoinsDialog
Dialog for requesting payment of bitcoins.
Definition: receivecoinsdialog.h:30
MakeTransactionRef
static CTransactionRef MakeTransactionRef()
Definition: transaction.h:320
SendCoinsDialog::coinsSent
void coinsSent(const uint256 &txid)
WalletView::transactionView
TransactionView * transactionView
Definition: walletview.h:71
WalletView::WalletView
WalletView(const PlatformStyle *platformStyle, WalletModel *walletModel, QWidget *parent)
Definition: walletview.cpp:36
AskPassphraseDialog::Unlock
@ Unlock
Ask passphrase and unlock.
Definition: askpassphrasedialog.h:27
ReceiveCoinsDialog::setModel
void setModel(WalletModel *model)
Definition: receivecoinsdialog.cpp:75
TransactionTableModel::Date
@ Date
Definition: transactiontablemodel.h:38
WalletModel
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:47
OverviewPage::outOfSyncWarningClicked
void outOfSyncWarningClicked()
TransactionTableModel::AddressRole
@ AddressRole
Address of transaction.
Definition: transactiontablemodel.h:60
psbt.h
SignVerifyMessageDialog::setAddress_VM
void setAddress_VM(const QString &address)
Definition: signverifymessagedialog.cpp:72
WalletView::showOutOfSyncWarning
void showOutOfSyncWarning(bool fShow)
Definition: walletview.cpp:341
PlatformStyle::SingleColorIcon
QIcon SingleColorIcon(const QString &filename) const
Colorize an icon (given filename) with the icon color.
Definition: platformstyle.cpp:97
WalletView::usedSendingAddressesPage
AddressBookPage * usedSendingAddressesPage
Definition: walletview.h:68
addressbookpage.h
SignVerifyMessageDialog::showTab_VM
void showTab_VM(bool fShow)
Definition: signverifymessagedialog.cpp:84
sendcoinsdialog.h
TransactionView::focusTransaction
void focusTransaction(const QModelIndex &)
Definition: transactionview.cpp:647
walletmodel.h
PSBTAnalysis
Holds the results of AnalyzePSBT (miscellaneous information about a PSBT)
Definition: psbt.h:34
WalletView::gotoReceiveCoinsPage
void gotoReceiveCoinsPage()
Switch to receive coins page.
Definition: walletview.cpp:204
WalletView::overviewPage
OverviewPage * overviewPage
Definition: walletview.h:64
WalletModel::getAddressTableModel
AddressTableModel * getAddressTableModel()
Definition: walletmodel.cpp:319
DEFAULT_MAX_RAW_TX_FEE_RATE
static const CFeeRate DEFAULT_MAX_RAW_TX_FEE_RATE
Maximum fee rate for sendrawtransaction and testmempoolaccept RPC calls.
Definition: transaction.h:24
ClientModel::node
interfaces::Node & node() const
Definition: clientmodel.h:51
PSBTRole::UPDATER
@ UPDATER
node.h
OverviewPage
Overview ("home") page widget.
Definition: overviewpage.h:28
AskPassphraseDialog
Multifunctional dialog to ask for passphrases.
Definition: askpassphrasedialog.h:21
WalletView::showProgress
void showProgress(const QString &title, int nProgress)
Show progress dialog e.g.
Definition: walletview.cpp:418
WalletView::incomingTransaction
void incomingTransaction(const QString &date, int unit, const Amount amount, const QString &type, const QString &address, const QString &label, const QString &walletName)
Notify that a new transaction appeared.
WalletView::clientModel
ClientModel * clientModel
Definition: walletview.h:61
WalletModel::getTransactionTableModel
TransactionTableModel * getTransactionTableModel()
Definition: walletmodel.cpp:323
GUIUtil::bringToFront
void bringToFront(QWidget *w)
Definition: guiutil.cpp:381
WalletView::setPrivacy
void setPrivacy(bool privacy)
WalletView::handlePaymentRequest
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
Definition: walletview.cpp:337
FinalizeAndExtractPSBT
bool FinalizeAndExtractPSBT(PartiallySignedTransaction &psbtx, CMutableTransaction &result)
Finalizes a PSBT if possible, and extracts it to a CMutableTransaction if it could be finalized.
Definition: psbt.cpp:246
SignVerifyMessageDialog::setModel
void setModel(WalletModel *model)
Definition: signverifymessagedialog.cpp:63
WalletView::gotoSendCoinsPage
void gotoSendCoinsPage(QString addr="")
Switch to send coins page.
Definition: walletview.cpp:208
WalletView::gotoSignMessageTab
void gotoSignMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to sign message tab.
Definition: walletview.cpp:216
WalletView::encryptWallet
void encryptWallet()
Encrypt the wallet.
Definition: walletview.cpp:349
WalletModel::setClientModel
void setClientModel(ClientModel *client_model)
Definition: walletmodel.cpp:56
SignVerifyMessageDialog
Definition: signverifymessagedialog.h:17
overviewpage.h
GUIUtil::setClipboard
void setClipboard(const QString &str)
Definition: guiutil.cpp:768
PSBTAnalysis::next
PSBTRole next
Which of the BIP 174 roles needs to handle the transaction next.
Definition: psbt.h:44
interfaces::Node::context
virtual NodeContext * context()
Get and set internal node context.
Definition: node.h:243
SER_NETWORK
@ SER_NETWORK
Definition: serialize.h:165
transaction.h
TransactionTableModel::index
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Definition: transactiontablemodel.cpp:702
SATOSHI
static constexpr Amount SATOSHI
Definition: amount.h:153
WalletView::hdEnabledStatusChanged
void hdEnabledStatusChanged()
HD-Enabled status of wallet changed (only possible during startup)
strencodings.h
SendCoinsRecipient
Definition: sendcoinsrecipient.h:23
CFeeRate::GetFeePerK
Amount GetFeePerK() const
Return the fee in satoshis for a size of 1000 bytes.
Definition: feerate.h:54
WalletView::getWalletModel
WalletModel * getWalletModel()
Definition: walletview.h:48
TransactionError
TransactionError
Definition: error.h:22
WalletModel::wallet
interfaces::Wallet & wallet() const
Definition: walletmodel.h:150
WalletModel::showProgress
void showProgress(const QString &title, int nProgress)
AnalyzePSBT
PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx)
Provides helpful miscellaneous information about where a PSBT is in the signing workflow.
Definition: psbt.cpp:15
WalletView::setClientModel
void setClientModel(ClientModel *clientModel)
Set the client model.
Definition: walletview.cpp:111
WalletView::requestedSyncWarningInfo
void requestedSyncWarningInfo()
User has requested more information about the out of sync state.
Definition: walletview.cpp:441
GUIUtil::getOpenFileName
QString getOpenFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
Get open filename, convenience wrapper for QFileDialog::getOpenFileName.
Definition: guiutil.cpp:328
WalletModel::encryptionStatusChanged
void encryptionStatusChanged()
PSBTRole::SIGNER
@ SIGNER
WalletModel::message
void message(const QString &title, const QString &message, unsigned int style)
PlatformStyle::getImagesOnButtons
bool getImagesOnButtons() const
Definition: platformstyle.h:20
SendCoinsDialog::handlePaymentRequest
bool handlePaymentRequest(const SendCoinsRecipient &recipient)
Definition: sendcoinsdialog.cpp:627
WalletView::usedReceivingAddressesPage
AddressBookPage * usedReceivingAddressesPage
Definition: walletview.h:69
PSBTRole::CREATOR
@ CREATOR
OverviewPage::setClientModel
void setClientModel(ClientModel *clientModel)
Definition: overviewpage.cpp:287
WalletView::updateEncryptionStatus
void updateEncryptionStatus()
Re-emit encryption status signal.
Definition: walletview.cpp:345
WalletView::message
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
WalletModel::getEncryptionStatus
EncryptionStatus getEncryptionStatus() const
Definition: walletmodel.cpp:331
GUIUtil::PolishProgressDialog
void PolishProgressDialog(QProgressDialog *dialog)
Definition: guiutil.cpp:922
AddressBookPage
Widget that shows a list of sending or receiving addresses.
Definition: addressbookpage.h:25
SendCoinsDialog
Dialog for sending bitcoins.
Definition: sendcoinsdialog.h:31
guiutil.h
WalletModel::getWalletName
QString getWalletName() const
Definition: walletmodel.cpp:514
WalletView::transactionsPage
QWidget * transactionsPage
Definition: walletview.h:65
TransactionView::message
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
interfaces::Wallet::backupWallet
virtual bool backupWallet(const std::string &filename)=0
Back up wallet.
WalletView::encryptionStatusChanged
void encryptionStatusChanged()
Encryption status of wallet changed.
TransactionTableModel::Amount
@ Amount
Definition: transactiontablemodel.h:41
SendCoinsDialog::setAddress
void setAddress(const QString &address)
Definition: sendcoinsdialog.cpp:588
uint256
256-bit opaque blob.
Definition: uint256.h:127
WalletView::gotoVerifyMessageTab
void gotoVerifyMessageTab(QString addr="")
Show Sign/Verify Message dialog and switch to verify message tab.
Definition: walletview.cpp:229
WalletModel::Locked
@ Locked
Definition: walletmodel.h:75
walletview.h
interfaces::Node::isInitialBlockDownload
virtual bool isInitialBlockDownload()=0
Is initial block download.
TransactionTableModel::processingQueuedTransactions
bool processingQueuedTransactions() const
Definition: transactiontablemodel.h:90
GetFileSize
std::streampos GetFileSize(const char *path, std::streamsize max)
Get the size of a file by scanning it.
Definition: system.cpp:149
PSBTRole::EXTRACTOR
@ EXTRACTOR
DecodeRawPSBT
bool DecodeRawPSBT(PartiallySignedTransaction &psbt, const std::string &tx_data, std::string &error)
Decode a raw (binary blob) PSBT into a PartiallySignedTransaction.
Definition: psbt.cpp:306
SignVerifyMessageDialog::setAddress_SM
void setAddress_SM(const QString &address)
Definition: signverifymessagedialog.cpp:67
ui_interface.h
OverviewPage::transactionClicked
void transactionClicked(const QModelIndex &index)
GUIUtil::getSaveFileName
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
Get save filename, mimics QFileDialog::getSaveFileName, except that it appends a default suffix when ...
Definition: guiutil.cpp:285
platformstyle.h
CClientUIInterface::MSG_ERROR
@ MSG_ERROR
Definition: ui_interface.h:73
ClientModel
Model for Bitcoin network client.
Definition: clientmodel.h:36
TransactionTableModel
UI model for the transaction table of a wallet.
Definition: transactiontablemodel.h:27
WalletView::outOfSyncWarningClicked
void outOfSyncWarningClicked()
Notify that the out of sync warning icon has been pressed.
WalletView::~WalletView
~WalletView()
Definition: walletview.cpp:109
receivecoinsdialog.h
GUIUtil::HtmlEscape
QString HtmlEscape(const QString &str, bool fMultiLine)
Definition: guiutil.cpp:242
PSBTRole::FINALIZER
@ FINALIZER
WalletView::coinsSent
void coinsSent()
WalletView::gotoOverviewPage
void gotoOverviewPage()
Switch to overview (home) page.
Definition: walletview.cpp:196
OptionsModel::getDisplayUnit
int getDisplayUnit() const
Definition: optionsmodel.h:97
SendCoinsDialog::setClientModel
void setClientModel(ClientModel *clientModel)
Definition: sendcoinsdialog.cpp:137
WalletView::setWalletModel
void setWalletModel(WalletModel *walletModel)
Set the wallet model.
Definition: walletview.cpp:121
PartiallySignedTransaction
A version of CTransaction with the PSBT format.
Definition: psbt.h:335
WalletView::changePassphrase
void changePassphrase()
Change encrypted wallet passphrase.
Definition: walletview.cpp:383
interfaces::Wallet::abortRescan
virtual void abortRescan()=0
Abort a rescan.
TransactionTableModel::Type
@ Type
Definition: transactiontablemodel.h:39
TransactionError::OK
@ OK
No error.
TransactionView::setModel
void setModel(WalletModel *model)
Definition: transactionview.cpp:231
WalletModel::requireUnlock
void requireUnlock()
SendCoinsDialog::setModel
void setModel(WalletModel *model)
Definition: sendcoinsdialog.cpp:146
WalletView::unlockWallet
void unlockWallet()
Ask for passphrase to unlock wallet temporarily.
Definition: walletview.cpp:389
CTransactionRef
std::shared_ptr< const CTransaction > CTransactionRef
Definition: transaction.h:319
WalletView::walletModel
WalletModel * walletModel
Definition: walletview.h:62
WalletView::backupWallet
void backupWallet()
Backup the wallet.
Definition: walletview.cpp:360
SendCoinsDialog::message
void message(const QString &title, const QString &message, unsigned int style)
CDataStream
Double ended buffer combining vector and stream-like interfaces.
Definition: streams.h:197
WalletView::receiveCoinsPage
ReceiveCoinsDialog * receiveCoinsPage
Definition: walletview.h:66
transactionview.h
OverviewPage::setWalletModel
void setWalletModel(WalletModel *walletModel)
Definition: overviewpage.cpp:297
OverviewPage::setPrivacy
void setPrivacy(bool privacy)
Definition: overviewpage.cpp:163
config.h
MAX_FILE_SIZE_PSBT
const std::streamsize MAX_FILE_SIZE_PSBT
Definition: psbt.h:42
EncodeBase64
std::string EncodeBase64(Span< const uint8_t > input)
Definition: strencodings.cpp:137
AskPassphraseDialog::ChangePass
@ ChangePass
Ask old passphrase + new passphrase twice.
Definition: askpassphrasedialog.h:28
WalletView::usedSendingAddresses
void usedSendingAddresses()
Show used sending addresses.
Definition: walletview.cpp:402
BroadcastTransaction
TransactionError BroadcastTransaction(NodeContext &node, const Config &config, const CTransactionRef tx, std::string &err_string, const Amount max_tx_fee, bool relay, bool wait_callback)
Submit a transaction to the mempool and (optionally) relay it to all P2P peers.
Definition: transaction.cpp:33
optionsmodel.h
error
bool error(const char *fmt, const Args &... args)
Definition: system.h:48
WalletView::usedReceivingAddresses
void usedReceivingAddresses()
Show used receiving addresses.
Definition: walletview.cpp:410
PlatformStyle
Definition: platformstyle.h:13
CDataStream::str
std::string str() const
Definition: streams.h:271
WalletView::transactionClicked
void transactionClicked()
OverviewPage::showOutOfSyncWarning
void showOutOfSyncWarning(bool fShow)
Definition: overviewpage.cpp:354
WalletView::processNewTransaction
void processNewTransaction(const QModelIndex &parent, int start, int end)
Show incoming transaction notification for new transactions.
Definition: walletview.cpp:162
AskPassphraseDialog::Encrypt
@ Encrypt
Ask passphrase twice and encrypt.
Definition: askpassphrasedialog.h:26
GetConfig
const Config & GetConfig()
Definition: config.cpp:34
SignVerifyMessageDialog::showTab_SM
void showTab_SM(bool fShow)
Definition: signverifymessagedialog.cpp:77
WalletView::gotoHistoryPage
void gotoHistoryPage()
Switch to history (transactions) page.
Definition: walletview.cpp:200
TransactionView::exportClicked
void exportClicked()
Definition: transactionview.cpp:394
TransactionTableModel::LabelRole
@ LabelRole
Label of address related to transaction.
Definition: transactiontablemodel.h:62
askpassphrasedialog.h
AddressBookPage::ForEditing
@ ForEditing
Open address book for editing.
Definition: addressbookpage.h:33
clientmodel.h
WalletView::gotoLoadPSBT
void gotoLoadPSBT()
Load Partially Signed Bitcoin Transaction.
Definition: walletview.cpp:242
CMutableTransaction
A mutable version of CTransaction.
Definition: transaction.h:278
PROTOCOL_VERSION
static const int PROTOCOL_VERSION
network protocol versioning
Definition: version.h:11
WalletView::progressDialog
QProgressDialog * progressDialog
Definition: walletview.h:73
AddressBookPage::ReceivingTab
@ ReceivingTab
Definition: addressbookpage.h:29
AskPassphraseDialog::setModel
void setModel(WalletModel *model)
Definition: askpassphrasedialog.cpp:83
TransactionTableModel::data
QVariant data(const QModelIndex &index, int role) const override
Definition: transactiontablemodel.cpp:525