| 751 | }; |
| 752 | |
| 753 | RenderStatsDialog::RenderStatsDialog(Gui* gui) |
| 754 | : QWidget(gui) |
| 755 | , _imp( new RenderStatsDialogPrivate(gui) ) |
| 756 | { |
| 757 | setWindowFlags(Qt::Tool); |
| 758 | setWindowTitle( tr("Render statistics") ); |
| 759 | |
| 760 | setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred); |
| 761 | |
| 762 | _imp->mainLayout = new QVBoxLayout(this); |
| 763 | |
| 764 | QString statsDesc = NATRON_NAMESPACE::convertFromPlainText(tr( |
| 765 | "Statistics are accumulated over each frame rendered by default.\nIf you want to display statistics of the last " |
| 766 | "frame rendered, uncheck the \"Accumulate\" checkbox.\nIf you want to have more detailed information besides the time spent " |
| 767 | "rendering for each node,\ncheck the \"Advanced\" checkbox.\n The \"Time spent to render\" is the time spent " |
| 768 | "to render a frame (or more if \"Accumulate\" is checked).\nIf there are multiple parallel renders (see preferences) " |
| 769 | "the time will be accumulated across each threads.\nHover the mouse over each column header to have detailed information " |
| 770 | "for each statistic.\nBy default, nodes are sorted by decreasing time spent to render.\nClicking on a node will center " |
| 771 | "the node-graph on it.\nWhen in \"Advanced\" mode, double-clicking on the \"Rendered Tiles\" or " |
| 772 | "the \"Identity Tiles\" cell\nwill open-up a window containing detailed information about the tiles rendered.\n"), NATRON_NAMESPACE::WhiteSpaceNormal); |
| 773 | _imp->descriptionLabel = new Label(statsDesc, this); |
| 774 | _imp->mainLayout->addWidget(_imp->descriptionLabel); |
| 775 | |
| 776 | _imp->globalInfosContainer = new QWidget(this); |
| 777 | _imp->globalInfosLayout = new QHBoxLayout(_imp->globalInfosContainer); |
| 778 | |
| 779 | QString accTt = NATRON_NAMESPACE::convertFromPlainText(tr("When checked, stats are not cleared between the computation of frames."), NATRON_NAMESPACE::WhiteSpaceNormal); |
| 780 | _imp->accumulateLabel = new Label(tr("Accumulate:"), _imp->globalInfosContainer); |
| 781 | _imp->accumulateLabel->setToolTip(accTt); |
| 782 | _imp->accumulateCheckbox = new QCheckBox(_imp->globalInfosContainer); |
| 783 | _imp->accumulateCheckbox->setChecked(true); |
| 784 | _imp->accumulateCheckbox->setToolTip(accTt); |
| 785 | |
| 786 | _imp->globalInfosLayout->addWidget(_imp->accumulateLabel); |
| 787 | _imp->globalInfosLayout->addWidget(_imp->accumulateCheckbox); |
| 788 | |
| 789 | _imp->globalInfosLayout->addSpacing(10); |
| 790 | |
| 791 | QString adTt = NATRON_NAMESPACE::convertFromPlainText(tr("When checked, more statistics are displayed. Useful mainly for debugging purposes."), NATRON_NAMESPACE::WhiteSpaceNormal); |
| 792 | _imp->advancedLabel = new Label(tr("Advanced:"), _imp->globalInfosContainer); |
| 793 | _imp->advancedLabel->setToolTip(adTt); |
| 794 | _imp->advancedCheckbox = new QCheckBox(_imp->globalInfosContainer); |
| 795 | _imp->advancedCheckbox->setChecked(false); |
| 796 | _imp->advancedCheckbox->setToolTip(adTt); |
| 797 | QObject::connect( _imp->advancedCheckbox, SIGNAL(clicked(bool)), this, SLOT(refreshAdvancedColsVisibility()) ); |
| 798 | |
| 799 | _imp->globalInfosLayout->addWidget(_imp->advancedLabel); |
| 800 | _imp->globalInfosLayout->addWidget(_imp->advancedCheckbox); |
| 801 | |
| 802 | _imp->globalInfosLayout->addSpacing(20); |
| 803 | |
| 804 | QString wallTimett = NATRON_NAMESPACE::convertFromPlainText(tr("This is the time spent to compute the frame for the whole tree.\n " |
| 805 | ), NATRON_NAMESPACE::WhiteSpaceNormal); |
| 806 | _imp->totalTimeSpentDescLabel = new Label(tr("Time spent to render:"), _imp->globalInfosContainer); |
| 807 | _imp->totalTimeSpentDescLabel->setToolTip(wallTimett); |
| 808 | _imp->totalTimeSpentValueLabel = new Label(QString::fromUtf8("0.0 sec"), _imp->globalInfosContainer); |
| 809 | _imp->totalTimeSpentValueLabel->setToolTip(wallTimett); |
| 810 |
nothing calls this directly
no test coverage detected