Commit 4b13ff89 authored by Thiago Santini's avatar Thiago Santini

Allows one to reset the performance monitor counters

parent 0e465cdb
......@@ -61,3 +61,9 @@ void PerformanceMonitorWidget::update()
enrolled[i].second->setText( QString::number(gPerformanceMonitor.droppedFrameCount[i]) );
QTimer::singleShot(updateTimeMs, this, SLOT(update()) );
}
void PerformanceMonitorWidget::on_resetCounters_clicked()
{
for (auto c = gPerformanceMonitor.droppedFrameCount.begin(); c != gPerformanceMonitor.droppedFrameCount.end(); c++)
*c = 0;
}
......@@ -34,6 +34,7 @@ private:
private slots:
void update();
void on_resetCounters_clicked();
};
#endif // PERFORMANCEMONITORWIDGET_H
......@@ -15,13 +15,32 @@
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<item row="1" column="0">
<widget class="QGroupBox" name="droppedFramesBox">
<property name="title">
<string>Dropped Frames</string>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QPushButton" name="resetCounters">
<property name="minimumSize">
<size>
<width>75</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>75</width>
<height>25</height>
</size>
</property>
<property name="text">
<string>Reset</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QMenuBar" name="menubar">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment