diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-15 08:52:25 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2013-10-15 08:52:25 +0200 |
commit | 864910a1fb753629d2852a91ffae4ebba374358c (patch) | |
tree | 7fbee6d32dd5312e592ab3a41219a7daa9cf56ae /ftnoir_tracker_aruco | |
parent | a73f49c89299ec69dda73e3e7a16cebe76da373e (diff) |
fix trackers for qt5
Assorted changes:
- make filenames unique, since automoc made a boo-boo
- adjust include paths, "QtGui" -> ""
- use std::shared_ptr in c++11 mode (thanks Patrick!)
- make class names unique, automoc sucks, but saves typing
- add a dummy class in one file since moronic automoc thinks
every target contains Q_OBJECTS!!!
Diffstat (limited to 'ftnoir_tracker_aruco')
-rw-r--r-- | ftnoir_tracker_aruco/ar_video_widget.cpp (renamed from ftnoir_tracker_aruco/video_widget.cpp) | 4 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/ar_video_widget.h (renamed from ftnoir_tracker_aruco/video_widget.h) | 4 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 2 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.h | 5 |
4 files changed, 8 insertions, 7 deletions
diff --git a/ftnoir_tracker_aruco/video_widget.cpp b/ftnoir_tracker_aruco/ar_video_widget.cpp index 84cba6a3..6a4572a0 100644 --- a/ftnoir_tracker_aruco/video_widget.cpp +++ b/ftnoir_tracker_aruco/ar_video_widget.cpp @@ -5,13 +5,13 @@ * copyright notice and this permission notice appear in all copies. */ -#include "video_widget.h" +#include "ar_video_widget.h" #include <QDebug> using namespace std; -void VideoWidget::update_image(unsigned char *frame, int width, int height) +void ArucoVideoWidget::update_image(unsigned char *frame, int width, int height) { QMutexLocker foo(&mtx); QImage qframe = QImage(width, height, QImage::Format_RGB888); diff --git a/ftnoir_tracker_aruco/video_widget.h b/ftnoir_tracker_aruco/ar_video_widget.h index 87b6278a..dd0c16ac 100644 --- a/ftnoir_tracker_aruco/video_widget.h +++ b/ftnoir_tracker_aruco/ar_video_widget.h @@ -17,12 +17,12 @@ #include <QPaintEvent> // ---------------------------------------------------------------------------- -class VideoWidget : public QWidget +class ArucoVideoWidget : public QWidget { Q_OBJECT public: - VideoWidget(QWidget *parent) : QWidget(parent), mtx() { + ArucoVideoWidget(QWidget *parent) : QWidget(parent), mtx() { } void update_image(unsigned char* frame, int width, int height); protected slots: diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index 8025e956..c735b479 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -148,7 +148,7 @@ Tracker::~Tracker() void Tracker::StartTracker(QFrame* videoframe) { videoframe->show(); - videoWidget = new VideoWidget(videoframe); + videoWidget = new ArucoVideoWidget(videoframe); QHBoxLayout* layout = new QHBoxLayout(); layout->setContentsMargins(0, 0, 0, 0); layout->addWidget(videoWidget); diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h index 98aba2cf..ddbdd179 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h @@ -10,12 +10,13 @@ #include "ftnoir_tracker_base/ftnoir_tracker_base.h" #include "ui_aruco-trackercontrols.h" -#include "video_widget.h" +#include "ar_video_widget.h" #include <QObject> #include <QTimer> #include <QThread> #include <QMutex> #include <QHBoxLayout> +#include <QDialog> #include <opencv2/opencv.hpp> class Tracker : public QThread, public ITracker @@ -31,7 +32,7 @@ public: private: QMutex mtx; QTimer timer; - VideoWidget* videoWidget; + ArucoVideoWidget* videoWidget; QHBoxLayout* layout; volatile bool fresh, stop; float fov; |