mirror of
https://github.com/dashpay/dash.git
synced 2024-12-26 12:32:48 +01:00
Merge pull request #2564 from Diapolo/walletview
small updates for walletview.cpp
This commit is contained in:
commit
aa9eee7eaf
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user