Simple "hack" with a QTimer to time the video

This commit is contained in:
Tats
2014-04-26 01:01:44 +01:00
parent ada827de41
commit 6e58f94a48
2 changed files with 7 additions and 1 deletions
+5
View File
@@ -42,6 +42,11 @@ MainWindow::MainWindow()
_hasCurrentPaint = false;
_hasCurrentMapping = false;
videoTimer = new QTimer(this);
videoTimer->setInterval(1000/30);
connect(videoTimer, SIGNAL(timeout()), this, SLOT(updateAll()));
videoTimer->start();
createLayout();
createActions();
+2 -1
View File
@@ -234,6 +234,8 @@ private:
bool _hasCurrentMapping;
bool _hasCurrentPaint;
QTimer *videoTimer;
static MainWindow* instance;
public:
@@ -265,7 +267,6 @@ public:
public slots:
void updateAll();
public:
// Constants.
static const int DEFAULT_WIDTH = 1600;