summaryrefslogtreecommitdiffhomepage
path: root/ftnoir_protocol_ft/ftnoir_protocol_ft.h
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_ft/ftnoir_protocol_ft.h
parent0f0d663c6263a59e2cb14f555a00b39b19c134e7 (diff)
update modules to refactored API
Diffstat (limited to 'ftnoir_protocol_ft/ftnoir_protocol_ft.h')
-rw-r--r--ftnoir_protocol_ft/ftnoir_protocol_ft.h40
1 files changed, 17 insertions, 23 deletions
diff --git a/ftnoir_protocol_ft/ftnoir_protocol_ft.h b/ftnoir_protocol_ft/ftnoir_protocol_ft.h
index 5a9e5cdd..51079f20 100644
--- a/ftnoir_protocol_ft/ftnoir_protocol_ft.h
+++ b/ftnoir_protocol_ft/ftnoir_protocol_ft.h
@@ -60,42 +60,38 @@ 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() override {
QMutexLocker foo(&game_name_mutex);
return connected_game;
}
private:
- importTIRViewsStart viewsStart;
- importTIRViewsStop viewsStop;
-
+ settings s;
FTHeap *pMemData;
- QString game_name;
PortableLockedShm shm;
- QString ProgramName;
QLibrary FTIRViewsLib;
QProcess dummyTrackIR;
- static inline double getRadsFromDegrees ( double degrees )
- {
- return degrees * 0.017453;
- }
+ importTIRViewsStart viewsStart;
+ importTIRViewsStop viewsStop;
+
int intGameID;
- void start_tirviews();
- void start_dummy();
QString connected_game;
QMutex game_name_mutex;
- settings s;
+
+ static inline double getRadsFromDegrees(double degrees) { return degrees * 0.017453; }
+ void start_tirviews();
+ void start_dummy();
};
-class FTControls: public QWidget, public IProtocolDialog
+class FTControls: public IProtocolDialog
{
Q_OBJECT
public:
- explicit FTControls();
- void registerProtocol(IProtocol *) {}
- void unRegisterProtocol() {}
+ FTControls();
+ void register_protocol(IProtocol *) {}
+ void unregister_protocol() {}
private:
Ui::UICFTControls ui;
settings s;
@@ -108,8 +104,6 @@ private slots:
class FTNoIR_ProtocolDll : public Metadata
{
public:
- void getFullName(QString *strToBeFilled) { *strToBeFilled = QString("FreeTrack 2.0"); }
- void getShortName(QString *strToBeFilled) { *strToBeFilled = QString("FreeTrack 2.0"); }
- void getDescription(QString *strToBeFilled) { *strToBeFilled = QString("Enhanced FreeTrack protocol"); }
- void getIcon(QIcon *icon) { *icon = QIcon(":/images/freetrack.png"); }
+ QString name() { return QString("freetrack 2.0 Enhanced"); }
+ QIcon icon() { return QIcon(":/images/freetrack.png"); }
};