aboutsummaryrefslogtreecommitdiff
path: root/src/qt/transactionview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/qt/transactionview.cpp')
-rw-r--r--src/qt/transactionview.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/qt/transactionview.cpp b/src/qt/transactionview.cpp
index eaed48bfdf..a0e7dd4e77 100644
--- a/src/qt/transactionview.cpp
+++ b/src/qt/transactionview.cpp
@@ -81,12 +81,14 @@ TransactionView::TransactionView(QWidget *parent) :
addressWidget = new QLineEdit(this);
#if QT_VERSION >= 0x040700
+ /* Do not move this to the XML file, Qt before 4.7 will choke on it */
addressWidget->setPlaceholderText(tr("Enter address or label to search"));
#endif
hlayout->addWidget(addressWidget);
amountWidget = new QLineEdit(this);
#if QT_VERSION >= 0x040700
+ /* Do not move this to the XML file, Qt before 4.7 will choke on it */
amountWidget->setPlaceholderText(tr("Min amount"));
#endif
#ifdef Q_WS_MAC
@@ -125,7 +127,7 @@ TransactionView::TransactionView(QWidget *parent) :
QAction *copyLabelAction = new QAction(tr("Copy label"), this);
QAction *copyAmountAction = new QAction(tr("Copy amount"), this);
QAction *editLabelAction = new QAction(tr("Edit label"), this);
- QAction *showDetailsAction = new QAction(tr("Show details..."), this);
+ QAction *showDetailsAction = new QAction(tr("Show transaction details"), this);
contextMenu = new QMenu();
contextMenu->addAction(copyAddressAction);
@@ -415,3 +417,13 @@ void TransactionView::dateRangeChanged()
QDateTime(dateFrom->date()),
QDateTime(dateTo->date()).addDays(1));
}
+
+void TransactionView::focusTransaction(const QModelIndex &idx)
+{
+ if(!transactionProxyModel)
+ return;
+ QModelIndex targetIdx = transactionProxyModel->mapFromSource(idx);
+ transactionView->scrollTo(targetIdx);
+ transactionView->setCurrentIndex(targetIdx);
+ transactionView->setFocus();
+}