Bitcoin ABC 0.32.4
P2P Digital Currency
transactionview.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
6
7#include <node/ui_interface.h>
9#include <qt/bitcoinunits.h>
10#include <qt/csvmodelwriter.h>
12#include <qt/guiutil.h>
13#include <qt/optionsmodel.h>
14#include <qt/platformstyle.h>
19#include <qt/walletmodel.h>
20
21#include <optional>
22
23#include <QApplication>
24#include <QComboBox>
25#include <QDateTimeEdit>
26#include <QDesktopServices>
27#include <QDoubleValidator>
28#include <QHBoxLayout>
29#include <QHeaderView>
30#include <QLabel>
31#include <QLineEdit>
32#include <QMenu>
33#include <QPoint>
34#include <QScrollBar>
35#include <QTableView>
36#include <QTimer>
37#include <QUrl>
38#include <QVBoxLayout>
39
41 QWidget *parent)
42 : QWidget(parent) {
43 // Build filter row
44 setContentsMargins(0, 0, 0, 0);
45
46 QHBoxLayout *hlayout = new QHBoxLayout();
47 hlayout->setContentsMargins(0, 0, 0, 0);
48
49 if (platformStyle->getUseExtraSpacing()) {
50 hlayout->setSpacing(5);
51 hlayout->addSpacing(26);
52 } else {
53 hlayout->setSpacing(0);
54 hlayout->addSpacing(23);
55 }
56
57 watchOnlyWidget = new QComboBox(this);
58 watchOnlyWidget->setFixedWidth(24);
60 watchOnlyWidget->addItem(platformStyle->SingleColorIcon(":/icons/eye_plus"),
62 watchOnlyWidget->addItem(
63 platformStyle->SingleColorIcon(":/icons/eye_minus"), "",
65 hlayout->addWidget(watchOnlyWidget);
66
67 dateWidget = new QComboBox(this);
68 if (platformStyle->getUseExtraSpacing()) {
69 dateWidget->setFixedWidth(121);
70 } else {
71 dateWidget->setFixedWidth(120);
72 }
73 dateWidget->addItem(tr("All"), All);
74 dateWidget->addItem(tr("Today"), Today);
75 dateWidget->addItem(tr("This week"), ThisWeek);
76 dateWidget->addItem(tr("This month"), ThisMonth);
77 dateWidget->addItem(tr("Last month"), LastMonth);
78 dateWidget->addItem(tr("This year"), ThisYear);
79 dateWidget->addItem(tr("Range..."), Range);
80 hlayout->addWidget(dateWidget);
81
82 typeWidget = new QComboBox(this);
83 if (platformStyle->getUseExtraSpacing()) {
84 typeWidget->setFixedWidth(121);
85 } else {
86 typeWidget->setFixedWidth(120);
87 }
88
90 typeWidget->addItem(
91 tr("Received with"),
94 typeWidget->addItem(
95 tr("Sent to"),
98 typeWidget->addItem(tr("To yourself"), TransactionFilterProxy::TYPE(
100 typeWidget->addItem(tr("Mined"), TransactionFilterProxy::TYPE(
102 typeWidget->addItem(tr("Other"),
104
105 hlayout->addWidget(typeWidget);
106
107 search_widget = new QLineEdit(this);
108 search_widget->setPlaceholderText(
109 tr("Enter address, transaction id, or label to search"));
110 hlayout->addWidget(search_widget);
111
112 amountWidget = new QLineEdit(this);
113 amountWidget->setPlaceholderText(tr("Min amount"));
114 if (platformStyle->getUseExtraSpacing()) {
115 amountWidget->setFixedWidth(97);
116 } else {
117 amountWidget->setFixedWidth(100);
118 }
119 QDoubleValidator *amountValidator = new QDoubleValidator(0, 1e20, 8, this);
120 QLocale amountLocale(QLocale::C);
121 amountLocale.setNumberOptions(QLocale::RejectGroupSeparator);
122 amountValidator->setLocale(amountLocale);
123 amountWidget->setValidator(amountValidator);
124 hlayout->addWidget(amountWidget);
125
126 // Delay before filtering transactions in ms
127 static const int input_filter_delay = 200;
128
129 QTimer *amount_typing_delay = new QTimer(this);
130 amount_typing_delay->setSingleShot(true);
131 amount_typing_delay->setInterval(input_filter_delay);
132
133 QTimer *prefix_typing_delay = new QTimer(this);
134 prefix_typing_delay->setSingleShot(true);
135 prefix_typing_delay->setInterval(input_filter_delay);
136
137 QVBoxLayout *vlayout = new QVBoxLayout(this);
138 vlayout->setContentsMargins(0, 0, 0, 0);
139 vlayout->setSpacing(0);
140
141 QTableView *view = new QTableView(this);
142 vlayout->addLayout(hlayout);
143 vlayout->addWidget(createDateRangeWidget());
144 vlayout->addWidget(view);
145 vlayout->setSpacing(0);
146 int width = view->verticalScrollBar()->sizeHint().width();
147 // Cover scroll bar width with spacing
148 if (platformStyle->getUseExtraSpacing()) {
149 hlayout->addSpacing(width + 2);
150 } else {
151 hlayout->addSpacing(width);
152 }
153 // Always show scroll bar
154 view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
155 view->setTabKeyNavigation(false);
156 view->setContextMenuPolicy(Qt::CustomContextMenu);
157
158 view->installEventFilter(this);
159
160 transactionView = view;
161
162 // Actions
163 abandonAction = new QAction(tr("Abandon transaction"), this);
164 copyAddressAction = new QAction(tr("Copy address"), this);
165 copyLabelAction = new QAction(tr("Copy label"), this);
166 QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
167 QAction *copyTxIDAction = new QAction(tr("Copy transaction ID"), this);
168 QAction *copyTxHexAction = new QAction(tr("Copy raw transaction"), this);
169 QAction *copyTxPlainText =
170 new QAction(tr("Copy full transaction details"), this);
171 QAction *editLabelAction = new QAction(tr("Edit label"), this);
172 QAction *showDetailsAction =
173 new QAction(tr("Show transaction details"), this);
174
175 contextMenu = new QMenu(this);
176 contextMenu->addAction(copyAddressAction);
177 contextMenu->addAction(copyLabelAction);
178 contextMenu->addAction(copyAmountAction);
179 contextMenu->addAction(copyTxIDAction);
180 contextMenu->addAction(copyTxHexAction);
181 contextMenu->addAction(copyTxPlainText);
182 contextMenu->addAction(showDetailsAction);
183 contextMenu->addSeparator();
184 contextMenu->addAction(abandonAction);
185 contextMenu->addAction(editLabelAction);
186
187 connect(dateWidget,
188 static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this,
190 connect(typeWidget,
191 static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this,
193 connect(watchOnlyWidget,
194 static_cast<void (QComboBox::*)(int)>(&QComboBox::activated), this,
196 connect(amountWidget, &QLineEdit::textChanged, amount_typing_delay,
197 static_cast<void (QTimer::*)()>(&QTimer::start));
198 connect(amount_typing_delay, &QTimer::timeout, this,
200 connect(search_widget, &QLineEdit::textChanged, prefix_typing_delay,
201 static_cast<void (QTimer::*)()>(&QTimer::start));
202 connect(prefix_typing_delay, &QTimer::timeout, this,
204
205 connect(view, &QTableView::doubleClicked, this,
207 connect(view, &QTableView::customContextMenuRequested, this,
209
210 connect(abandonAction, &QAction::triggered, this,
212 connect(copyAddressAction, &QAction::triggered, this,
214 connect(copyLabelAction, &QAction::triggered, this,
216 connect(copyAmountAction, &QAction::triggered, this,
218 connect(copyTxIDAction, &QAction::triggered, this,
220 connect(copyTxHexAction, &QAction::triggered, this,
222 connect(copyTxPlainText, &QAction::triggered, this,
224 connect(editLabelAction, &QAction::triggered, this,
226 connect(showDetailsAction, &QAction::triggered, this,
228 // Double-clicking on a transaction on the transaction history page shows
229 // details
230 connect(this, &TransactionView::doubleClicked, this,
232}
233
235 this->model = _model;
236 if (_model) {
238 transactionProxyModel->setSourceModel(
239 _model->getTransactionTableModel());
240 transactionProxyModel->setDynamicSortFilter(true);
241 transactionProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
242 transactionProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
243
244 transactionProxyModel->setSortRole(Qt::EditRole);
245
246 transactionView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
248 transactionView->setAlternatingRowColors(true);
249 transactionView->setSelectionBehavior(QAbstractItemView::SelectRows);
250 transactionView->setSelectionMode(QAbstractItemView::ExtendedSelection);
251 transactionView->horizontalHeader()->setSortIndicator(
252 TransactionTableModel::Date, Qt::DescendingOrder);
253 transactionView->setSortingEnabled(true);
254 transactionView->verticalHeader()->hide();
255
266
269 this);
270
271 if (_model->getOptionsModel()) {
272 // Add third party transaction URLs to context menu
273 QStringList listUrls = GUIUtil::splitSkipEmptyParts(
274 _model->getOptionsModel()->getThirdPartyTxUrls(), "|");
275 for (int i = 0; i < listUrls.size(); ++i) {
276 QString url = listUrls[i].trimmed();
277 QString host = QUrl(url, QUrl::StrictMode).host();
278 if (!host.isEmpty()) {
279 // use host as menu item label
280 QAction *thirdPartyTxUrlAction = new QAction(host, this);
281 if (i == 0) {
282 contextMenu->addSeparator();
283 }
284 contextMenu->addAction(thirdPartyTxUrlAction);
285 connect(thirdPartyTxUrlAction, &QAction::triggered,
286 [this, url] { openThirdPartyTxUrl(url); });
287 }
288 }
289 }
290
291 // show/hide column Watch-only
293
294 // Watch-only signal
295 connect(_model, &WalletModel::notifyWatchonlyChanged, this,
297 }
298}
299
302 return;
303 }
304
305 const QDate currentDate = QDate::currentDate();
306
307#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
308 const QDateTime startofDay = currentDate.startOfDay();
309#else
310 const QDateTime startofDay = QDateTime(currentDate);
311#endif
312 const QDateTime startOfWeek =
313 startofDay.addDays(-(currentDate.dayOfWeek() - 1));
314 const QDateTime startOfMonth = startofDay.addDays(-(currentDate.day() - 1));
315 const QDateTime startOfYear =
316 startofDay.addDays(-(currentDate.dayOfYear() - 1));
317
318 dateRangeWidget->setVisible(false);
319 switch (dateWidget->itemData(idx).toInt()) {
320 case All:
321 transactionProxyModel->setDateRange(std::nullopt, std::nullopt);
322 break;
323 case Today:
324 transactionProxyModel->setDateRange(startofDay, std::nullopt);
325 break;
326 case ThisWeek: {
327 // Find last Monday
328
329 transactionProxyModel->setDateRange(startOfWeek, std::nullopt);
330
331 } break;
332 case ThisMonth:
333
334 transactionProxyModel->setDateRange(startOfMonth, std::nullopt);
335 break;
336 case LastMonth:
337 transactionProxyModel->setDateRange(startOfMonth.addMonths(-1),
338 startOfMonth);
339 break;
340 case ThisYear:
341
342 transactionProxyModel->setDateRange(startOfYear, std::nullopt);
343 break;
344 case Range:
345 dateRangeWidget->setVisible(true);
347 break;
348 }
349}
350
353 return;
354 }
355
356 transactionProxyModel->setTypeFilter(typeWidget->itemData(idx).toInt());
357}
358
361 return;
362 }
363
366 watchOnlyWidget->itemData(idx).toInt()));
367}
368
371 return;
372 }
373
375}
376
379 return;
380 }
381
382 Amount amount_parsed = Amount::zero();
384 amountWidget->text(), &amount_parsed)) {
385 transactionProxyModel->setMinAmount(amount_parsed);
386 } else {
388 }
389}
390
392 if (!model || !model->getOptionsModel()) {
393 return;
394 }
395
396 // CSV is currently the only supported format
397 QString filename = GUIUtil::getSaveFileName(
398 this, tr("Export Transaction History"), QString(),
399 tr("Comma separated file (*.csv)"), nullptr);
400
401 if (filename.isNull()) {
402 return;
403 }
404
405 CSVModelWriter writer(filename);
406
407 // name, column, role
409 writer.addColumn(tr("Confirmed"), 0, TransactionTableModel::ConfirmedRole);
410 if (model->wallet().haveWatchOnly()) {
411 writer.addColumn(tr("Watch-only"), TransactionTableModel::Watchonly);
412 }
413 writer.addColumn(tr("Date"), 0, TransactionTableModel::DateRole);
414 writer.addColumn(tr("Type"), TransactionTableModel::Type, Qt::EditRole);
415 writer.addColumn(tr("Label"), 0, TransactionTableModel::LabelRole);
416 writer.addColumn(tr("Address"), 0, TransactionTableModel::AddressRole);
420 writer.addColumn(tr("ID"), 0, TransactionTableModel::TxIDRole);
421
422 if (!writer.write()) {
423 Q_EMIT message(tr("Exporting Failed"),
424 tr("There was an error trying to save the transaction "
425 "history to %1.")
426 .arg(filename),
428 } else {
429 Q_EMIT message(
430 tr("Exporting Successful"),
431 tr("The transaction history was successfully saved to %1.")
432 .arg(filename),
434 }
435}
436
437void TransactionView::contextualMenu(const QPoint &point) {
438 QModelIndex index = transactionView->indexAt(point);
439 QModelIndexList selection =
440 transactionView->selectionModel()->selectedRows(0);
441 if (selection.empty()) {
442 return;
443 }
444
445 // check if transaction can be abandoned, disable context menu action in
446 // case it doesn't
447 TxId txid;
448 txid.SetHex(selection.at(0)
450 .toString()
451 .toStdString());
457
458 if (index.isValid()) {
460 transactionView->viewport()->mapToGlobal(point));
461 }
462}
463
465 if (!transactionView || !transactionView->selectionModel()) {
466 return;
467 }
468
469 QModelIndexList selection =
470 transactionView->selectionModel()->selectedRows(0);
471
472 // get the hash from the TxHashRole (QVariant / QString)
473 QString hashQStr =
474 selection.at(0).data(TransactionTableModel::TxHashRole).toString();
475
476 TxId txid;
477 txid.SetHex(hashQStr.toStdString());
478
479 // Abandon the wallet transaction over the walletModel
481
482 // Update the table
484 false);
485}
486
490}
491
495}
496
500}
501
504}
505
509}
510
514}
515
517 if (!transactionView->selectionModel() || !model) {
518 return;
519 }
520
521 QModelIndexList selection =
522 transactionView->selectionModel()->selectedRows();
523 if (!selection.isEmpty()) {
525 if (!addressBook) {
526 return;
527 }
528
529 QString address =
530 selection.at(0).data(TransactionTableModel::AddressRole).toString();
531 if (address.isEmpty()) {
532 // If this transaction has no associated address, exit
533 return;
534 }
535 // Is address in address book? Address book can miss address when a
536 // transaction is sent from outside the UI.
537 int idx = addressBook->lookupAddress(address);
538 if (idx != -1) {
539 // Edit sending / receiving address
540 QModelIndex modelIdx = addressBook->index(idx, 0, QModelIndex());
541 // Determine type of address, launch appropriate editor dialog type
542 QString type =
543 modelIdx.data(AddressTableModel::TypeRole).toString();
544
545 auto dlg = new EditAddressDialog(
549 this);
550 dlg->setModel(addressBook);
551 dlg->loadRow(idx);
553 } else {
554 // Add sending address
555 auto dlg = new EditAddressDialog(
557 dlg->setModel(addressBook);
558 dlg->setAddress(address);
560 }
561 }
562}
563
565 if (!transactionView->selectionModel()) {
566 return;
567 }
568
569 QModelIndexList selection =
570 transactionView->selectionModel()->selectedRows();
571 if (!selection.isEmpty()) {
572 TransactionDescDialog *dlg = new TransactionDescDialog(selection.at(0));
573 dlg->setAttribute(Qt::WA_DeleteOnClose);
574 dlg->show();
575 }
576}
577
579 if (!transactionView || !transactionView->selectionModel()) {
580 return;
581 }
582
583 QModelIndexList selection =
584 transactionView->selectionModel()->selectedRows(0);
585 if (!selection.isEmpty()) {
586 QDesktopServices::openUrl(QUrl::fromUserInput(
587 url.replace("%s", selection.at(0)
589 .toString())));
590 }
591}
592
594 dateRangeWidget = new QFrame();
595 dateRangeWidget->setFrameStyle(static_cast<int>(QFrame::Panel) |
596 static_cast<int>(QFrame::Raised));
597 dateRangeWidget->setContentsMargins(1, 1, 1, 1);
598 QHBoxLayout *layout = new QHBoxLayout(dateRangeWidget);
599 layout->setContentsMargins(0, 0, 0, 0);
600 layout->addSpacing(23);
601 layout->addWidget(new QLabel(tr("Range:")));
602
603 dateFrom = new QDateTimeEdit(this);
604 dateFrom->setDisplayFormat("dd/MM/yy");
605 dateFrom->setCalendarPopup(true);
606 dateFrom->setMinimumWidth(100);
607 dateFrom->setDate(QDate::currentDate().addDays(-7));
608 layout->addWidget(dateFrom);
609 layout->addWidget(new QLabel(tr("to")));
610
611 dateTo = new QDateTimeEdit(this);
612 dateTo->setDisplayFormat("dd/MM/yy");
613 dateTo->setCalendarPopup(true);
614 dateTo->setMinimumWidth(100);
615 dateTo->setDate(QDate::currentDate());
616 layout->addWidget(dateTo);
617 layout->addStretch();
618
619 // Hide by default
620 dateRangeWidget->setVisible(false);
621
622 // Notify on change
623 connect(dateFrom, &QDateTimeEdit::dateChanged, this,
625 connect(dateTo, &QDateTimeEdit::dateChanged, this,
627
628 return dateRangeWidget;
629}
630
633 return;
634 }
635
636#if (QT_VERSION >= QT_VERSION_CHECK(5, 14, 0))
637 const QDateTime rangeFrom = dateFrom->date().startOfDay();
638 const QDateTime rangeTo = dateTo->date().endOfDay();
639#else
640 const QDateTime rangeFrom = QDateTime(dateFrom->date());
641 const QDateTime rangeTo = QDateTime(dateTo->date()).addDays(1);
642#endif
643
644 transactionProxyModel->setDateRange(rangeFrom, rangeTo);
645}
646
647void TransactionView::focusTransaction(const QModelIndex &idx) {
649 return;
650 }
651
652 QModelIndex targetIdx = transactionProxyModel->mapFromSource(idx);
653 transactionView->scrollTo(targetIdx);
654 transactionView->setCurrentIndex(targetIdx);
655 transactionView->setFocus();
656}
657
660 return;
661 }
662
663 const QModelIndexList results =
664 this->model->getTransactionTableModel()->match(
665 this->model->getTransactionTableModel()->index(0, 0),
667 QString::fromStdString(txid.ToString()), -1);
668
669 transactionView->setFocus();
670 transactionView->selectionModel()->clearSelection();
671 for (const QModelIndex &index : results) {
672 const QModelIndex targetIndex =
673 transactionProxyModel->mapFromSource(index);
674 transactionView->selectionModel()->select(
675 targetIndex,
676 QItemSelectionModel::Rows | QItemSelectionModel::Select);
677 // Called once per destination to ensure all results are in view, unless
678 // transactions are not ordered by (ascending or descending) date.
679 transactionView->scrollTo(targetIndex);
680 // scrollTo() does not scroll far enough the first time when
681 // transactions are ordered by ascending date.
682 if (index == results[0]) {
683 transactionView->scrollTo(targetIndex);
684 }
685 }
686}
687
688// We override the virtual resizeEvent of the QWidget to adjust tables column
689// sizes as the tables width is proportional to the dialogs width.
690void TransactionView::resizeEvent(QResizeEvent *event) {
691 QWidget::resizeEvent(event);
693}
694
695// Need to override default Ctrl+C action for amount as default behaviour is
696// just to copy DisplayRole text
697bool TransactionView::eventFilter(QObject *obj, QEvent *event) {
698 if (event->type() == QEvent::KeyPress) {
699 QKeyEvent *ke = static_cast<QKeyEvent *>(event);
700 if (ke->key() == Qt::Key_C &&
701 ke->modifiers().testFlag(Qt::ControlModifier)) {
704 return true;
705 }
706 }
707 return QWidget::eventFilter(obj, event);
708}
709
710// show/hide column Watch-only
711void TransactionView::updateWatchOnlyColumn(bool fHaveWatchOnly) {
712 watchOnlyWidget->setVisible(fHaveWatchOnly);
714 !fHaveWatchOnly);
715}
Qt model of the address book in the core.
@ TypeRole
Type of address (Send or Receive)
int lookupAddress(const QString &address) const
QVariant data(const QModelIndex &index, int role) const override
QModelIndex index(int row, int column, const QModelIndex &parent) const override
static const QString Receive
Specifies receive address.
static bool parse(int unit, const QString &value, Amount *val_out)
Parse string to coin amount.
static QString getAmountColumnTitle(int unit)
Gets title for amount column including current display unit if optionsModel reference available *‍/.
@ MSG_INFORMATION
Predefined combinations for certain default usage cases.
Definition: ui_interface.h:72
Export a Qt table model to a CSV file.
bool write()
Perform export of the model to CSV.
void setModel(const QAbstractItemModel *model)
void addColumn(const QString &title, int column, int role=Qt::EditRole)
Dialog for editing an address and associated information.
Makes a QTableView last column feel as if it was being resized from its left border.
Definition: guiutil.h:238
int getDisplayUnit() const
Definition: optionsmodel.h:97
QString getThirdPartyTxUrls() const
Definition: optionsmodel.h:98
QIcon SingleColorIcon(const QString &filename) const
Colorize an icon (given filename) with the icon color.
bool getUseExtraSpacing() const
Definition: platformstyle.h:21
Dialog showing transaction details.
Filter the transaction list according to pre-specified rules.
void setDateRange(const std::optional< QDateTime > &from, const std::optional< QDateTime > &to)
Filter transactions between date range.
void setWatchOnlyFilter(WatchOnlyFilter filter)
static const quint32 ALL_TYPES
Type filter bit field (all types).
static quint32 TYPE(int type)
void setSearchString(const QString &)
void setMinAmount(const Amount minimum)
void setTypeFilter(quint32 modes)
@ TxPlainTextRole
Whole transaction as plain text.
@ LabelRole
Label of address related to transaction.
@ DateRole
Date and time this transaction was created.
@ TxHashRole
Transaction hash.
@ TxHexRole
Transaction data, hex-encoded.
@ TxIDRole
Unique identifier.
@ AddressRole
Address of transaction.
@ ConfirmedRole
Is transaction confirmed?
@ FormattedAmountRole
Formatted amount, without brackets when unconfirmed.
void updateTransaction(const QString &hash, int status, bool showTransaction)
New transaction, or transaction changed status.
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
WalletModel * model
void chooseWatchonly(int idx)
TransactionView(const PlatformStyle *platformStyle, QWidget *parent=nullptr)
QComboBox * typeWidget
QLineEdit * search_widget
bool eventFilter(QObject *obj, QEvent *event) override
QDateTimeEdit * dateFrom
QWidget * createDateRangeWidget()
void setModel(WalletModel *model)
GUIUtil::TableViewLastColumnResizingFixer * columnResizingFixer
void updateWatchOnlyColumn(bool fHaveWatchOnly)
void message(const QString &title, const QString &message, unsigned int style)
Fired when a message should be reported to the user.
void chooseType(int idx)
virtual void resizeEvent(QResizeEvent *event) override
QComboBox * watchOnlyWidget
QAction * abandonAction
QFrame * dateRangeWidget
QDateTimeEdit * dateTo
TransactionFilterProxy * transactionProxyModel
QTableView * transactionView
void focusTransaction(const QModelIndex &)
void chooseDate(int idx)
void contextualMenu(const QPoint &)
QComboBox * dateWidget
QAction * copyAddressAction
void openThirdPartyTxUrl(QString url)
QAction * copyLabelAction
void doubleClicked(const QModelIndex &)
QLineEdit * amountWidget
Interface to Bitcoin wallet from Qt view code.
Definition: walletmodel.h:47
void notifyWatchonlyChanged(bool fHaveWatchonly)
AddressTableModel * getAddressTableModel()
OptionsModel * getOptionsModel()
interfaces::Wallet & wallet() const
Definition: walletmodel.h:150
TransactionTableModel * getTransactionTableModel()
void SetHex(const char *psz)
Definition: uint256.cpp:24
std::string ToString() const
Definition: uint256.h:80
virtual bool transactionCanBeAbandoned(const TxId &txid)=0
Return whether transaction can be abandoned.
virtual bool abandonTransaction(const TxId &txid)=0
Abandon transaction.
virtual bool haveWatchOnly()=0
Return whether wallet has watch only keys.
256-bit opaque blob.
Definition: uint256.h:129
void PopupMenu(QMenu *menu, const QPoint &point, QAction *at_action)
Call QMenu::popup() only on supported QT_QPA_PLATFORM.
Definition: guiutil.cpp:992
void ShowModalDialogAsynchronously(QDialog *dialog)
Shows a QDialog instance asynchronously, and deletes it on close.
Definition: guiutil.cpp:1000
void copyEntryData(const QAbstractItemView *view, int column, int role)
Copy a field of the currently selected entry of a view to the clipboard.
Definition: guiutil.cpp:268
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:310
QStringList splitSkipEmptyParts(const QString &s, const QString &separator)
Definition: guiutil.cpp:451
bool hasEntryData(const QAbstractItemView *view, int column, int role)
Returns true if the specified field of the currently selected view entry is not empty.
Definition: guiutil.cpp:287
const char * url
Definition: rpcconsole.cpp:55
Definition: amount.h:19
static constexpr Amount zero() noexcept
Definition: amount.h:32
A TxId is the identifier of a transaction.
Definition: txid.h:14
@ CT_UPDATED
Definition: ui_change_type.h:9