make address settable from outside

This commit is contained in:
Wladimir J. van der Laan 2011-05-13 08:30:20 +02:00
parent 1a6d504a38
commit 871f9979c6
3 changed files with 7 additions and 1 deletions

View File

@ -14,6 +14,7 @@ int main(int argc, char *argv[])
window.setNumConnections(4);
window.setNumTransactions(4);
window.setNumBlocks(33);
window.setAddress("123456789");
window.show();

View File

@ -66,7 +66,6 @@ BitcoinGUI::BitcoinGUI(QWidget *parent):
hbox_address->addWidget(new QLabel(tr("Your Bitcoin Address:")));
address = new QLineEdit();
address->setReadOnly(true);
address->setText("0123456789"); /* test */
hbox_address->addWidget(address);
QPushButton *button_new = new QPushButton(tr("&New..."));
@ -253,6 +252,11 @@ void BitcoinGUI::setBalance(double balance)
labelBalance->setText(QLocale::system().toString(balance, 8));
}
void BitcoinGUI::setAddress(const QString &addr)
{
address->setText(addr);
}
void BitcoinGUI::setNumConnections(int count)
{
labelConnections->setText(QLocale::system().toString(count)+" "+tr("connections"));

View File

@ -47,6 +47,7 @@ private:
public slots:
void setBalance(double balance);
void setAddress(const QString &address);
void setNumConnections(int count);
void setNumBlocks(int count);
void setNumTransactions(int count);