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

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

View File

@@ -132,15 +132,21 @@ void OsciWidget::resizeEvent(QResizeEvent *event)
resizePixmap(); resizePixmap();
} }
void OsciWidget::restartTimer() void OsciWidget::stop()
{ {
if (m_timerId != -1) if (m_timerId != -1)
killTimer(m_timerId); killTimer(m_timerId);
}
void OsciWidget::start()
{
m_timerId = startTimer(1000/m_framerate); m_timerId = startTimer(1000/m_framerate);
} }
void OsciWidget::restartTimer()
{ {
stop();
start();
} }
void OsciWidget::resizePixmap() void OsciWidget::resizePixmap()

View File

@@ -22,6 +22,8 @@ public:
int framerate() const; int framerate() const;
int blend() const; int blend() const;
float factor() const; float factor() const;
void start();
void stop();
public slots: public slots:
void setFramerate(int framerate); void setFramerate(int framerate);