|
|
@ -66,7 +66,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): |
|
|
|
hbox_address->addWidget(new QLabel(tr("Your Bitcoin Address:"))); |
|
|
|
hbox_address->addWidget(new QLabel(tr("Your Bitcoin Address:"))); |
|
|
|
address = new QLineEdit(); |
|
|
|
address = new QLineEdit(); |
|
|
|
address->setReadOnly(true); |
|
|
|
address->setReadOnly(true); |
|
|
|
address->setText("0123456789"); |
|
|
|
address->setText("0123456789"); /* test */ |
|
|
|
hbox_address->addWidget(address); |
|
|
|
hbox_address->addWidget(address); |
|
|
|
|
|
|
|
|
|
|
|
QPushButton *button_new = new QPushButton(tr("&New...")); |
|
|
|
QPushButton *button_new = new QPushButton(tr("&New...")); |
|
|
@ -79,7 +79,7 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): |
|
|
|
hbox_balance->addWidget(new QLabel(tr("Balance:"))); |
|
|
|
hbox_balance->addWidget(new QLabel(tr("Balance:"))); |
|
|
|
hbox_balance->addSpacing(5);/* Add some spacing between the label and the text */ |
|
|
|
hbox_balance->addSpacing(5);/* Add some spacing between the label and the text */ |
|
|
|
|
|
|
|
|
|
|
|
labelBalance = new QLabel(QLocale::system().toString(1345.54)); |
|
|
|
labelBalance = new QLabel(); |
|
|
|
labelBalance->setFont(QFont("Teletype")); |
|
|
|
labelBalance->setFont(QFont("Teletype")); |
|
|
|
hbox_balance->addWidget(labelBalance); |
|
|
|
hbox_balance->addWidget(labelBalance); |
|
|
|
hbox_balance->addStretch(1); |
|
|
|
hbox_balance->addStretch(1); |
|
|
@ -99,21 +99,21 @@ BitcoinGUI::BitcoinGUI(QWidget *parent): |
|
|
|
/* Create status bar */ |
|
|
|
/* Create status bar */ |
|
|
|
statusBar(); |
|
|
|
statusBar(); |
|
|
|
|
|
|
|
|
|
|
|
QLabel *label_connections = new QLabel("6 connections"); |
|
|
|
labelConnections = new QLabel(); |
|
|
|
label_connections->setFrameStyle(QFrame::Panel | QFrame::Sunken); |
|
|
|
labelConnections->setFrameStyle(QFrame::Panel | QFrame::Sunken); |
|
|
|
label_connections->setMinimumWidth(100); |
|
|
|
labelConnections->setMinimumWidth(130); |
|
|
|
|
|
|
|
|
|
|
|
QLabel *label_blocks = new QLabel("6 blocks"); |
|
|
|
labelBlocks = new QLabel(); |
|
|
|
label_blocks->setFrameStyle(QFrame::Panel | QFrame::Sunken); |
|
|
|
labelBlocks->setFrameStyle(QFrame::Panel | QFrame::Sunken); |
|
|
|
label_blocks->setMinimumWidth(100); |
|
|
|
labelBlocks->setMinimumWidth(130); |
|
|
|
|
|
|
|
|
|
|
|
QLabel *label_transactions = new QLabel("6 transactions"); |
|
|
|
labelTransactions = new QLabel(); |
|
|
|
label_transactions->setFrameStyle(QFrame::Panel | QFrame::Sunken); |
|
|
|
labelTransactions->setFrameStyle(QFrame::Panel | QFrame::Sunken); |
|
|
|
label_transactions->setMinimumWidth(100); |
|
|
|
labelTransactions->setMinimumWidth(130); |
|
|
|
|
|
|
|
|
|
|
|
statusBar()->addPermanentWidget(label_connections); |
|
|
|
statusBar()->addPermanentWidget(labelConnections); |
|
|
|
statusBar()->addPermanentWidget(label_blocks); |
|
|
|
statusBar()->addPermanentWidget(labelBlocks); |
|
|
|
statusBar()->addPermanentWidget(label_transactions); |
|
|
|
statusBar()->addPermanentWidget(labelTransactions); |
|
|
|
|
|
|
|
|
|
|
|
/* Action bindings */ |
|
|
|
/* Action bindings */ |
|
|
|
connect(button_new, SIGNAL(clicked()), this, SLOT(newAddressClicked())); |
|
|
|
connect(button_new, SIGNAL(clicked()), this, SLOT(newAddressClicked())); |
|
|
@ -247,3 +247,23 @@ void BitcoinGUI::copyClipboardClicked() |
|
|
|
/* Copy text in address to clipboard */ |
|
|
|
/* Copy text in address to clipboard */ |
|
|
|
QApplication::clipboard()->setText(address->text()); |
|
|
|
QApplication::clipboard()->setText(address->text()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void BitcoinGUI::setBalance(double balance) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
labelBalance->setText(QLocale::system().toString(balance, 8)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void BitcoinGUI::setNumConnections(int count) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
labelConnections->setText(QLocale::system().toString(count)+" "+tr("connections")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void BitcoinGUI::setNumBlocks(int count) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
labelBlocks->setText(QLocale::system().toString(count)+" "+tr("blocks")); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void BitcoinGUI::setNumTransactions(int count) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
labelTransactions->setText(QLocale::system().toString(count)+" "+tr("transactions")); |
|
|
|
|
|
|
|
} |
|
|
|