summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/module.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-12 19:40:22 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-12 19:40:22 +0100
commit537a88e522314753149e1ea7921489e58043b40c (patch)
treea62ac59a546c8b0ee8adeee3bd2aa255d7e4570e /tracker-pt/module.cpp
parent11d8e48e4370c9201f8258b418aadc7a4290dba1 (diff)
tracker/pt: isolate point extractor and image type
Issue: #718
Diffstat (limited to 'tracker-pt/module.cpp')
-rw-r--r--tracker-pt/module.cpp29
1 files changed, 23 insertions, 6 deletions
diff --git a/tracker-pt/module.cpp b/tracker-pt/module.cpp
index d0f097b9..d977aa16 100644
--- a/tracker-pt/module.cpp
+++ b/tracker-pt/module.cpp
@@ -2,6 +2,7 @@
#include "api/plugin-api.hpp"
#include "camera.h"
+#include "frame.hpp"
#include "point_extractor.h"
#include "ftnoir_tracker_pt_dialog.h"
@@ -11,6 +12,8 @@
static const QString module_name = "tracker-pt";
+using namespace pt_module;
+
struct pt_module_traits final : pt_runtime_traits
{
std::unique_ptr<pt_camera> make_camera() const override
@@ -27,24 +30,38 @@ struct pt_module_traits final : pt_runtime_traits
{
return module_name;
}
+
+ std::unique_ptr<pt_frame> make_frame() const override
+ {
+ return std::unique_ptr<pt_frame>(new Frame);
+ }
+
+ std::unique_ptr<pt_preview> make_preview(int w, int h) const override
+ {
+ return std::unique_ptr<pt_preview>(new Preview(w, h));
+ }
};
-struct pt_tracker_module : Tracker_PT
+struct tracker_pt : Tracker_PT
{
- pt_tracker_module() : Tracker_PT(pt_module_traits())
+ tracker_pt() : Tracker_PT(pt_module_traits())
{
}
};
-struct pt_tracker_dialog_module : TrackerDialog_PT
+struct dialog_pt : TrackerDialog_PT
{
- pt_tracker_dialog_module() : TrackerDialog_PT(module_name) {}
+ dialog_pt() : TrackerDialog_PT(module_name) {}
};
-class pt_module_metadata : public Metadata
+class metadata_pt : public Metadata
{
QString name() { return _("PointTracker 1.1"); }
QIcon icon() { return QIcon(":/Resources/Logo_IR.png"); }
};
-OPENTRACK_DECLARE_TRACKER(pt_tracker_module, pt_tracker_dialog_module, pt_module_metadata)
+// ns pt_module
+
+using namespace pt_module;
+
+OPENTRACK_DECLARE_TRACKER(tracker_pt, dialog_pt, metadata_pt)