Dash Core  0.12.2.1
P2P Digital Currency
transactionview.cpp
Go to the documentation of this file.
1 // Copyright (c) 2011-2015 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 "transactionview.h"
6 
7 #include "addresstablemodel.h"
8 #include "bitcoinunits.h"
9 #include "csvmodelwriter.h"
10 #include "editaddressdialog.h"
11 #include "guiutil.h"
12 #include "optionsmodel.h"
13 #include "platformstyle.h"
14 #include "transactiondescdialog.h"
15 #include "transactionfilterproxy.h"
16 #include "transactionrecord.h"
17 #include "transactiontablemodel.h"
18 #include "walletmodel.h"
19 
20 #include "ui_interface.h"
21 
22 #include <QComboBox>
23 #include <QDateTimeEdit>
24 #include <QDesktopServices>
25 #include <QDoubleValidator>
26 #include <QHBoxLayout>
27 #include <QHeaderView>
28 #include <QLabel>
29 #include <QLineEdit>
30 #include <QMenu>
31 #include <QPoint>
32 #include <QScrollBar>
33 #include <QSettings>
34 #include <QSignalMapper>
35 #include <QTableView>
36 #include <QUrl>
37 #include <QVBoxLayout>
38 
40 static const char* PERSISTENCE_DATE_FORMAT = "yyyy-MM-dd";
41 
42 TransactionView::TransactionView(const PlatformStyle *platformStyle, QWidget *parent) :
43  QWidget(parent), model(0), transactionProxyModel(0),
44  transactionView(0), abandonAction(0), columnResizingFixer(0)
45 {
46  QSettings settings;
47  // Build filter row
48  setContentsMargins(0,0,0,0);
49 
50  QHBoxLayout *hlayout = new QHBoxLayout();
51  hlayout->setContentsMargins(0,0,0,0);
52  if (platformStyle->getUseExtraSpacing()) {
53  hlayout->setSpacing(0);
54  hlayout->addSpacing(6);
55  } else {
56  hlayout->setSpacing(1);
57  hlayout->addSpacing(5);
58  }
59  QString theme = GUIUtil::getThemeName();
60  watchOnlyWidget = new QComboBox(this);
61  watchOnlyWidget->setFixedWidth(24);
63  watchOnlyWidget->addItem(QIcon(":/icons/" + theme + "/eye_plus"), "", TransactionFilterProxy::WatchOnlyFilter_Yes);
64  watchOnlyWidget->addItem(QIcon(":/icons/" + theme + "/eye_minus"), "", TransactionFilterProxy::WatchOnlyFilter_No);
65  hlayout->addWidget(watchOnlyWidget);
66 
67  dateWidget = new QComboBox(this);
68  if (platformStyle->getUseExtraSpacing()) {
69  dateWidget->setFixedWidth(120);
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  dateWidget->setCurrentIndex(settings.value("transactionDate").toInt());
81  hlayout->addWidget(dateWidget);
82 
83  typeWidget = new QComboBox(this);
84  if (platformStyle->getUseExtraSpacing()) {
85  typeWidget->setFixedWidth(TYPE_COLUMN_WIDTH);
86  } else {
87  typeWidget->setFixedWidth(TYPE_COLUMN_WIDTH-1);
88  }
89 
90  typeWidget->addItem(tr("All"), TransactionFilterProxy::ALL_TYPES);
91  typeWidget->addItem(tr("Most Common"), TransactionFilterProxy::COMMON_TYPES);
97  typeWidget->addItem(tr("PrivateSend Make Collateral Inputs"), TransactionFilterProxy::TYPE(TransactionRecord::PrivateSendMakeCollaterals));
98  typeWidget->addItem(tr("PrivateSend Create Denominations"), TransactionFilterProxy::TYPE(TransactionRecord::PrivateSendCreateDenominations));
100  typeWidget->addItem(tr("PrivateSend Collateral Payment"), TransactionFilterProxy::TYPE(TransactionRecord::PrivateSendCollateralPayment));
104  typeWidget->setCurrentIndex(settings.value("transactionType").toInt());
105 
106  hlayout->addWidget(typeWidget);
107 
108  addressWidget = new QLineEdit(this);
109 #if QT_VERSION >= 0x040700
110  addressWidget->setPlaceholderText(tr("Enter address or label to search"));
111 #endif
112  addressWidget->setObjectName("addressWidget");
113  hlayout->addWidget(addressWidget);
114 
115  amountWidget = new QLineEdit(this);
116 #if QT_VERSION >= 0x040700
117  amountWidget->setPlaceholderText(tr("Min amount"));
118 #endif
119  if (platformStyle->getUseExtraSpacing()) {
120  amountWidget->setFixedWidth(118);
121  } else {
122  amountWidget->setFixedWidth(125);
123  }
124  amountWidget->setValidator(new QDoubleValidator(0, 1e20, 8, this));
125  amountWidget->setObjectName("amountWidget");
126  hlayout->addWidget(amountWidget);
127 
128  QVBoxLayout *vlayout = new QVBoxLayout(this);
129  vlayout->setContentsMargins(0,0,0,0);
130  vlayout->setSpacing(0);
131 
132  QTableView *view = new QTableView(this);
133  vlayout->addLayout(hlayout);
134  vlayout->addWidget(createDateRangeWidget());
135  vlayout->addWidget(view);
136  vlayout->setSpacing(0);
137  int width = view->verticalScrollBar()->sizeHint().width();
138  // Cover scroll bar width with spacing
139  if (platformStyle->getUseExtraSpacing()) {
140  hlayout->addSpacing(width+2);
141  } else {
142  hlayout->addSpacing(width);
143  }
144  // Always show scroll bar
145  view->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
146  view->setTabKeyNavigation(false);
147  view->setContextMenuPolicy(Qt::CustomContextMenu);
148 
149  view->installEventFilter(this);
150 
151  transactionView = view;
152 
153  // Actions
154  abandonAction = new QAction(tr("Abandon transaction"), this);
155  QAction *copyAddressAction = new QAction(tr("Copy address"), this);
156  QAction *copyLabelAction = new QAction(tr("Copy label"), this);
157  QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
158  QAction *copyTxIDAction = new QAction(tr("Copy transaction ID"), this);
159  QAction *copyTxHexAction = new QAction(tr("Copy raw transaction"), this);
160  QAction *copyTxPlainText = new QAction(tr("Copy full transaction details"), this);
161  QAction *editLabelAction = new QAction(tr("Edit label"), this);
162  QAction *showDetailsAction = new QAction(tr("Show transaction details"), this);
163 
164  contextMenu = new QMenu(this);
165  contextMenu->addAction(copyAddressAction);
166  contextMenu->addAction(copyLabelAction);
167  contextMenu->addAction(copyAmountAction);
168  contextMenu->addAction(copyTxIDAction);
169  contextMenu->addAction(copyTxHexAction);
170  contextMenu->addAction(copyTxPlainText);
171  contextMenu->addAction(showDetailsAction);
172  contextMenu->addSeparator();
173  contextMenu->addAction(abandonAction);
174  contextMenu->addAction(editLabelAction);
175 
176  mapperThirdPartyTxUrls = new QSignalMapper(this);
177 
178  // Connect actions
179  connect(mapperThirdPartyTxUrls, SIGNAL(mapped(QString)), this, SLOT(openThirdPartyTxUrl(QString)));
180 
181  connect(dateWidget, SIGNAL(activated(int)), this, SLOT(chooseDate(int)));
182  connect(typeWidget, SIGNAL(activated(int)), this, SLOT(chooseType(int)));
183  connect(watchOnlyWidget, SIGNAL(activated(int)), this, SLOT(chooseWatchonly(int)));
184  connect(addressWidget, SIGNAL(textChanged(QString)), this, SLOT(changedPrefix(QString)));
185  connect(amountWidget, SIGNAL(textChanged(QString)), this, SLOT(changedAmount(QString)));
186 
187  connect(view, SIGNAL(doubleClicked(QModelIndex)), this, SIGNAL(doubleClicked(QModelIndex)));
188  connect(view, SIGNAL(clicked(QModelIndex)), this, SLOT(computeSum()));
189  connect(view, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextualMenu(QPoint)));
190 
191  connect(abandonAction, SIGNAL(triggered()), this, SLOT(abandonTx()));
192  connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(copyAddress()));
193  connect(copyLabelAction, SIGNAL(triggered()), this, SLOT(copyLabel()));
194  connect(copyAmountAction, SIGNAL(triggered()), this, SLOT(copyAmount()));
195  connect(copyTxIDAction, SIGNAL(triggered()), this, SLOT(copyTxID()));
196  connect(copyTxHexAction, SIGNAL(triggered()), this, SLOT(copyTxHex()));
197  connect(copyTxPlainText, SIGNAL(triggered()), this, SLOT(copyTxPlainText()));
198  connect(editLabelAction, SIGNAL(triggered()), this, SLOT(editLabel()));
199  connect(showDetailsAction, SIGNAL(triggered()), this, SLOT(showDetails()));
200 }
201 
203 {
204  QSettings settings;
205  this->model = model;
206  if(model)
207  {
210  transactionProxyModel->setDynamicSortFilter(true);
211  transactionProxyModel->setSortCaseSensitivity(Qt::CaseInsensitive);
212  transactionProxyModel->setFilterCaseSensitivity(Qt::CaseInsensitive);
213 
214  transactionProxyModel->setSortRole(Qt::EditRole);
215 
216  transactionView->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
218  transactionView->setAlternatingRowColors(true);
219  transactionView->setSelectionBehavior(QAbstractItemView::SelectRows);
220  transactionView->setSelectionMode(QAbstractItemView::ExtendedSelection);
221  transactionView->setSortingEnabled(true);
222  transactionView->sortByColumn(TransactionTableModel::Status, Qt::DescendingOrder);
223  transactionView->verticalHeader()->hide();
224 
230 
231  // Note: it's a good idea to connect this signal AFTER the model is set
232  connect(transactionView->selectionModel(), SIGNAL(selectionChanged(QItemSelection, QItemSelection)), this, SLOT(computeSum()));
233 
235 
236  if (model->getOptionsModel())
237  {
238  // Add third party transaction URLs to context menu
239  QStringList listUrls = model->getOptionsModel()->getThirdPartyTxUrls().split("|", QString::SkipEmptyParts);
240  for (int i = 0; i < listUrls.size(); ++i)
241  {
242  QString host = QUrl(listUrls[i].trimmed(), QUrl::StrictMode).host();
243  if (!host.isEmpty())
244  {
245  QAction *thirdPartyTxUrlAction = new QAction(host, this); // use host as menu item label
246  if (i == 0)
247  contextMenu->addSeparator();
248  contextMenu->addAction(thirdPartyTxUrlAction);
249  connect(thirdPartyTxUrlAction, SIGNAL(triggered()), mapperThirdPartyTxUrls, SLOT(map()));
250  mapperThirdPartyTxUrls->setMapping(thirdPartyTxUrlAction, listUrls[i].trimmed());
251  }
252  }
253  }
254 
255  // show/hide column Watch-only
257 
258  // Watch-only signal
259  connect(model, SIGNAL(notifyWatchonlyChanged(bool)), this, SLOT(updateWatchOnlyColumn(bool)));
260 
261  // Update transaction list with persisted settings
262  chooseType(settings.value("transactionType").toInt());
263  chooseDate(settings.value("transactionDate").toInt());
264  }
265 }
266 
268 {
270  return;
271 
272  QSettings settings;
273  QDate current = QDate::currentDate();
274  dateRangeWidget->setVisible(false);
275  switch(dateWidget->itemData(idx).toInt())
276  {
277  case All:
281  break;
282  case Today:
284  QDateTime(current),
286  break;
287  case ThisWeek: {
288  // Find last Monday
289  QDate startOfWeek = current.addDays(-(current.dayOfWeek()-1));
291  QDateTime(startOfWeek),
293 
294  } break;
295  case ThisMonth:
297  QDateTime(QDate(current.year(), current.month(), 1)),
299  break;
300  case LastMonth:
302  QDateTime(QDate(current.year(), current.month(), 1).addMonths(-1)),
303  QDateTime(QDate(current.year(), current.month(), 1)));
304  break;
305  case ThisYear:
307  QDateTime(QDate(current.year(), 1, 1)),
309  break;
310  case Range:
311  dateRangeWidget->setVisible(true);
313  break;
314  }
315  // Persist new date settings
316  settings.setValue("transactionDate", idx);
317  if (dateWidget->itemData(idx).toInt() == Range){
318  settings.setValue("transactionDateFrom", dateFrom->date().toString(PERSISTENCE_DATE_FORMAT));
319  settings.setValue("transactionDateTo", dateTo->date().toString(PERSISTENCE_DATE_FORMAT));
320  }
321 }
322 
324 {
326  return;
328  typeWidget->itemData(idx).toInt());
329  // Persist settings
330  QSettings settings;
331  settings.setValue("transactionType", idx);
332 }
333 
335 {
337  return;
340 }
341 
343 {
345  return;
347 }
348 
349 void TransactionView::changedAmount(const QString &amount)
350 {
352  return;
353  CAmount amount_parsed = 0;
354 
355  // Replace "," by "." so BitcoinUnits::parse will not fail for users entering "," as decimal separator
356  QString newAmount = amount;
357  newAmount.replace(QString(","), QString("."));
358 
359  if(BitcoinUnits::parse(model->getOptionsModel()->getDisplayUnit(), newAmount, &amount_parsed))
360  {
361  transactionProxyModel->setMinAmount(amount_parsed);
362  }
363  else
364  {
366  }
367 }
368 
370 {
371  // CSV is currently the only supported format
372  QString filename = GUIUtil::getSaveFileName(this,
373  tr("Export Transaction History"), QString(),
374  tr("Comma separated file (*.csv)"), NULL);
375 
376  if (filename.isNull())
377  return;
378 
379  CSVModelWriter writer(filename);
380 
381  // name, column, role
383  writer.addColumn(tr("Confirmed"), 0, TransactionTableModel::ConfirmedRole);
384  if (model && model->haveWatchOnly())
385  writer.addColumn(tr("Watch-only"), TransactionTableModel::Watchonly);
386  writer.addColumn(tr("Date"), 0, TransactionTableModel::DateRole);
387  writer.addColumn(tr("Type"), TransactionTableModel::Type, Qt::EditRole);
388  writer.addColumn(tr("Label"), 0, TransactionTableModel::LabelRole);
389  writer.addColumn(tr("Address"), 0, TransactionTableModel::AddressRole);
391  writer.addColumn(tr("ID"), 0, TransactionTableModel::TxIDRole);
392 
393  if(!writer.write()) {
394  Q_EMIT message(tr("Exporting Failed"), tr("There was an error trying to save the transaction history to %1.").arg(filename),
396  }
397  else {
398  Q_EMIT message(tr("Exporting Successful"), tr("The transaction history was successfully saved to %1.").arg(filename),
400  }
401 }
402 
403 void TransactionView::contextualMenu(const QPoint &point)
404 {
405  QModelIndex index = transactionView->indexAt(point);
406  QModelIndexList selection = transactionView->selectionModel()->selectedRows(0);
407 
408  // check if transaction can be abandoned, disable context menu action in case it doesn't
409  uint256 hash;
410  hash.SetHex(selection.at(0).data(TransactionTableModel::TxHashRole).toString().toStdString());
411  abandonAction->setEnabled(model->transactionCanBeAbandoned(hash));
412 
413  if(index.isValid())
414  {
415  contextMenu->exec(QCursor::pos());
416  }
417 }
418 
420 {
421  if(!transactionView || !transactionView->selectionModel())
422  return;
423  QModelIndexList selection = transactionView->selectionModel()->selectedRows(0);
424 
425  // get the hash from the TxHashRole (QVariant / QString)
426  uint256 hash;
427  QString hashQStr = selection.at(0).data(TransactionTableModel::TxHashRole).toString();
428  hash.SetHex(hashQStr.toStdString());
429 
430  // Abandon the wallet transaction over the walletModel
431  model->abandonTransaction(hash);
432 
433  // Update the table
435 }
436 
438 {
440 }
441 
443 {
445 }
446 
448 {
450 }
451 
453 {
455 }
456 
458 {
460 }
461 
463 {
465 }
466 
468 {
469  if(!transactionView->selectionModel() ||!model)
470  return;
471  QModelIndexList selection = transactionView->selectionModel()->selectedRows();
472  if(!selection.isEmpty())
473  {
474  AddressTableModel *addressBook = model->getAddressTableModel();
475  if(!addressBook)
476  return;
477  QString address = selection.at(0).data(TransactionTableModel::AddressRole).toString();
478  if(address.isEmpty())
479  {
480  // If this transaction has no associated address, exit
481  return;
482  }
483  // Is address in address book? Address book can miss address when a transaction is
484  // sent from outside the UI.
485  int idx = addressBook->lookupAddress(address);
486  if(idx != -1)
487  {
488  // Edit sending / receiving address
489  QModelIndex modelIdx = addressBook->index(idx, 0, QModelIndex());
490  // Determine type of address, launch appropriate editor dialog type
491  QString type = modelIdx.data(AddressTableModel::TypeRole).toString();
492 
493  EditAddressDialog dlg(
497  dlg.setModel(addressBook);
498  dlg.loadRow(idx);
499  dlg.exec();
500  }
501  else
502  {
503  // Add sending address
505  this);
506  dlg.setModel(addressBook);
507  dlg.setAddress(address);
508  dlg.exec();
509  }
510  }
511 }
512 
514 {
515  if(!transactionView->selectionModel())
516  return;
517  QModelIndexList selection = transactionView->selectionModel()->selectedRows();
518  if(!selection.isEmpty())
519  {
520  TransactionDescDialog dlg(selection.at(0));
521  dlg.exec();
522  }
523 }
524 
527 {
528  qint64 amount = 0;
529  int nDisplayUnit = model->getOptionsModel()->getDisplayUnit();
530  if(!transactionView->selectionModel())
531  return;
532  QModelIndexList selection = transactionView->selectionModel()->selectedRows();
533 
534  Q_FOREACH (QModelIndex index, selection){
535  amount += index.data(TransactionTableModel::AmountRole).toLongLong();
536  }
537  QString strAmount(BitcoinUnits::formatWithUnit(nDisplayUnit, amount, true, BitcoinUnits::separatorAlways));
538  if (amount < 0) strAmount = "<span style='color:red;'>" + strAmount + "</span>";
539  Q_EMIT trxAmount(strAmount);
540 }
541 
543 {
544  if(!transactionView || !transactionView->selectionModel())
545  return;
546  QModelIndexList selection = transactionView->selectionModel()->selectedRows(0);
547  if(!selection.isEmpty())
548  QDesktopServices::openUrl(QUrl::fromUserInput(url.replace("%s", selection.at(0).data(TransactionTableModel::TxHashRole).toString())));
549 }
550 
552 {
553  // Create default dates in case nothing is persisted
554  QString defaultDateFrom = QDate::currentDate().toString(PERSISTENCE_DATE_FORMAT);
555  QString defaultDateTo = QDate::currentDate().addDays(1).toString(PERSISTENCE_DATE_FORMAT);
556  QSettings settings;
557 
558  dateRangeWidget = new QFrame();
559  dateRangeWidget->setFrameStyle(QFrame::Panel | QFrame::Raised);
560  dateRangeWidget->setContentsMargins(1,1,1,1);
561  QHBoxLayout *layout = new QHBoxLayout(dateRangeWidget);
562  layout->setContentsMargins(0,0,0,0);
563  layout->addSpacing(23);
564  layout->addWidget(new QLabel(tr("Range:")));
565 
566  dateFrom = new QDateTimeEdit(this);
567  dateFrom->setCalendarPopup(true);
568  dateFrom->setMinimumWidth(100);
569  // Load persisted FROM date
570  dateFrom->setDate(QDate::fromString(settings.value("transactionDateFrom", defaultDateFrom).toString(), PERSISTENCE_DATE_FORMAT));
571 
572  layout->addWidget(dateFrom);
573  layout->addWidget(new QLabel(tr("to")));
574 
575  dateTo = new QDateTimeEdit(this);
576  dateTo->setCalendarPopup(true);
577  dateTo->setMinimumWidth(100);
578  // Load persisted TO date
579  dateTo->setDate(QDate::fromString(settings.value("transactionDateTo", defaultDateTo).toString(), PERSISTENCE_DATE_FORMAT));
580 
581  layout->addWidget(dateTo);
582  layout->addStretch();
583 
584  // Hide by default
585  dateRangeWidget->setVisible(false);
586 
587  // Notify on change
588  connect(dateFrom, SIGNAL(dateChanged(QDate)), this, SLOT(dateRangeChanged()));
589  connect(dateTo, SIGNAL(dateChanged(QDate)), this, SLOT(dateRangeChanged()));
590 
591  return dateRangeWidget;
592 }
593 
595 {
597  return;
598 
599  // Persist new date range
600  QSettings settings;
601  settings.setValue("transactionDateFrom", dateFrom->date().toString(PERSISTENCE_DATE_FORMAT));
602  settings.setValue("transactionDateTo", dateTo->date().toString(PERSISTENCE_DATE_FORMAT));
603 
605  QDateTime(dateFrom->date()),
606  QDateTime(dateTo->date()));
607 }
608 
609 void TransactionView::focusTransaction(const QModelIndex &idx)
610 {
612  return;
613  QModelIndex targetIdx = transactionProxyModel->mapFromSource(idx);
614  transactionView->selectRow(targetIdx.row());
615  computeSum();
616  transactionView->scrollTo(targetIdx);
617  transactionView->setCurrentIndex(targetIdx);
618  transactionView->setFocus();
619 }
620 
621 // We override the virtual resizeEvent of the QWidget to adjust tables column
622 // sizes as the tables width is proportional to the dialogs width.
623 void TransactionView::resizeEvent(QResizeEvent* event)
624 {
625  QWidget::resizeEvent(event);
627 }
628 
629 // Need to override default Ctrl+C action for amount as default behaviour is just to copy DisplayRole text
630 bool TransactionView::eventFilter(QObject *obj, QEvent *event)
631 {
632  if (event->type() == QEvent::KeyPress)
633  {
634  QKeyEvent *ke = static_cast<QKeyEvent *>(event);
635  if (ke->key() == Qt::Key_C && ke->modifiers().testFlag(Qt::ControlModifier))
636  {
638  return true;
639  }
640  }
641  return QWidget::eventFilter(obj, event);
642 }
643 
644 // show/hide column Watch-only
645 void TransactionView::updateWatchOnlyColumn(bool fHaveWatchOnly)
646 {
647  watchOnlyWidget->setVisible(true);
648  transactionView->setColumnHidden(TransactionTableModel::Watchonly, !fHaveWatchOnly);
649 }
uint8_t data[WIDTH]
Definition: uint256.h:24
static const quint32 COMMON_TYPES
QWidget * createDateRangeWidget()
void updateWatchOnlyColumn(bool fHaveWatchOnly)
QComboBox * typeWidget
static const QString Receive
void setModel(AddressTableModel *model)
bool eventFilter(QObject *obj, QEvent *event)
void setAddressPrefix(const QString &addrPrefix)
TransactionView(const PlatformStyle *platformStyle, QWidget *parent=0)
void setModel(const QAbstractItemModel *model)
QTableView * transactionView
static const QDateTime MAX_DATE
static QString getAmountColumnTitle(int unit)
Gets title for amount column including current display unit if optionsModel reference available */...
static bool parse(int unit, const QString &value, CAmount *val_out)
Parse string to coin amount.
void focusTransaction(const QModelIndex &)
void chooseWatchonly(int idx)
int lookupAddress(const QString &address) const
const char * prefix
Definition: rest.cpp:600
QComboBox * watchOnlyWidget
QAction * abandonAction
void setModel(WalletModel *model)
void changedAmount(const QString &amount)
static const QDateTime MIN_DATE
static const char * PERSISTENCE_DATE_FORMAT
void updateTransaction(const QString &hash, int status, bool showTransaction)
static QString formatWithUnit(int unit, const CAmount &amount, bool plussign=false, SeparatorStyle separators=separatorStandard)
Format as string (with unit)
bool haveWatchOnly() const
void message(const QString &title, const QString &message, unsigned int style)
TransactionTableModel * getTransactionTableModel()
void copyEntryData(QAbstractItemView *view, int column, int role)
Definition: guiutil.cpp:281
dictionary settings
QDateTimeEdit * dateFrom
void addColumn(const QString &title, int column, int role=Qt::EditRole)
int64_t CAmount
Definition: amount.h:14
TransactionFilterProxy * transactionProxyModel
const char * url
Definition: rpcconsole.cpp:62
QModelIndex index(int row, int column, const QModelIndex &parent) const
void changedPrefix(const QString &prefix)
void openThirdPartyTxUrl(QString url)
static quint32 TYPE(int type)
QString getSaveFileName(QWidget *parent, const QString &caption, const QString &dir, const QString &filter, QString *selectedSuffixOut)
Definition: guiutil.cpp:301
QString getThirdPartyTxUrls()
Definition: optionsmodel.h:74
QComboBox * dateWidget
void setAddress(const QString &address)
void doubleClicked(const QModelIndex &)
void contextualMenu(const QPoint &)
QDateTimeEdit * dateTo
OptionsModel * getOptionsModel()
static const quint32 ALL_TYPES
void chooseDate(int idx)
bool getUseExtraSpacing() const
Definition: platformstyle.h:22
TransactionTableModel * parent
QLineEdit * addressWidget
void setWatchOnlyFilter(WatchOnlyFilter filter)
QFrame * dateRangeWidget
QSignalMapper * mapperThirdPartyTxUrls
void chooseType(int idx)
QString getThemeName()
Definition: guiutil.cpp:902
TransactionRecord * index(int idx)
virtual void resizeEvent(QResizeEvent *event)
void setDateRange(const QDateTime &from, const QDateTime &to)
void trxAmount(QString amount)
QVariant data(const QModelIndex &index, int role) const
int getDisplayUnit()
Definition: optionsmodel.h:73
QLineEdit * amountWidget
bool abandonTransaction(uint256 hash) const
void setMinAmount(const CAmount &minimum)
void SetHex(const char *psz)
Definition: uint256.cpp:30
bool transactionCanBeAbandoned(uint256 hash) const
AddressTableModel * getAddressTableModel()
WalletModel * model
GUIUtil::TableViewLastColumnResizingFixer * columnResizingFixer
void setTypeFilter(quint32 modes)