From a8ffbb76f3e3bbca547fccf5135323e06cae9d2a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 19 Oct 2014 13:39:50 +0200 Subject: update modules to refactored API --- ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp | 10 +++++----- ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h | 18 ++++++++---------- 2 files changed, 13 insertions(+), 15 deletions(-) (limited to 'ftnoir_protocol_fsuipc') diff --git a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp index 822cdb4d..16f116f6 100644 --- a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp +++ b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp @@ -58,7 +58,7 @@ double local_x; return (int) y; } -void FTNoIR_Protocol::sendHeadposeToGame(const double *headpose ) { +void FTNoIR_Protocol::pose(const double *headpose ) { DWORD result; TFSState pitch; TFSState yaw; @@ -139,20 +139,20 @@ void FTNoIR_Protocol::sendHeadposeToGame(const double *headpose ) { prevRotZ = virtRotZ; } -bool FTNoIR_Protocol::checkServerInstallationOK() +bool FTNoIR_Protocol::correct() { - qDebug() << "checkServerInstallationOK says: Starting Function"; + qDebug() << "correct says: Starting Function"; // // Load the DLL. // FSUIPCLib.setFileName( s.LocationOfDLL ); if (FSUIPCLib.load() != true) { - qDebug() << "checkServerInstallationOK says: Error loading FSUIPC DLL"; + qDebug() << "correct says: Error loading FSUIPC DLL"; return false; } else { - qDebug() << "checkServerInstallationOK says: FSUIPC DLL loaded."; + qDebug() << "correct says: FSUIPC DLL loaded."; } return true; diff --git a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h index bde16d8f..06428df3 100644 --- a/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h +++ b/ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h @@ -67,9 +67,9 @@ class FTNoIR_Protocol : public IProtocol public: FTNoIR_Protocol(); ~FTNoIR_Protocol() override; - bool checkServerInstallationOK(); - void sendHeadposeToGame(const double* headpose); - QString getGameName() { + bool correct(); + void pose(const double* headpose); + QString game_name() { return "Microsoft Flight Simulator X"; } private: @@ -79,13 +79,13 @@ private: settings s; }; -class FSUIPCControls: public QWidget, public IProtocolDialog +class FSUIPCControls: public IProtocolDialog { Q_OBJECT public: FSUIPCControls(); - void registerProtocol(IProtocol *) {} - void unRegisterProtocol() {} + void register_protocol(IProtocol *) {} + void unregister_protocol() {} private: Ui::UICFSUIPCControls ui; settings s; @@ -98,10 +98,8 @@ private slots: class FTNoIR_ProtocolDll : public Metadata { public: - void getFullName(QString *strToBeFilled) { *strToBeFilled = QString("FS2002/FS2004"); } - void getShortName(QString *strToBeFilled) { *strToBeFilled = QString("FSUIPC"); } - void getDescription(QString *strToBeFilled) { *strToBeFilled = QString("Microsoft FS2004 protocol"); } - void getIcon(QIcon *icon) { *icon = QIcon(":/images/fs9.png"); } + QString name() { return QString("FSUIPC -- Microsoft FS2002/FS2004"); } + QIcon icon() { return QIcon(":/images/fs9.png"); } }; -- cgit v1.2.3