summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-01-09 20:30:21 +0100
committerStanislaw Halik <sthalik@misaki.pl>2018-01-10 03:18:58 +0100
commit78a5da173e16305d39974de31cc5a90132feb473 (patch)
treef8447bed0c432be504fff9f019465814c1373f84
parent0597e5a75984f8820424bcd387ea5d8c9d277f10 (diff)
tracker/qt-gamepad: remove
Needs implementing in terms of libevdev
-rw-r--r--tracker-qt-gamepad/CMakeLists.txt3
-rw-r--r--tracker-qt-gamepad/lang/nl_NL.ts20
-rw-r--r--tracker-qt-gamepad/lang/ru_RU.ts20
-rw-r--r--tracker-qt-gamepad/test.cpp99
-rw-r--r--tracker-qt-gamepad/test.h45
-rw-r--r--tracker-qt-gamepad/test.ui59
-rw-r--r--tracker-qt-gamepad/test_dialog.cpp3
7 files changed, 0 insertions, 249 deletions
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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="nl_NL">
-<context>
- <name>gamepad_metadata</name>
- <message>
- <location filename="../test.h" line="+42"/>
- <source>Gamepad input</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>test_ui</name>
- <message>
- <location filename="../test.ui" line="+17"/>
- <source>Gamepad input</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="2.1" language="ru_RU">
-<context>
- <name>gamepad_metadata</name>
- <message>
- <location filename="../test.h" line="+42"/>
- <source>Gamepad input</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>test_ui</name>
- <message>
- <location filename="../test.ui" line="+17"/>
- <source>Gamepad input</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-</TS>
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 <sthalik@misaki.pl>
-
- * 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 <cmath>
-
-#include <QDebug>
-
-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 <cstdlib>
-#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 <cmath>
-
-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 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>test_ui</class>
- <widget class="QWidget" name="test_ui">
- <property name="windowModality">
- <enum>Qt::NonModal</enum>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>352</width>
- <height>224</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Gamepad input</string>
- </property>
- <property name="windowIcon">
- <iconset>
- <normaloff>../gui/images/facetracknoir.png</normaloff>../gui/images/facetracknoir.png</iconset>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
- <slots>
- <slot>startEngineClicked()</slot>
- <slot>stopEngineClicked()</slot>
- <slot>cameraSettingsClicked()</slot>
- </slots>
-</ui>
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"
-