MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / addStats

Method addStats

Gui/RenderStatsDialog.cpp:978–1001  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

976}
977
978void
979RenderStatsDialog::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
1003void
1004RenderStatsDialog::closeEvent(QCloseEvent * /*event*/)

Callers 1

Calls 9

isCheckedMethod · 0.80
clearRowsMethod · 0.80
editNodeRowMethod · 0.80
emptyMethod · 0.80
headerMethod · 0.80
setTextMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected