diff options
Diffstat (limited to 'tracker-pt/module.cpp')
-rw-r--r-- | tracker-pt/module.cpp | 29 |
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) |