#include "transactiondescdialog.h"
#include "addresstablemodel.h"
-#include "main.h"
+#include "headers.h"
#include <QApplication>
#include <QMainWindow>
QPushButton *button_new = new QPushButton(tr("&New..."));
button_new->setToolTip(tr("Create new receiving address"));
+ button_new->setIcon(QIcon(":/icons/add"));
QPushButton *button_clipboard = new QPushButton(tr("&Copy to clipboard"));
button_clipboard->setToolTip(tr("Copy current receiving address to the system clipboard"));
+ button_clipboard->setIcon(QIcon(":/icons/editcopy"));
hbox_address->addWidget(button_new);
hbox_address->addWidget(button_clipboard);
hbox_balance->addSpacing(5);/* Add some spacing between the label and the text */
labelBalance = new QLabel();
- labelBalance->setFont(QFont("Monospace"));
+ labelBalance->setFont(QFont("Monospace", -1, QFont::Bold));
labelBalance->setToolTip(tr("Your current balance"));
hbox_balance->addWidget(labelBalance);
hbox_balance->addStretch(1);
labelTransactions->setToolTip(tr("Number of transactions in your wallet"));
// Progress bar for blocks download
- progressBarLabel = new QLabel(tr("Downloading initial data..."));
+ progressBarLabel = new QLabel(tr("Synchronizing with network..."));
progressBarLabel->setVisible(false);
progressBar = new QProgressBar();
- progressBar->setToolTip(tr("Initial block chain download in progress"));
+ progressBar->setToolTip(tr("Block chain synchronization in progress"));
progressBar->setVisible(false);
statusBar()->addWidget(progressBarLabel);
QTableView *transaction_table = transactionViews.at(i);
transaction_table->setModel(proxy_model);
+ transaction_table->setAlternatingRowColors(true);
transaction_table->setSelectionBehavior(QAbstractItemView::SelectRows);
transaction_table->setSelectionMode(QAbstractItemView::ExtendedSelection);
transaction_table->setSortingEnabled(true);
TransactionTableModel::Status, 23);
transaction_table->horizontalHeader()->resizeSection(
TransactionTableModel::Date, 120);
- transaction_table->horizontalHeader()->setResizeMode(
- TransactionTableModel::Description, QHeaderView::Stretch);
transaction_table->horizontalHeader()->resizeSection(
- TransactionTableModel::Debit, 79);
+ TransactionTableModel::Type, 120);
+ transaction_table->horizontalHeader()->setResizeMode(
+ TransactionTableModel::ToAddress, QHeaderView::Stretch);
transaction_table->horizontalHeader()->resizeSection(
- TransactionTableModel::Credit, 79);
+ TransactionTableModel::Amount, 79);
}
connect(transaction_model, SIGNAL(rowsInserted(const QModelIndex &, int, int)),
void BitcoinGUI::setBalance(qint64 balance)
{
- labelBalance->setText(QString::fromStdString(FormatMoney(balance)));
+ labelBalance->setText(QString::fromStdString(FormatMoney(balance)) + QString(" BTC"));
}
void BitcoinGUI::setAddress(const QString &addr)
void BitcoinGUI::incomingTransaction(const QModelIndex & parent, int start, int end)
{
TransactionTableModel *ttm = model->getTransactionTableModel();
- qint64 credit = ttm->index(start, TransactionTableModel::Credit, parent)
+ qint64 amount = ttm->index(start, TransactionTableModel::Amount, parent)
.data(Qt::EditRole).toULongLong();
- qint64 debit = ttm->index(start, TransactionTableModel::Debit, parent)
- .data(Qt::EditRole).toULongLong();
- if((credit+debit)>0 && !model->inInitialBlockDownload())
+ if(amount>0 && !model->inInitialBlockDownload())
{
// On incoming transaction, make an info balloon
// Unless the initial block download is in progress, to prevent balloon-spam
QString date = ttm->index(start, TransactionTableModel::Date, parent)
.data().toString();
- QString description = ttm->index(start, TransactionTableModel::Description, parent)
+ QString type = ttm->index(start, TransactionTableModel::Type, parent)
+ .data().toString();
+ QString address = ttm->index(start, TransactionTableModel::ToAddress, parent)
.data().toString();
trayIcon->showMessage(tr("Incoming transaction"),
- "Date: " + date + "\n" +
- "Amount: " + QString::fromStdString(FormatMoney(credit+debit, true)) + "\n" +
- description,
+ tr("Date: ") + date + "\n" +
+ tr("Amount: ") + QString::fromStdString(FormatMoney(amount, true)) + "\n" +
+ tr("Type: ") + type + "\n" +
+ tr("Address: ") + address + "\n",
QSystemTrayIcon::Information);
}
}