summaryrefslogtreecommitdiffhomepage
path: root/tracker-easy/module.cpp
blob: 0c360e80af0a85216185566f1867ea00904b6f20 (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
51
52
53
54
55
#include "tracker-easy.h"
#include "tracker-easy-dialog.h"
#include "tracker-easy-api.h"
#include "module.hpp"
#include "cv-point-extractor.h"


#include <memory>

static const QString module_name = "tracker-easy";

#ifdef __clang__
#   pragma clang diagnostic ignored "-Wweak-vtables"
#endif

namespace pt_module {

struct pt_module_traits final : IEasyTrackerTraits
{
    pointer<IPointExtractor> make_point_extractor() const override
    {
        return pointer<IPointExtractor>(new CvPointExtractor(module_name));
    }

    QString get_module_name() const override
    {
        return module_name;
    }

};

struct tracker_pt : EasyTracker
{
    tracker_pt() : EasyTracker(pointer<IEasyTrackerTraits>(new pt_module_traits))
    {
    }
};

struct dialog_pt : EasyTrackerDialog
{
    dialog_pt();
};

dialog_pt::dialog_pt() : EasyTrackerDialog(module_name) {}

QString metadata_pt::name() { return tr("Easy Tracker 0.1"); }
QIcon metadata_pt::icon() { return QIcon(":/Resources/Logo_IR.png"); }

}

// ns pt_module

using namespace pt_module;

OPENTRACK_DECLARE_TRACKER(tracker_pt, dialog_pt, metadata_pt)