diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-02 18:41:01 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-04-02 18:41:01 +0200 |
commit | 8303597a865400a363ae574ccde819302495f498 (patch) | |
tree | c83b383b3ec818f610cc6137f2b72ee7b4173b09 /ftnoir_tracker_pt/video_widget.h | |
parent | 8adf6b1650af6027f28db12ca2b4de92a3fac11d (diff) |
Just put everything new in. Conflict resolution will be later
Diffstat (limited to 'ftnoir_tracker_pt/video_widget.h')
-rw-r--r-- | ftnoir_tracker_pt/video_widget.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/ftnoir_tracker_pt/video_widget.h b/ftnoir_tracker_pt/video_widget.h index f49fef18..2425603b 100644 --- a/ftnoir_tracker_pt/video_widget.h +++ b/ftnoir_tracker_pt/video_widget.h @@ -11,7 +11,10 @@ #include <QGLWidget>
#include <QTime>
#include <opencv2/opencv.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
+#include <QWidget>
+#include <QMutex>
+#include <QMutexLocker>
// ----------------------------------------------------------------------------
class VideoWidget : public QGLWidget
@@ -19,13 +22,18 @@ class VideoWidget : public QGLWidget Q_OBJECT
public:
- VideoWidget(QWidget *parent) : QGLWidget(parent) {}
+ VideoWidget(QWidget *parent) : QGLWidget(parent) {
+#if !defined(_WIN32)
+ setAttribute(Qt::WA_NativeWindow, true);
+#endif
+ }
void initializeGL();
void resizeGL(int w, int h);
void paintGL();
- void update(cv::Mat frame, boost::shared_ptr< std::vector<cv::Vec2f> > points);
+ void update_image(cv::Mat frame, std::auto_ptr< std::vector<cv::Vec2f> > points);
+ void update();
private:
void resize_frame();
@@ -34,7 +42,8 @@ private: QImage qframe;
QImage resized_qframe;
- boost::shared_ptr< std::vector<cv::Vec2f> > points;
+ std::auto_ptr< std::vector<cv::Vec2f> > points;
+ QMutex mtx;
};
#endif // VIDEOWIDGET_H
|