summaryrefslogtreecommitdiffhomepage
path: root/tracker-rs/ftnoir_tracker_rs.h
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-rs/ftnoir_tracker_rs.h')
-rw-r--r--tracker-rs/ftnoir_tracker_rs.h40
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);
};