diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-19 13:39:50 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-19 13:39:50 +0200 |
commit | a8ffbb76f3e3bbca547fccf5135323e06cae9d2a (patch) | |
tree | cd77a5302cb4ead5995a2a86d5b5b6324ebf43ff /ftnoir_protocol_mouse | |
parent | 0f0d663c6263a59e2cb14f555a00b39b19c134e7 (diff) |
update modules to refactored API
Diffstat (limited to 'ftnoir_protocol_mouse')
-rw-r--r-- | ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp | 4 | ||||
-rw-r--r-- | ftnoir_protocol_mouse/ftnoir_protocol_mouse.h | 18 |
2 files changed, 10 insertions, 12 deletions
diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp index 47f7a67e..ca3ba805 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.cpp @@ -29,7 +29,7 @@ #include "ftnoir_protocol_mouse.h" #include "facetracknoir/plugin-support.h" -void FTNoIR_Protocol::sendHeadposeToGame(const double *headpose ) { +void FTNoIR_Protocol::pose(const double *headpose ) { double fMouse_X = 0; double fMouse_Y = 0; @@ -58,7 +58,7 @@ void FTNoIR_Protocol::reload() s.b->reload(); } -bool FTNoIR_Protocol::checkServerInstallationOK() +bool FTNoIR_Protocol::correct() { return true; } diff --git a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h index 8f1f3ff1..55a37e12 100644 --- a/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h +++ b/ftnoir_protocol_mouse/ftnoir_protocol_mouse.h @@ -60,9 +60,9 @@ class FTNoIR_Protocol : public IProtocol { public: FTNoIR_Protocol() {} - bool checkServerInstallationOK(); - void sendHeadposeToGame( const double *headpose); - QString getGameName() { + bool correct(); + void pose( const double *headpose); + QString game_name() { return "Mouse tracker"; } void reload(); @@ -70,15 +70,15 @@ private: struct settings s; }; -class MOUSEControls: public QWidget, public IProtocolDialog +class MOUSEControls: public IProtocolDialog { Q_OBJECT public: MOUSEControls(); - void registerProtocol(IProtocol *protocol) { + void register_protocol(IProtocol *protocol) { _proto = (FTNoIR_Protocol *) protocol; } - void unRegisterProtocol() { + void unregister_protocol() { _proto = NULL; } private: @@ -93,10 +93,8 @@ private slots: class FTNoIR_ProtocolDll : public Metadata { public: - void getFullName(QString *strToBeFilled) { *strToBeFilled = QString("Mouse Look"); } - void getShortName(QString *strToBeFilled) { *strToBeFilled = QString("Mouse Look"); } - void getDescription(QString *strToBeFilled) { *strToBeFilled = QString("Mouse Look protocol"); } - void getIcon(QIcon *icon) { *icon = QIcon(":/images/mouse.png"); } + QString name() { return QString("mouse emulation"); } + QIcon icon() { return QIcon(":/images/mouse.png"); } }; |