Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactionview.cpp
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | typeWidget->addItem(tr("To yourself"), TransactionFilterProxy::TYPE( | ||||
TransactionRecord::SendToSelf)); | TransactionRecord::SendToSelf)); | ||||
typeWidget->addItem(tr("Mined"), TransactionFilterProxy::TYPE( | typeWidget->addItem(tr("Mined"), TransactionFilterProxy::TYPE( | ||||
TransactionRecord::Generated)); | TransactionRecord::Generated)); | ||||
typeWidget->addItem(tr("Other"), | typeWidget->addItem(tr("Other"), | ||||
TransactionFilterProxy::TYPE(TransactionRecord::Other)); | TransactionFilterProxy::TYPE(TransactionRecord::Other)); | ||||
hlayout->addWidget(typeWidget); | hlayout->addWidget(typeWidget); | ||||
addressWidget = new QLineEdit(this); | search_widget = new QLineEdit(this); | ||||
addressWidget->setPlaceholderText(tr("Enter address or label to search")); | search_widget->setPlaceholderText( | ||||
hlayout->addWidget(addressWidget); | tr("Enter address, transaction id, or label to search")); | ||||
hlayout->addWidget(search_widget); | |||||
amountWidget = new QLineEdit(this); | amountWidget = new QLineEdit(this); | ||||
amountWidget->setPlaceholderText(tr("Min amount")); | amountWidget->setPlaceholderText(tr("Min amount")); | ||||
if (platformStyle->getUseExtraSpacing()) { | if (platformStyle->getUseExtraSpacing()) { | ||||
amountWidget->setFixedWidth(97); | amountWidget->setFixedWidth(97); | ||||
} else { | } else { | ||||
amountWidget->setFixedWidth(100); | amountWidget->setFixedWidth(100); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 70 Lines • ▼ Show 20 Lines | TransactionView::TransactionView(const PlatformStyle *platformStyle, | ||||
connect(dateWidget, SIGNAL(activated(int)), this, SLOT(chooseDate(int))); | connect(dateWidget, SIGNAL(activated(int)), this, SLOT(chooseDate(int))); | ||||
connect(typeWidget, SIGNAL(activated(int)), this, SLOT(chooseType(int))); | connect(typeWidget, SIGNAL(activated(int)), this, SLOT(chooseType(int))); | ||||
connect(watchOnlyWidget, SIGNAL(activated(int)), this, | connect(watchOnlyWidget, SIGNAL(activated(int)), this, | ||||
SLOT(chooseWatchonly(int))); | SLOT(chooseWatchonly(int))); | ||||
connect(amountWidget, SIGNAL(textChanged(QString)), amount_typing_delay, | connect(amountWidget, SIGNAL(textChanged(QString)), amount_typing_delay, | ||||
SLOT(start())); | SLOT(start())); | ||||
connect(amount_typing_delay, SIGNAL(timeout()), this, | connect(amount_typing_delay, SIGNAL(timeout()), this, | ||||
SLOT(changedAmount())); | SLOT(changedAmount())); | ||||
connect(addressWidget, SIGNAL(textChanged(QString)), prefix_typing_delay, | connect(search_widget, SIGNAL(textChanged(QString)), prefix_typing_delay, | ||||
SLOT(start())); | SLOT(start())); | ||||
connect(prefix_typing_delay, SIGNAL(timeout()), this, | connect(prefix_typing_delay, SIGNAL(timeout()), this, | ||||
SLOT(changedPrefix())); | SLOT(changedSearch())); | ||||
connect(view, SIGNAL(doubleClicked(QModelIndex)), this, | connect(view, SIGNAL(doubleClicked(QModelIndex)), this, | ||||
SIGNAL(doubleClicked(QModelIndex))); | SIGNAL(doubleClicked(QModelIndex))); | ||||
connect(view, SIGNAL(customContextMenuRequested(QPoint)), this, | connect(view, SIGNAL(customContextMenuRequested(QPoint)), this, | ||||
SLOT(contextualMenu(QPoint))); | SLOT(contextualMenu(QPoint))); | ||||
connect(abandonAction, SIGNAL(triggered()), this, SLOT(abandonTx())); | connect(abandonAction, SIGNAL(triggered()), this, SLOT(abandonTx())); | ||||
connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(copyAddress())); | connect(copyAddressAction, SIGNAL(triggered()), this, SLOT(copyAddress())); | ||||
▲ Show 20 Lines • Show All 136 Lines • ▼ Show 20 Lines | if (!transactionProxyModel) { | ||||
return; | return; | ||||
} | } | ||||
transactionProxyModel->setWatchOnlyFilter( | transactionProxyModel->setWatchOnlyFilter( | ||||
static_cast<TransactionFilterProxy::WatchOnlyFilter>( | static_cast<TransactionFilterProxy::WatchOnlyFilter>( | ||||
watchOnlyWidget->itemData(idx).toInt())); | watchOnlyWidget->itemData(idx).toInt())); | ||||
} | } | ||||
void TransactionView::changedPrefix() { | void TransactionView::changedSearch() { | ||||
if (!transactionProxyModel) { | if (!transactionProxyModel) { | ||||
return; | return; | ||||
} | } | ||||
transactionProxyModel->setAddressPrefix(addressWidget->text()); | transactionProxyModel->setSearchString(search_widget->text()); | ||||
} | } | ||||
void TransactionView::changedAmount() { | void TransactionView::changedAmount() { | ||||
if (!transactionProxyModel) { | if (!transactionProxyModel) { | ||||
return; | return; | ||||
} | } | ||||
Amount amount_parsed = Amount::zero(); | Amount amount_parsed = Amount::zero(); | ||||
▲ Show 20 Lines • Show All 317 Lines • Show Last 20 Lines |