| 100 | } |
| 101 | |
| 102 | void |
| 103 | NodeStatInspector::node(const VisualNode::NodeAllocator& na, |
| 104 | VisualNode* n, const Statistics&, bool) { |
| 105 | if (isVisible()) { |
| 106 | int nd = -1; |
| 107 | for (VisualNode* p = n; p != nullptr; p = p->getParent(na)) |
| 108 | nd++; |
| 109 | nodeDepthLabel->setPlainText(QString("%1").arg(nd));; |
| 110 | StatCursor sc(n,na); |
| 111 | PreorderNodeVisitor<StatCursor> pnv(sc); |
| 112 | pnv.run(); |
| 113 | |
| 114 | subtreeDepthLabel->setPlainText( |
| 115 | QString("%1").arg(pnv.getCursor().depth)); |
| 116 | solvedLabel->setPlainText(QString("%1").arg(pnv.getCursor().solved)); |
| 117 | solvedLabel->setPos(78-solvedLabel->document()->size().width()/2,120); |
| 118 | failedLabel->setPlainText(QString("%1").arg(pnv.getCursor().failed)); |
| 119 | failedLabel->setPos(44-failedLabel->document()->size().width(),120); |
| 120 | choicesLabel->setPlainText(QString("%1").arg(pnv.getCursor().choice)); |
| 121 | choicesLabel->setPos(66-choicesLabel->document()->size().width(),57); |
| 122 | openLabel->setPlainText(QString("%1").arg(pnv.getCursor().open)); |
| 123 | } |
| 124 | } |
| 125 | |
| 126 | void |
| 127 | NodeStatInspector::showStats(void) { |
no test coverage detected