QmlProfiler: added 'clear view'

Reviewed-by: Kai Koehne
This commit is contained in:
Christiaan Janssen
2011-04-06 16:04:18 +02:00
parent 54eac56c00
commit e838a3dd7c
5 changed files with 40 additions and 9 deletions

View File

@@ -110,6 +110,7 @@ public:
public slots:
void setRecording(bool);
void clearView();
signals:
void complete();
@@ -122,6 +123,7 @@ signals:
void recordingChanged(bool arg);
void enabled();
void clear();
protected:
virtual void statusChanged(Status);
@@ -149,6 +151,12 @@ TracePlugin::TracePlugin(QDeclarativeDebugConnection *client)
::memset(m_rangeCount, 0, MaximumRangeType * sizeof(int));
}
void TracePlugin::clearView()
{
::memset(m_rangeCount, 0, MaximumRangeType * sizeof(int));
emit clear();
}
void TracePlugin::setRecording(bool v)
{
if (v == m_recording)
@@ -312,6 +320,12 @@ void TraceWindow::updateTimer()
emit timeChanged(m_view->rootObject()->property("elapsedTime").toDouble());
}
void TraceWindow::clearDisplay()
{
if (m_plugin)
m_plugin->clearView();
}
void TraceWindow::setRecordAtStart(bool record)
{
m_recordAtStart = record;