Browse Source

make address settable from outside

0.8
Wladimir J. van der Laan 14 years ago
parent
commit
871f9979c6
  1. 1
      bitcoin.cpp
  2. 6
      bitcoingui.cpp
  3. 1
      bitcoingui.h

1
bitcoin.cpp

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

6
bitcoingui.cpp

@ -66,7 +66,6 @@ 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"); /* test */
hbox_address->addWidget(address); hbox_address->addWidget(address);
QPushButton *button_new = new QPushButton(tr("&New...")); QPushButton *button_new = new QPushButton(tr("&New..."));
@ -253,6 +252,11 @@ void BitcoinGUI::setBalance(double balance)
labelBalance->setText(QLocale::system().toString(balance, 8)); labelBalance->setText(QLocale::system().toString(balance, 8));
} }
void BitcoinGUI::setAddress(const QString &addr)
{
address->setText(addr);
}
void BitcoinGUI::setNumConnections(int count) void BitcoinGUI::setNumConnections(int count)
{ {
labelConnections->setText(QLocale::system().toString(count)+" "+tr("connections")); labelConnections->setText(QLocale::system().toString(count)+" "+tr("connections"));

1
bitcoingui.h

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

Loading…
Cancel
Save