diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-19 13:39:50 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-19 13:39:50 +0200 |
commit | a8ffbb76f3e3bbca547fccf5135323e06cae9d2a (patch) | |
tree | cd77a5302cb4ead5995a2a86d5b5b6324ebf43ff /ftnoir_tracker_aruco | |
parent | 0f0d663c6263a59e2cb14f555a00b39b19c134e7 (diff) |
update modules to refactored API
Diffstat (limited to 'ftnoir_tracker_aruco')
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp | 33 | ||||
-rw-r--r-- | ftnoir_tracker_aruco/ftnoir_tracker_aruco.h | 10 |
2 files changed, 9 insertions, 34 deletions
diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp index fa7bf398..066b782a 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.cpp @@ -117,7 +117,7 @@ Tracker::~Tracker() qDebug() << "all done!"; } -void Tracker::StartTracker(QFrame* videoframe) +void Tracker::start_tracker(QFrame* videoframe) { videoframe->show(); videoWidget = new ArucoVideoWidget(videoframe); @@ -398,7 +398,7 @@ void Tracker::run() } } -void Tracker::GetHeadPoseData(double *data) +void Tracker::data(double *data) { QMutexLocker lck(&mtx); @@ -412,36 +412,11 @@ void Tracker::GetHeadPoseData(double *data) class TrackerDll : public Metadata { - // ITrackerDll interface - void getFullName(QString *strToBeFilled); - void getShortName(QString *strToBeFilled); - void getDescription(QString *strToBeFilled); - void getIcon(QIcon *icon); + QString name() { return QString("aruco -- paper marker tracker"); } + QIcon icon() { return QIcon(":/images/aruco.png"); } }; //----------------------------------------------------------------------------- -void TrackerDll::getFullName(QString *strToBeFilled) -{ - *strToBeFilled = "aruco"; -} - -void TrackerDll::getShortName(QString *strToBeFilled) -{ - *strToBeFilled = "aruco"; -} - -void TrackerDll::getDescription(QString *strToBeFilled) -{ - *strToBeFilled = ""; -} - -void TrackerDll::getIcon(QIcon *icon) -{ - *icon = QIcon(":/images/aruco.png"); -} - - -//----------------------------------------------------------------------------- //#pragma comment(linker, "/export:GetTrackerDll=_GetTrackerDll@0") extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() diff --git a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h index 090cf478..67392d40 100644 --- a/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h +++ b/ftnoir_tracker_aruco/ftnoir_tracker_aruco.h @@ -47,8 +47,8 @@ class Tracker : protected QThread, public ITracker public: Tracker(); ~Tracker() override; - void StartTracker(QFrame* frame); - void GetHeadPoseData(double *data); + void start_tracker(QFrame* frame); + void data(double *data); void run(); void reload() { s.b->reload(); } void getRT(cv::Matx33d &r, cv::Vec3d &t); @@ -65,13 +65,13 @@ private: cv::Vec3d t; }; -class TrackerControls : public QWidget, public ITrackerDialog +class TrackerControls : public ITrackerDialog { Q_OBJECT public: TrackerControls(); - void registerTracker(ITracker * x) { tracker = dynamic_cast<Tracker*>(x); } - void unRegisterTracker() { tracker = nullptr; } + void register_tracker(ITracker * x) { tracker = static_cast<Tracker*>(x); } + void unregister_tracker() { tracker = nullptr; } private: Ui::Form ui; Tracker* tracker; |