|
|
@ -473,6 +473,10 @@ void RPCConsole::on_tabWidget_currentChanged(int index) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ui->lineEdit->setFocus(); |
|
|
|
ui->lineEdit->setFocus(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
else if(ui->tabWidget->widget(index) == ui->tab_peers) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
initPeerTable(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void RPCConsole::on_openDebugLogfileButton_clicked() |
|
|
|
void RPCConsole::on_openDebugLogfileButton_clicked() |
|
|
@ -648,11 +652,27 @@ void RPCConsole::updateNodeDetail(const CNodeCombinedStats *combinedStats) |
|
|
|
ui->peerBanScore->setText(tr("Fetching...")); |
|
|
|
ui->peerBanScore->setText(tr("Fetching...")); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void RPCConsole::initPeerTable() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if (!clientModel) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// peerWidget needs a resize in case the dialog has non-default geometry
|
|
|
|
|
|
|
|
columnResizingFixer->stretchColumnWidth(PeerTableModel::Address); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// start PeerTableModel auto refresh
|
|
|
|
|
|
|
|
clientModel->getPeerTableModel()->startAutoRefresh(1000); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// We override the virtual resizeEvent of the QWidget to adjust tables column
|
|
|
|
// We override the virtual resizeEvent of the QWidget to adjust tables column
|
|
|
|
// sizes as the tables width is proportional to the dialogs width.
|
|
|
|
// sizes as the tables width is proportional to the dialogs width.
|
|
|
|
void RPCConsole::resizeEvent(QResizeEvent *event) |
|
|
|
void RPCConsole::resizeEvent(QResizeEvent *event) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QWidget::resizeEvent(event); |
|
|
|
QWidget::resizeEvent(event); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!clientModel) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
columnResizingFixer->stretchColumnWidth(PeerTableModel::Address); |
|
|
|
columnResizingFixer->stretchColumnWidth(PeerTableModel::Address); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -660,17 +680,16 @@ void RPCConsole::showEvent(QShowEvent *event) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QWidget::showEvent(event); |
|
|
|
QWidget::showEvent(event); |
|
|
|
|
|
|
|
|
|
|
|
// peerWidget needs a resize in case the dialog has non-default geometry
|
|
|
|
initPeerTable(); |
|
|
|
columnResizingFixer->stretchColumnWidth(PeerTableModel::Address); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// start PeerTableModel auto refresh
|
|
|
|
|
|
|
|
clientModel->getPeerTableModel()->startAutoRefresh(1000); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void RPCConsole::hideEvent(QHideEvent *event) |
|
|
|
void RPCConsole::hideEvent(QHideEvent *event) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QWidget::hideEvent(event); |
|
|
|
QWidget::hideEvent(event); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!clientModel) |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
// stop PeerTableModel auto refresh
|
|
|
|
// stop PeerTableModel auto refresh
|
|
|
|
clientModel->getPeerTableModel()->stopAutoRefresh(); |
|
|
|
clientModel->getPeerTableModel()->stopAutoRefresh(); |
|
|
|
} |
|
|
|
} |
|
|
|