|
|
@ -36,6 +36,7 @@ |
|
|
|
#include <QSortFilterProxyModel> |
|
|
|
#include <QSortFilterProxyModel> |
|
|
|
#include <QClipboard> |
|
|
|
#include <QClipboard> |
|
|
|
#include <QMessageBox> |
|
|
|
#include <QMessageBox> |
|
|
|
|
|
|
|
#include <QProgressBar> |
|
|
|
|
|
|
|
|
|
|
|
#include <QDebug> |
|
|
|
#include <QDebug> |
|
|
|
|
|
|
|
|
|
|
@ -124,6 +125,15 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): |
|
|
|
labelTransactions->setMinimumWidth(130); |
|
|
|
labelTransactions->setMinimumWidth(130); |
|
|
|
labelTransactions->setToolTip(tr("Number of transactions in your wallet")); |
|
|
|
labelTransactions->setToolTip(tr("Number of transactions in your wallet")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Progress bar for blocks download
|
|
|
|
|
|
|
|
progressBarLabel = new QLabel(tr("Downloading initial data...")); |
|
|
|
|
|
|
|
progressBarLabel->setVisible(false); |
|
|
|
|
|
|
|
progressBar = new QProgressBar(); |
|
|
|
|
|
|
|
progressBar->setToolTip(tr("Initial block chain download in progress")); |
|
|
|
|
|
|
|
progressBar->setVisible(false); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
statusBar()->addWidget(progressBarLabel); |
|
|
|
|
|
|
|
statusBar()->addWidget(progressBar); |
|
|
|
statusBar()->addPermanentWidget(labelConnections); |
|
|
|
statusBar()->addPermanentWidget(labelConnections); |
|
|
|
statusBar()->addPermanentWidget(labelBlocks); |
|
|
|
statusBar()->addPermanentWidget(labelBlocks); |
|
|
|
statusBar()->addPermanentWidget(labelTransactions); |
|
|
|
statusBar()->addPermanentWidget(labelTransactions); |
|
|
@ -360,6 +370,20 @@ void BitcoinGUI::setNumConnections(int count) |
|
|
|
|
|
|
|
|
|
|
|
void BitcoinGUI::setNumBlocks(int count) |
|
|
|
void BitcoinGUI::setNumBlocks(int count) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
int total = model->getTotalBlocksEstimate(); |
|
|
|
|
|
|
|
if(count < total) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
progressBarLabel->setVisible(true); |
|
|
|
|
|
|
|
progressBar->setVisible(true); |
|
|
|
|
|
|
|
progressBar->setMaximum(total); |
|
|
|
|
|
|
|
progressBar->setValue(count); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
progressBarLabel->setVisible(false); |
|
|
|
|
|
|
|
progressBar->setVisible(false); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
labelBlocks->setText(QLocale::system().toString(count)+" "+tr("block(s)", "", count)); |
|
|
|
labelBlocks->setText(QLocale::system().toString(count)+" "+tr("block(s)", "", count)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|