summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_pt/video_widget.h
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-04-27 11:54:48 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-04-27 11:54:48 +0200
commitc7c3bfc9a1558864b06319918900090c7564c6d2 (patch)
treeaa53e2e9395c0197d2ab46585a15293a2423cfd8 /ftnoir_tracker_pt/video_widget.h
parentbf45260ce8f235e593a22cdbdf9bcd98d508ae7f (diff)
Get rid of last remnants of QOpenGL
Diffstat (limited to 'ftnoir_tracker_pt/video_widget.h')
-rw-r--r--ftnoir_tracker_pt/video_widget.h27
1 files changed, 10 insertions, 17 deletions
diff --git a/ftnoir_tracker_pt/video_widget.h b/ftnoir_tracker_pt/video_widget.h
index bb567478..a68d8028 100644
--- a/ftnoir_tracker_pt/video_widget.h
+++ b/ftnoir_tracker_pt/video_widget.h
@@ -8,42 +8,35 @@
#ifndef VIDEOWIDGET_H
#define VIDEOWIDGET_H
-#include <QGLWidget>
#include <QTime>
#include <opencv2/opencv.hpp>
#include <memory>
#include <QWidget>
#include <QMutex>
#include <QMutexLocker>
+#include <QLabel>
+#include <QPainter>
// ----------------------------------------------------------------------------
-class VideoWidget : public QGLWidget
+class VideoWidget : public QLabel
{
Q_OBJECT
public:
- VideoWidget(QWidget *parent) : QGLWidget(parent), mtx() {
-#if !defined(_WIN32)
- setAttribute(Qt::WA_NativeWindow, true);
-#endif
+ VideoWidget(QWidget *parent) : QLabel(parent), mtx() {
}
-
- void initializeGL();
- void resizeGL(int w, int h);
- void paintGL();
-
void update_image(cv::Mat frame, std::auto_ptr< std::vector<cv::Vec2f> > points);
- void update();
+protected slots:
+ void paintEvent( QPaintEvent* e ) {
+ setPixmap(pixmap);
+ QLabel::paintEvent(e);
+ }
private:
- void resize_frame();
-
cv::Mat frame;
- QImage qframe;
- QImage resized_qframe;
QMutex mtx;
-
std::auto_ptr< std::vector<cv::Vec2f> > points;
+ QPixmap pixmap;
};
#endif // VIDEOWIDGET_H