summaryrefslogtreecommitdiffhomepage
path: root/opentrack/plugin-qt-api.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-19 16:08:46 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-19 18:28:08 +0200
commitdd87370ff2818ee3c3d67ba104405b85ee44daba (patch)
treed5ebdf22aaccd0e345ce7a7c2ecb7b7193ea0791 /opentrack/plugin-qt-api.hpp
parent7e2e341c45b86f76e08d74e056929ad76ff1a383 (diff)
decruft more
Diffstat (limited to 'opentrack/plugin-qt-api.hpp')
-rw-r--r--opentrack/plugin-qt-api.hpp63
1 files changed, 63 insertions, 0 deletions
diff --git a/opentrack/plugin-qt-api.hpp b/opentrack/plugin-qt-api.hpp
new file mode 100644
index 00000000..a2aa0d19
--- /dev/null
+++ b/opentrack/plugin-qt-api.hpp
@@ -0,0 +1,63 @@
+#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
+{
+ 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
+{
+ 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
+{
+ virtual ~ITrackerDialog() {}
+ virtual void register_tracker(ITracker *tracker) = 0;
+ virtual void unregister_tracker() = 0;
+};