summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_ftn
diff options
context:
space:
mode:
Diffstat (limited to 'ftnoir_protocol_ftn')
-rw-r--r--ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp4
-rw-r--r--ftnoir_protocol_ftn/ftnoir_protocol_ftn.h19
-rw-r--r--ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp3
3 files changed, 11 insertions, 15 deletions
diff --git a/ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp b/ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp
index ccff1ba5..c8759bc1 100644
--- a/ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp
+++ b/ftnoir_protocol_ftn/ftnoir_protocol_ftn.cpp
@@ -33,7 +33,7 @@ FTNoIR_Protocol::FTNoIR_Protocol()
{
}
-void FTNoIR_Protocol::sendHeadposeToGame(const double *headpose) {
+void FTNoIR_Protocol::pose(const double *headpose) {
int destPort = s.port;
QHostAddress destIP(QString("%1.%2.%3.%4").arg(
QString::number(static_cast<int>(s.ip1)),
@@ -43,7 +43,7 @@ void FTNoIR_Protocol::sendHeadposeToGame(const double *headpose) {
outSocket.writeDatagram((const char *) headpose, sizeof( double[6] ), destIP, destPort);
}
-bool FTNoIR_Protocol::checkServerInstallationOK()
+bool FTNoIR_Protocol::correct()
{
return outSocket.bind(QHostAddress::Any, 0, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint);
}
diff --git a/ftnoir_protocol_ftn/ftnoir_protocol_ftn.h b/ftnoir_protocol_ftn/ftnoir_protocol_ftn.h
index c14a7dba..587f0034 100644
--- a/ftnoir_protocol_ftn/ftnoir_protocol_ftn.h
+++ b/ftnoir_protocol_ftn/ftnoir_protocol_ftn.h
@@ -53,9 +53,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 "UDP Tracker";
}
private:
@@ -64,13 +64,13 @@ private:
};
// Widget that has controls for FTNoIR protocol client-settings.
-class FTNControls: public QWidget, public IProtocolDialog
+class FTNControls: public IProtocolDialog
{
Q_OBJECT
public:
FTNControls();
- void registerProtocol(IProtocol *) {}
- void unRegisterProtocol() {}
+ void register_protocol(IProtocol *) {}
+ void unregister_protocol() {}
private:
Ui::UICFTNControls ui;
settings s;
@@ -82,9 +82,6 @@ private slots:
class FTNoIR_ProtocolDll : public Metadata
{
public:
- void getFullName(QString *strToBeFilled) { *strToBeFilled = QString("UDP"); }
- void getShortName(QString *strToBeFilled) { *strToBeFilled = QString("UDP"); }
- void getDescription(QString *strToBeFilled) { *strToBeFilled = QString("opentrack UDP protocol"); }
-
- void getIcon(QIcon *icon) { *icon = QIcon(":/images/facetracknoir.png"); }
+ QString name() { return QString("UDP receiver"); }
+ QIcon icon() { return QIcon(":/images/facetracknoir.png"); }
};
diff --git a/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp b/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp
index 8af12ad7..4637223d 100644
--- a/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp
+++ b/ftnoir_protocol_ftn/ftnoir_protocol_ftn_dialog.cpp
@@ -25,8 +25,7 @@
#include "ftnoir_protocol_ftn.h"
#include "facetracknoir/plugin-support.h"
-FTNControls::FTNControls() :
- QWidget()
+FTNControls::FTNControls()
{
ui.setupUi( this );