diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-24 17:26:05 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2017-05-24 17:26:05 +0200 |
commit | f79bdb633abf5d6925b2851adab48ed24d3ab30a (patch) | |
tree | fe7008693ad14d3136af515d958e5865dcf2b5f1 /tracker-fusion/fusion.h | |
parent | a6c8eafcd439a9f2c10dac025ac4c58d1393a226 (diff) |
tracker/fusion: add back "second tracker" functionality
It only took us five years to implement again, following removal
after the fork from facetracknoir.
Diffstat (limited to 'tracker-fusion/fusion.h')
-rw-r--r-- | tracker-fusion/fusion.h | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/tracker-fusion/fusion.h b/tracker-fusion/fusion.h new file mode 100644 index 00000000..a943fe06 --- /dev/null +++ b/tracker-fusion/fusion.h @@ -0,0 +1,59 @@ +#pragma once +#include "api/plugin-api.hpp" +#include "api/plugin-support.hpp" +#include <QFrame> +#include <QCoreApplication> + +#include "options/options.hpp" +using namespace options; + +struct fusion_settings final : opts +{ + value<QString> rot_tracker_name; + value<QString> pos_tracker_name; + + fusion_settings(); +}; + +struct has_modules +{ + Modules modules; + has_modules(); +}; + +struct fusion_tracker : public ITracker, has_modules +{ + fusion_tracker(); + ~fusion_tracker() override; + void start_tracker(QFrame *) override; + void data(double *data) override; + + double rot_tracker_data[6], pos_tracker_data[6]; + + std::unique_ptr<QFrame> other_frame; + std::shared_ptr<dylib> rot_dylib, pos_dylib; + std::shared_ptr<ITracker> rot_tracker, pos_tracker; +}; + +#include "ui_fusion.h" + +class fusion_dialog : public ITrackerDialog, has_modules +{ + Q_OBJECT + + fusion_settings s; + Ui::fusion_ui ui; +public: + fusion_dialog(); +private slots: + void doOK(); + void doCancel(); +}; + +class fusion_metadata : public Metadata +{ +public: + QString name() { return QString(QCoreApplication::translate("fusion_metadata", "Fusion")); } + QIcon icon() { return QIcon(":/images/fusion-tracker-logo.png"); } +}; + |