diff options
Diffstat (limited to 'facetracknoir/plugin-qt-api.hpp')
-rw-r--r-- | facetracknoir/plugin-qt-api.hpp | 67 |
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() {} |