summaryrefslogtreecommitdiffhomepage
path: root/FTNoIR_Tracker_PT/pt_video_widget.h
diff options
context:
space:
mode:
Diffstat (limited to 'FTNoIR_Tracker_PT/pt_video_widget.h')
-rw-r--r--FTNoIR_Tracker_PT/pt_video_widget.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/FTNoIR_Tracker_PT/pt_video_widget.h b/FTNoIR_Tracker_PT/pt_video_widget.h
index e67e6d57..f5663e47 100644
--- a/FTNoIR_Tracker_PT/pt_video_widget.h
+++ b/FTNoIR_Tracker_PT/pt_video_widget.h
@@ -31,7 +31,7 @@ class PTVideoWidget : public QWidget, public FrameObserver
public:
PTVideoWidget(QWidget *parent, FrameProvider* provider) : QWidget(parent), /* to avoid linker errors */ FrameObserver(provider) {
- connect(&timer, SIGNAL(timeout()), this, SLOT(update()));
+ connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint()));
timer.start(45);
}
void update_image(const cv::Mat &frame);
@@ -42,10 +42,12 @@ protected slots:
QPainter painter(this);
painter.drawPixmap(e->rect(), pixmap, e->rect());
}
+ void update_and_repaint();
private:
QMutex mtx;
QPixmap pixmap;
QTimer timer;
+ cv::Mat _frame;
};
// ----------------------------------------------------------------------------