| 976 | } |
| 977 | |
| 978 | void |
| 979 | RenderStatsDialog::addStats(int /*time*/, |
| 980 | ViewIdx /*view*/, |
| 981 | double wallTime, |
| 982 | const std::map<NodePtr, NodeRenderStats >& stats) |
| 983 | { |
| 984 | if ( !_imp->accumulateCheckbox->isChecked() ) { |
| 985 | _imp->model->clearRows(); |
| 986 | _imp->totalSpentTime = 0; |
| 987 | } |
| 988 | |
| 989 | _imp->totalSpentTime += wallTime; |
| 990 | _imp->totalTimeSpentValueLabel->setText( Timer::printAsTime(_imp->totalSpentTime, false) ); |
| 991 | |
| 992 | for (std::map<NodePtr, NodeRenderStats >::const_iterator it = stats.begin(); it != stats.end(); ++it) { |
| 993 | _imp->model->editNodeRow(it->first, it->second); |
| 994 | } |
| 995 | |
| 996 | updateVisibleRows(); |
| 997 | if ( !stats.empty() ) { |
| 998 | _imp->view->header()->setSortIndicator(COL_TIME, Qt::DescendingOrder); |
| 999 | _imp->model->sort(COL_TIME, Qt::DescendingOrder); |
| 1000 | } |
| 1001 | } |
| 1002 | |
| 1003 | void |
| 1004 | RenderStatsDialog::closeEvent(QCloseEvent * /*event*/) |
no test coverage detected