summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/plugin-qt-api.hpp
blob: c268e195a9bb89e47b2555781f2f3a1afa9b199f (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#pragma once

#include <QString>
#include <QFrame>
#include <QIcon>

struct Metadata
{
public:
    virtual QString name() = 0;
    virtual QIcon icon() = 0;
    virtual ~Metadata() {};
};

// XXX TODO get rid of QString/QFrame to fix ABI woes
// will lead plugins from different C++ runtimes working -sh 20141004

// XXX TODO make public QWidget the mess -sh 20141004

struct IFilter
{
public:
    virtual ~IFilter() {};
    virtual void filter(const double *target_camera_position, double *new_camera_position) = 0;
};

struct IFilterDialog : public QWidget
{
    Q_OBJECT
public:
    virtual ~IFilterDialog() {}
    virtual void registerFilter(IFilter* tracker) = 0;
    virtual void unregisterFilter() = 0;
};

struct IProtocol
{
public:
    virtual ~IProtocol() {};
    virtual bool correct() = 0;
    virtual void pose( const double* headpose ) = 0;
    virtual QString game_name() = 0;
};

struct IProtocolDialog : public QWidget
{
    Q_OBJECT
public:
    virtual ~IProtocolDialog() {}
    virtual void register_protocol(IProtocol *protocol) = 0;
    virtual void unregister_protocol() = 0;
};

struct ITracker
{
public:
    virtual ~ITracker() {};
    virtual void start_tracker( QFrame* frame ) = 0;
    virtual void data(double *data) = 0;
};

struct ITrackerDialog : public QWidget
{
    Q_OBJECT
public:
    virtual ~ITrackerDialog() {}
    virtual void register_tracker(ITracker *tracker) = 0;
    virtual void unregister_tracker() = 0;
};