From 871f9979c66f0e5f1e9167dca22297d9fae07ae6 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Fri, 13 May 2011 08:30:20 +0200 Subject: [PATCH] make address settable from outside --- bitcoin.cpp | 1 + bitcoingui.cpp | 6 +++++- bitcoingui.h | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/bitcoin.cpp b/bitcoin.cpp index 456ce1e92..403e4c517 100644 --- a/bitcoin.cpp +++ b/bitcoin.cpp @@ -14,6 +14,7 @@ int main(int argc, char *argv[]) window.setNumConnections(4); window.setNumTransactions(4); window.setNumBlocks(33); + window.setAddress("123456789"); window.show(); diff --git a/bitcoingui.cpp b/bitcoingui.cpp index 771b90266..072dc9291 100644 --- a/bitcoingui.cpp +++ b/bitcoingui.cpp @@ -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")); diff --git a/bitcoingui.h b/bitcoingui.h index 89e3897a6..12bbf58ba 100644 --- a/bitcoingui.h +++ b/bitcoingui.h @@ -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);