Introduces public methods for starting and stopping the display refresh timer to osciwidget
This commit is contained in:
1 parent
41d557743a
commit
b0ee466c32
2 files changed
+9
-1
No files matched your search
+7
-1
@@ -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