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_tracker_udp | |
parent | 0f0d663c6263a59e2cb14f555a00b39b19c134e7 (diff) |
update modules to refactored API
Diffstat (limited to 'ftnoir_tracker_udp')
-rw-r--r-- | ftnoir_tracker_udp/ftnoir_tracker_udp.cpp | 4 | ||||
-rw-r--r-- | ftnoir_tracker_udp/ftnoir_tracker_udp.h | 16 | ||||
-rw-r--r-- | ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp | 3 | ||||
-rw-r--r-- | ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp | 20 |
4 files changed, 10 insertions, 33 deletions
diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp index 136e075d..cbea79a4 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.cpp @@ -23,13 +23,13 @@ void FTNoIR_Tracker::run() { } } -void FTNoIR_Tracker::StartTracker(QFrame*) +void FTNoIR_Tracker::start_tracker(QFrame*) { (void) sock.bind(QHostAddress::Any, (int) s.port, QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint); start(); } -void FTNoIR_Tracker::GetHeadPoseData(double *data) +void FTNoIR_Tracker::data(double *data) { QMutexLocker foo(&mutex); for (int i = 0; i < 6; i++) diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp.h b/ftnoir_tracker_udp/ftnoir_tracker_udp.h index a6f2e6d3..1ec63866 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp.h +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp.h @@ -21,8 +21,8 @@ class FTNoIR_Tracker : public ITracker, protected QThread public: FTNoIR_Tracker(); ~FTNoIR_Tracker(); - void StartTracker(QFrame *); - void GetHeadPoseData(double *data); + void start_tracker(QFrame *); + void data(double *data); protected: void run() override; private: @@ -33,13 +33,13 @@ private: volatile bool should_quit; }; -class TrackerControls: public QWidget, public ITrackerDialog +class TrackerControls: public ITrackerDialog { Q_OBJECT public: TrackerControls(); - void registerTracker(ITracker *) {} - void unRegisterTracker() {} + void register_tracker(ITracker *) {} + void unregister_tracker() {} private: Ui::UICFTNClientControls ui; settings s; @@ -51,8 +51,6 @@ private slots: class FTNoIR_TrackerDll : public Metadata { public: - void getFullName(QString *strToBeFilled); - void getShortName(QString *strToBeFilled); - void getDescription(QString *strToBeFilled); - void getIcon(QIcon *icon); + QString name() { return QString("UDP sender"); } + QIcon icon() { return QIcon(":/images/facetracknoir.png"); } }; diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp index 062b1899..0b4dd74e 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp_dialog.cpp @@ -1,8 +1,7 @@ #include "ftnoir_tracker_udp.h" #include "facetracknoir/plugin-support.h" -TrackerControls::TrackerControls() : -QWidget() +TrackerControls::TrackerControls() { ui.setupUi( this ); diff --git a/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp b/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp index 7cd23552..d6cb5db3 100644 --- a/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp +++ b/ftnoir_tracker_udp/ftnoir_tracker_udp_dll.cpp @@ -1,26 +1,6 @@ #include "ftnoir_tracker_udp.h" #include "facetracknoir/plugin-support.h" -void FTNoIR_TrackerDll::getFullName(QString *strToBeFilled) -{ - *strToBeFilled = "UDP"; -} - -void FTNoIR_TrackerDll::getShortName(QString *strToBeFilled) -{ - *strToBeFilled = "UDP"; -} - -void FTNoIR_TrackerDll::getDescription(QString *strToBeFilled) -{ - *strToBeFilled = "UDP"; -} - -void FTNoIR_TrackerDll::getIcon(QIcon *icon) -{ - *icon = QIcon(":/images/facetracknoir.png"); -} - extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_TrackerDll; |