summaryrefslogtreecommitdiffhomepage
path: root/tracker-pt/module.cpp
blob: d0f097b94b072714b9531f29f15d77c3d8e15206 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include "ftnoir_tracker_pt.h"
#include "api/plugin-api.hpp"

#include "camera.h"
#include "point_extractor.h"
#include "ftnoir_tracker_pt_dialog.h"

#include "pt-api.hpp"

#include <memory>

static const QString module_name = "tracker-pt";

struct pt_module_traits final : pt_runtime_traits
{
    std::unique_ptr<pt_camera> make_camera() const override
    {
        return std::unique_ptr<pt_camera>(new Camera(module_name));
    }

    std::unique_ptr<pt_point_extractor> make_point_extractor() const override
    {
        return std::unique_ptr<pt_point_extractor>(new PointExtractor(module_name));
    }

    QString get_module_name() const override
    {
        return module_name;
    }
};

struct pt_tracker_module : Tracker_PT
{
    pt_tracker_module() : Tracker_PT(pt_module_traits())
    {
    }
};

struct pt_tracker_dialog_module : TrackerDialog_PT
{
    pt_tracker_dialog_module() : TrackerDialog_PT(module_name) {}
};

class pt_module_metadata : 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)