Skip to content

Commit

Permalink
[SofaGuiQt] Tooltips (sofa-framework#2139)
Browse files Browse the repository at this point in the history
* [SofaGuiQt] Add tooltips to describe columns

* [SofaGuiQt] Fix copy/paste error

* [SofaGuiQt] Prefer 'duration' over 'time'
  • Loading branch information
alxbilger authored and fredroy committed Jun 3, 2021
1 parent 911d8b3 commit 60ed355
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions modules/SofaGuiQt/src/sofa/gui/qt/SofaWindowProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,21 @@ void SofaWindowProfiler::createTreeView()
columnNames << "Hierarchy Step Name" << "Total (%)" << "Self (%)" << "Time (ms)" << "Self (ms)";
tree_steps->setHeaderLabels(columnNames);

tree_steps->headerItem()->setToolTip(1, QString("Percentage of duration of this step compared to the duration of the root step"));
tree_steps->headerItem()->setToolTip(2,
QString("- If the step has child steps: percentage of the duration "
"of this step minus the sum of durations of its children, compared to "
"the duration of the root step.\n"
"- If the step has no child step: percentage of the average duration "
"of this step in case of multiple calls of this step during this time step, "
"compared to the duration of the root step."));
tree_steps->headerItem()->setToolTip(3, QString("Duration in milliseconds of this step"));
tree_steps->headerItem()->setToolTip(4,
QString("- If the step has child steps: duration in milliseconds of "
"this step minus the sum of durations of its children.\n"
"- If the step has no child step: average duration in milliseconds of "
"this step in case of multiple calls of this step during this time step."));

// set column properties
tree_steps->header()->setStretchLastSection(false);
tree_steps->header()->setSectionResizeMode(0, QHeaderView::Stretch);
Expand Down

0 comments on commit 60ed355

Please sign in to comment.