summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/plugin-qt-api.hpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-19 12:42:48 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-19 13:39:03 +0200
commit0f0d663c6263a59e2cb14f555a00b39b19c134e7 (patch)
treed0dbcb75089b601204c92228e1577077e903ef55 /facetracknoir/plugin-qt-api.hpp
parent9dc864f019d66d1b3ef9f46a824b72e416bdd4fc (diff)
main: refactor interlocked parts
Diffstat (limited to 'facetracknoir/plugin-qt-api.hpp')
-rw-r--r--facetracknoir/plugin-qt-api.hpp67
1 files changed, 34 insertions, 33 deletions
diff --git a/facetracknoir/plugin-qt-api.hpp b/facetracknoir/plugin-qt-api.hpp
index 1697d8e7..c268e195 100644
--- a/facetracknoir/plugin-qt-api.hpp
+++ b/facetracknoir/plugin-qt-api.hpp
@@ -2,67 +2,68 @@
#include <QString>
#include <QFrame>
+#include <QIcon>
struct Metadata
{
- Metadata() {}
- virtual ~Metadata() {}
-
- virtual void getFullName(QString *strToBeFilled) = 0;
- virtual void getShortName(QString *strToBeFilled) = 0;
- virtual void getDescription(QString *strToBeFilled) = 0;
- virtual void getIcon(QIcon *icon) = 0;
+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 virtual public the mess -sh 20141004
+// XXX TODO make public QWidget the mess -sh 20141004
struct IFilter
{
- virtual ~IFilter() = 0;
- virtual void FilterHeadPoseData(const double *target_camera_position, double *new_camera_position) = 0;
+public:
+ virtual ~IFilter() {};
+ virtual void filter(const double *target_camera_position, double *new_camera_position) = 0;
};
-inline IFilter::~IFilter() {}
-struct IFilterDialog
+struct IFilterDialog : public QWidget
{
- virtual ~IFilterDialog() = 0;
+ Q_OBJECT
+public:
+ virtual ~IFilterDialog() {}
virtual void registerFilter(IFilter* tracker) = 0;
virtual void unregisterFilter() = 0;
};
-inline IFilterDialog::~IFilterDialog() {}
struct IProtocol
{
- virtual ~IProtocol() = 0;
- virtual bool checkServerInstallationOK() = 0;
- virtual void sendHeadposeToGame( const double* headpose ) = 0;
- virtual QString getGameName() = 0;
+public:
+ virtual ~IProtocol() {};
+ virtual bool correct() = 0;
+ virtual void pose( const double* headpose ) = 0;
+ virtual QString game_name() = 0;
};
-inline IProtocol::~IProtocol() {}
-struct IProtocolDialog
+struct IProtocolDialog : public QWidget
{
- virtual ~IProtocolDialog() = 0;
- virtual void registerProtocol(IProtocol *protocol) = 0;
- virtual void unRegisterProtocol() = 0;
+ Q_OBJECT
+public:
+ virtual ~IProtocolDialog() {}
+ virtual void register_protocol(IProtocol *protocol) = 0;
+ virtual void unregister_protocol() = 0;
};
-inline IProtocolDialog::~IProtocolDialog() {}
struct ITracker
{
- virtual ~ITracker() = 0;
- virtual void StartTracker( QFrame* frame ) = 0;
- virtual void GetHeadPoseData(double *data) = 0;
+public:
+ virtual ~ITracker() {};
+ virtual void start_tracker( QFrame* frame ) = 0;
+ virtual void data(double *data) = 0;
};
-inline ITracker::~ITracker() {}
-struct ITrackerDialog
+struct ITrackerDialog : public QWidget
{
- virtual ~ITrackerDialog() = 0;
- virtual void registerTracker(ITracker *tracker) = 0;
- virtual void unRegisterTracker() = 0;
+ Q_OBJECT
+public:
+ virtual ~ITrackerDialog() {}
+ virtual void register_tracker(ITracker *tracker) = 0;
+ virtual void unregister_tracker() = 0;
};
-inline ITrackerDialog::~ITrackerDialog() {}