Introduces public methods for starting and stopping the display refresh timer to osciwidget
This commit is contained in:
@@ -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()
|
||||
|
@@ -22,6 +22,8 @@ public:
|
||||
int framerate() const;
|
||||
int blend() const;
|
||||
float factor() const;
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
public slots:
|
||||
void setFramerate(int framerate);
|
||||
|
Reference in New Issue
Block a user