Browse Source

Updates.

cl-refactor
Gav Wood 11 years ago
parent
commit
203b02ecae
  1. 7
      alethzero/MainWin.cpp
  2. 3
      alethzero/MainWin.h

7
alethzero/MainWin.cpp

@ -331,6 +331,11 @@ Main::Main(QWidget *parent) :
ui->tabWidget->setTabText(0, ui->webView->title());
});
connect(ui->webView, &QWebView::loadFinished, [=]()
{
this->changed();
});
QWebFrame* f = ui->webView->page()->currentFrame();
connect(f, &QWebFrame::javaScriptWindowObjectCleared, [=](){
f->addToJavaScriptWindowObject("eth", new QEthereum, QWebFrame::ScriptOwnership);
@ -513,6 +518,8 @@ void Main::refresh(bool _override)
bool c = m_client->changed();
if (c || _override)
{
changed();
auto d = m_client->blockChain().details();
auto diff = BlockInfo(m_client->blockChain().block()).difficulty;
ui->blockCount->setText(QString("#%1 @%3 T%2").arg(d.number).arg(toLog2(d.totalDifficulty)).arg(toLog2(diff)));

3
alethzero/MainWin.h

@ -263,6 +263,9 @@ private slots:
void refresh(bool _override = false);
void refreshNetwork();
signals:
void changed(); // TODO: manifest
private:
QString pretty(eth::Address _a) const;

Loading…
Cancel
Save