Introduces public methods for starting and stopping the display refresh timer to osciwidget

This commit is contained in:
Gitea committed 2019-08-30 12:43:25 +02:00
1 parent 41d557743a
commit b0ee466c32
2 files changed
+9 -1

No files matched your search

+7 -1
View File
@@ -132,15 +132,21 @@ void OsciWidget::resizeEvent(QResizeEvent *event)
resizePixmap();
}
void OsciWidget::restartTimer()
void OsciWidget::stop()
{
if (m_timerId != -1)
killTimer(m_timerId);
}
void OsciWidget::start()
{
m_timerId = startTimer(1000/m_framerate);
}
void OsciWidget::restartTimer()
{
stop();
start();
}
void OsciWidget::resizePixmap()
+2
View File
@@ -22,6 +22,8 @@ public:
int framerate() const;
int blend() const;
float factor() const;
void start();
void stop();
public slots:
void setFramerate(int framerate);