From 78a5da173e16305d39974de31cc5a90132feb473 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 9 Jan 2018 20:30:21 +0100 Subject: tracker/qt-gamepad: remove Needs implementing in terms of libevdev --- tracker-qt-gamepad/CMakeLists.txt | 3 -- tracker-qt-gamepad/lang/nl_NL.ts | 20 -------- tracker-qt-gamepad/lang/ru_RU.ts | 20 -------- tracker-qt-gamepad/test.cpp | 99 -------------------------------------- tracker-qt-gamepad/test.h | 45 ----------------- tracker-qt-gamepad/test.ui | 59 ----------------------- tracker-qt-gamepad/test_dialog.cpp | 3 -- 7 files changed, 249 deletions(-) delete mode 100644 tracker-qt-gamepad/CMakeLists.txt delete mode 100644 tracker-qt-gamepad/lang/nl_NL.ts delete mode 100644 tracker-qt-gamepad/lang/ru_RU.ts delete mode 100644 tracker-qt-gamepad/test.cpp delete mode 100644 tracker-qt-gamepad/test.h delete mode 100644 tracker-qt-gamepad/test.ui delete mode 100644 tracker-qt-gamepad/test_dialog.cpp (limited to 'tracker-qt-gamepad') diff --git a/tracker-qt-gamepad/CMakeLists.txt b/tracker-qt-gamepad/CMakeLists.txt deleted file mode 100644 index a5bd040e..00000000 --- a/tracker-qt-gamepad/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -if(FALSE AND Qt5Gamepad_FOUND) - otr_module(tracker-qt-gamepad) -endif() diff --git a/tracker-qt-gamepad/lang/nl_NL.ts b/tracker-qt-gamepad/lang/nl_NL.ts deleted file mode 100644 index df531514..00000000 --- a/tracker-qt-gamepad/lang/nl_NL.ts +++ /dev/null @@ -1,20 +0,0 @@ - - - - - gamepad_metadata - - - Gamepad input - - - - - test_ui - - - Gamepad input - - - - diff --git a/tracker-qt-gamepad/lang/ru_RU.ts b/tracker-qt-gamepad/lang/ru_RU.ts deleted file mode 100644 index 0e8be628..00000000 --- a/tracker-qt-gamepad/lang/ru_RU.ts +++ /dev/null @@ -1,20 +0,0 @@ - - - - - gamepad_metadata - - - Gamepad input - - - - - test_ui - - - Gamepad input - - - - diff --git a/tracker-qt-gamepad/test.cpp b/tracker-qt-gamepad/test.cpp deleted file mode 100644 index 4f2c8daa..00000000 --- a/tracker-qt-gamepad/test.cpp +++ /dev/null @@ -1,99 +0,0 @@ -/* Copyright (c) 2014, Stanislaw Halik - - * Permission to use, copy, modify, and/or distribute this - * software for any purpose with or without fee is hereby granted, - * provided that the above copyright notice and this permission - * notice appear in all copies. - */ - -#include "test.h" -#include "api/plugin-api.hpp" -#include - -#include - -const double gamepad_tracker::incr[6] = -{ - 50, 40, 80, - 70, 5, 3 -}; - -gamepad_tracker::gamepad_tracker() : - last_x { 0, 0, 0, 0, 0, 0 } -{ -} - -gamepad_tracker::~gamepad_tracker() -{ -} - -void gamepad_tracker::start_tracker(QFrame*) -{ - t.start(); -} - -#ifdef EMIT_NAN -# include -#endif - -void gamepad_tracker::data(double *data) -{ - using std::fmod; - using std::sin; - using std::fabs; - using std::copysign; - - const double dt = t.elapsed_seconds(); - t.start(); - -#ifdef EMIT_NAN - if ((rand()%4) == 0) - { - for (int i = 0; i < 6; i++) - data[i] = 0./0.; - } - else -#endif - for (int i = 0; i < 6; i++) - { - double x = fmod(last_x[i] + incr[i] * d2r * dt, 2 * M_PI); - last_x[i] = x; - - if (i >= 3) - { -#ifdef DISCONTINUITY - if (x > pi + pi/2) - x -= M_PI; - else if (x > pi/2 && x < pi) - x += M_PI; -#endif - - data[i] = sin(x) * 180; - } - else - { - data[i] = sin(x) * 100; - } - } -} - -gamepad_dialog::gamepad_dialog() -{ - ui.setupUi(this); - - connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK())); - connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); -} - -void gamepad_dialog::doOK() -{ - //s.b->save(); - close(); -} - -void gamepad_dialog::doCancel() -{ - close(); -} - -OPENTRACK_DECLARE_TRACKER(gamepad_tracker, gamepad_dialog, gamepad_metadata) diff --git a/tracker-qt-gamepad/test.h b/tracker-qt-gamepad/test.h deleted file mode 100644 index 507697b5..00000000 --- a/tracker-qt-gamepad/test.h +++ /dev/null @@ -1,45 +0,0 @@ -#pragma once -#include "ui_test.h" -#include "api/plugin-api.hpp" -#include "compat/timer.hpp" - -#include - -class gamepad_tracker : public ITracker -{ -public: - gamepad_tracker(); - ~gamepad_tracker() override; - void start_tracker(QFrame *) override; - void data(double *data) override; - -private: - static constexpr double r2d = 180 / M_PI; - static constexpr double d2r = M_PI / 180; - - static const double incr[6]; - double last_x[6]; - Timer t; -}; - -class gamepad_dialog : public ITrackerDialog -{ - Q_OBJECT - - Ui::test_ui ui; -public: - gamepad_dialog(); - void register_tracker(ITracker *) override {} - void unregister_tracker() override {} -private slots: - void doOK(); - void doCancel(); -}; - -class gamepad_metadata : public Metadata -{ -public: - QString name() { return otr_tr("Gamepad input"); } - QIcon icon() { return QIcon(":/images/facetracknoir.png"); } -}; - diff --git a/tracker-qt-gamepad/test.ui b/tracker-qt-gamepad/test.ui deleted file mode 100644 index bdf2cd4e..00000000 --- a/tracker-qt-gamepad/test.ui +++ /dev/null @@ -1,59 +0,0 @@ - - - test_ui - - - Qt::NonModal - - - - 0 - 0 - 352 - 224 - - - - Gamepad input - - - - ../gui/images/facetracknoir.png../gui/images/facetracknoir.png - - - Qt::LeftToRight - - - false - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - - - - - startEngineClicked() - stopEngineClicked() - cameraSettingsClicked() - - diff --git a/tracker-qt-gamepad/test_dialog.cpp b/tracker-qt-gamepad/test_dialog.cpp deleted file mode 100644 index 5d33555b..00000000 --- a/tracker-qt-gamepad/test_dialog.cpp +++ /dev/null @@ -1,3 +0,0 @@ -#include "test.h" -#include "api/plugin-api.hpp" - -- cgit v1.2.3