summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/pt_video_widget.h
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-pt/pt_video_widget.h')
-rw-r--r--tracker-pt/pt_video_widget.h18
1 files changed, 4 insertions, 14 deletions
diff --git a/tracker-pt/pt_video_widget.h b/tracker-pt/pt_video_widget.h
index d9144ac0..c2957876 100644
--- a/tracker-pt/pt_video_widget.h
+++ b/tracker-pt/pt_video_widget.h
@@ -1,5 +1,5 @@
/* Copyright (c) 2012 Patrick Ruoff
- * Copyright (c) 2014 Stanislaw Halik <sthalik@misaki.pl>
+ * Copyright (c) 2014-2016 Stanislaw Halik <sthalik@misaki.pl>
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -19,25 +19,15 @@
#include <QMutexLocker>
#include <QDebug>
-class PTVideoWidget : public QWidget
+class PTVideoWidget final : public QWidget
{
Q_OBJECT
public:
- PTVideoWidget(QWidget *parent) :
- QWidget(parent),
- freshp(false)
- {
- connect(&timer, SIGNAL(timeout()), this, SLOT(update_and_repaint()));
- timer.start(50);
- }
+ PTVideoWidget(QWidget *parent);
void update_image(const cv::Mat &frame);
protected slots:
- void paintEvent( QPaintEvent* e ) {
- QMutexLocker foo(&mtx);
- QPainter painter(this);
- painter.drawImage(e->rect(), texture);
- }
+ void paintEvent(QPaintEvent* e) override;
void update_and_repaint();
private:
QMutex mtx;