diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-03-07 01:11:21 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-03-07 01:11:21 +0100 |
commit | d241a49ec83d8a146ceddca44b1281c7e4c9da50 (patch) | |
tree | d31e95887ebabf85a06c7ccddcba773d30f96d97 /tracker-rs/ftnoir_tracker_rs.h | |
parent | 1ab1d2c72315c03bf10c5c78bb6b3b674926039f (diff) | |
parent | 69005c7e0295b1b6f39e7d3f3d9d2911a31e246c (diff) |
Merge branch 'unstable' into trackhattrackhat-1.2p1
Diffstat (limited to 'tracker-rs/ftnoir_tracker_rs.h')
-rw-r--r-- | tracker-rs/ftnoir_tracker_rs.h | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/tracker-rs/ftnoir_tracker_rs.h b/tracker-rs/ftnoir_tracker_rs.h index 7cda7370..845e0beb 100644 --- a/tracker-rs/ftnoir_tracker_rs.h +++ b/tracker-rs/ftnoir_tracker_rs.h @@ -7,34 +7,42 @@ #pragma once -#include "ui_ftnoir_tracker_rs_controls.h" #include "opentrack/plugin-api.hpp" -#include <QProcess> -#include <QMutex> -#include <QThread> -#include <QUdpSocket> +#include "ui_ftnoir_tracker_rs_controls.h" +#include "ftnoir_tracker_rs_worker.h" +#include <QTimer> + +class ImageWidget; -class RSTracker : protected QObject, public ITracker +class RSTracker : public QObject, public ITracker { Q_OBJECT public: RSTracker(); ~RSTracker(); - void start_tracker(QFrame *) override; - void data(double *data) override; + void start_tracker(QFrame *) override; + void data(double *data) override; + +public slots: + static bool startSdkInstallationProcess(); + +protected: + void configurePreviewFrame(); private: - QMutex mMutex; - QThread mThread; - QProcess mRealSenseImplProcess; - QUdpSocket mSocket; - double mPose[6]; + RSTrackerWorkerThread mTrackerWorkerThread; + QTimer mPreviewUpdateTimer; + QWidget *mPreviewFrame; + ImageWidget *mImageWidget = nullptr; + const int kPreviewUpdateInterval = 30; private slots: - void rsImplProcessError(QProcess::ProcessError); - void rsImplProcessFinished(int); - void readPendingUdpPoseData(); + void showRealSenseErrorMessageBox(int exitCode); + void startPreview(); + void updatePreview(); + void stopPreview(); + void handleTrackingEnded(int exitCode); }; |