summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_fsuipc
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2014-10-19 13:39:50 +0200
committerStanislaw Halik <sthalik@misaki.pl>2014-10-19 13:39:50 +0200
commita8ffbb76f3e3bbca547fccf5135323e06cae9d2a (patch)
treecd77a5302cb4ead5995a2a86d5b5b6324ebf43ff /ftnoir_protocol_fsuipc
parent0f0d663c6263a59e2cb14f555a00b39b19c134e7 (diff)
update modules to refactored API
Diffstat (limited to 'ftnoir_protocol_fsuipc')
-rw-r--r--ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.cpp10
-rw-r--r--ftnoir_protocol_fsuipc/ftnoir_protocol_fsuipc.h18
2 files changed, 13 insertions, 15 deletions
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"); }
};