summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_tracker_ht/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_ht/video_widget.h
parentbf45260ce8f235e593a22cdbdf9bcd98d508ae7f (diff)
Get rid of last remnants of QOpenGL
Diffstat (limited to 'ftnoir_tracker_ht/video_widget.h')
-rw-r--r--ftnoir_tracker_ht/video_widget.h30
1 files changed, 13 insertions, 17 deletions
diff --git a/ftnoir_tracker_ht/video_widget.h b/ftnoir_tracker_ht/video_widget.h
index adc57335..51acc35e 100644
--- a/ftnoir_tracker_ht/video_widget.h
+++ b/ftnoir_tracker_ht/video_widget.h
@@ -8,35 +8,31 @@
#ifndef VIDEOWIDGET_H
#define VIDEOWIDGET_H
-#include <QGLWidget>
#include <QTime>
-#include <QFrame>
-#include <QImage>
+#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) {
-#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 updateImage(unsigned char* frame, int width, int height);
- void update();
+ void update_image(unsigned char* frame, int width, int height);
+protected slots:
+ void paintEvent( QPaintEvent* e ) {
+ setPixmap(pixmap);
+ QLabel::paintEvent(e);
+ }
private:
- void resize_frame(QImage& qframe);
- QImage resized_qframe;
QMutex mtx;
+ QPixmap pixmap;
};
#endif // VIDEOWIDGET_H