diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-04-25 16:10:01 +0200 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2013-04-25 16:15:31 +0200 |
commit | 46fd626b21a1273a37c78749aebce1d3e3de5aee (patch) | |
tree | 5eda9b6e2452006775dfbad1be839bf49eb7c04b /src/qt/walletview.cpp | |
parent | 77a1e12eed5fc66dce16584696f54988a8c2bf4e (diff) |
small updates for walletview.cpp
- make "&Export" translatable
- fix some includes
- small formatting changes
Diffstat (limited to 'src/qt/walletview.cpp')
-rw-r--r-- | src/qt/walletview.cpp | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/src/qt/walletview.cpp b/src/qt/walletview.cpp index 727b48ded7..6d44c174b7 100644 --- a/src/qt/walletview.cpp +++ b/src/qt/walletview.cpp @@ -18,8 +18,8 @@ #include "askpassphrasedialog.h" #include "ui_interface.h" +#include <QHBoxLayout> #include <QVBoxLayout> -#include <QActionGroup> #include <QAction> #include <QDesktopServices> #include <QFileDialog> @@ -39,7 +39,7 @@ WalletView::WalletView(QWidget *parent, BitcoinGUI *_gui): QHBoxLayout *hbox_buttons = new QHBoxLayout(); transactionView = new TransactionView(this); vbox->addWidget(transactionView); - QPushButton *exportButton = new QPushButton("&Export", this); + QPushButton *exportButton = new QPushButton(tr("&Export"), this); exportButton->setToolTip(tr("Export the data in the current tab to a file")); #ifndef Q_OS_MAC // Icons on push buttons are very uncommon on Mac exportButton->setIcon(QIcon(":/icons/export")); @@ -138,14 +138,10 @@ void WalletView::incomingTransaction(const QModelIndex& parent, int start, int / TransactionTableModel *ttm = walletModel->getTransactionTableModel(); - QString date = ttm->index(start, TransactionTableModel::Date, parent) - .data().toString(); - qint64 amount = ttm->index(start, TransactionTableModel::Amount, parent) - .data(Qt::EditRole).toULongLong(); - QString type = ttm->index(start, TransactionTableModel::Type, parent) - .data().toString(); - QString address = ttm->index(start, TransactionTableModel::ToAddress, parent) - .data().toString(); + QString date = ttm->index(start, TransactionTableModel::Date, parent).data().toString(); + qint64 amount = ttm->index(start, TransactionTableModel::Amount, parent).data(Qt::EditRole).toULongLong(); + QString type = ttm->index(start, TransactionTableModel::Type, parent).data().toString(); + QString address = ttm->index(start, TransactionTableModel::ToAddress, parent).data().toString(); gui->incomingTransaction(date, walletModel->getOptionsModel()->getDisplayUnit(), amount, type, address); } @@ -227,8 +223,7 @@ void WalletView::encryptWallet(bool status) { if(!walletModel) return; - AskPassphraseDialog dlg(status ? AskPassphraseDialog::Encrypt: - AskPassphraseDialog::Decrypt, this); + AskPassphraseDialog dlg(status ? AskPassphraseDialog::Encrypt : AskPassphraseDialog::Decrypt, this); dlg.setModel(walletModel); dlg.exec(); |