Slightly better timer interval management (with global const variable).

This commit is contained in:
Tats
2014-10-16 17:28:17 +00:00
parent ac29ca5c1f
commit 4e8a2c19f1
2 changed files with 4 additions and 1 deletions

3
MM.h
View File

@@ -57,6 +57,9 @@ public:
static const qreal VERTEX_STICK_RADIUS = 10;
static const qreal VERTEX_SELECT_RADIUS = 10;
static const qreal VERTEX_SELECT_STROKE_WIDTH = 1;
// Time.
static const float FRAMES_PER_SECOND = 29.97f;
};
#endif

View File

@@ -65,7 +65,7 @@ MainWindow::MainWindow()
// Create and start timer.
videoTimer = new QTimer(this);
videoTimer->setInterval(1000/30);
videoTimer->setInterval( int( 1000 / MM::FRAMES_PER_SECOND ) );
connect(videoTimer, SIGNAL(timeout()), this, SLOT(updateCanvases()));
videoTimer->start();