summaryrefslogtreecommitdiffhomepage
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/CMakeLists.txt39
-rw-r--r--gui/correlation-calibrator.ui463
-rw-r--r--gui/export.hpp11
-rw-r--r--gui/facetracknoir.icobin67134 -> 0 bytes
-rw-r--r--gui/facetracknoir.rc2
-rw-r--r--gui/images/english.pngbin283 -> 259 bytes
-rw-r--r--gui/images/opentrack.png (renamed from gui/images/facetracknoir.png)bin20633 -> 20633 bytes
-rw-r--r--gui/images/settings16.pngbin711 -> 1136 bytes
-rw-r--r--gui/init.cpp356
-rw-r--r--gui/init.hpp15
-rw-r--r--gui/keyboard.cpp64
-rw-r--r--gui/keyboard.h82
-rw-r--r--gui/lang/de_DE.ts428
-rw-r--r--gui/lang/nl_NL.ts587
-rw-r--r--gui/lang/ru_RU.ts584
-rw-r--r--gui/lang/stub.ts515
-rw-r--r--gui/lang/zh_CN.ts428
-rw-r--r--gui/main-window.cpp849
-rw-r--r--gui/main-window.hpp149
-rw-r--r--gui/main-window.ui1373
-rw-r--r--gui/main.cpp188
-rw-r--r--gui/mapping-dialog.cpp238
-rw-r--r--gui/mapping-dialog.hpp37
-rw-r--r--gui/mapping-dialog.ui (renamed from gui/mapping-window.ui)228
-rw-r--r--gui/mapping-window.cpp155
-rw-r--r--gui/mapping-window.hpp32
-rw-r--r--gui/new_config.ui45
-rw-r--r--gui/new_file_dialog.h51
-rw-r--r--gui/opentrack-res.qrc2
-rw-r--r--gui/options-dialog.cpp302
-rw-r--r--gui/options-dialog.hpp42
-rw-r--r--gui/options-dialog.ui3313
-rw-r--r--gui/process_detector.cpp139
-rw-r--r--gui/process_detector.h38
-rw-r--r--gui/process_widget.ui32
35 files changed, 4518 insertions, 6269 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index 7d140dd6..8c57221a 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -1,36 +1,25 @@
-if(MSVC OR (NOT SDK_CONSOLE_DEBUG AND WIN32))
- set(console "")
-else()
- set(console WIN32-CONSOLE)
-endif()
-
-if(WIN32)
- SET(SDK_CONSOLE_DEBUG FALSE CACHE BOOL "Console window visible at runtime")
-endif()
+otr_module(user-interface BIN)
-otr_module(user-interface EXECUTABLE BIN ${console})
-
-set_target_properties(opentrack-user-interface PROPERTIES
- SUFFIX "${opentrack-binary-suffix}"
- OUTPUT_NAME "opentrack"
- )
-
-target_link_libraries(opentrack-user-interface
+target_link_libraries(${self}
opentrack-migration
opentrack-logic
opentrack-spline
opentrack-pose-widget
- opentrack-version
)
+# for process detector
if(APPLE)
- # for process detector
- target_link_libraries(opentrack-user-interface proc)
+ target_link_libraries(${self} proc)
+elseif(LINUX)
+ otr_pkgconfig_(has-libproc2 ${self} libproc2)
+ if(has-libproc2)
+ target_compile_definitions(${self} PRIVATE -DOTR_HAS_LIBPROC2)
+ else()
+ otr_pkgconfig(${self} libprocps)
+ endif()
endif()
-if(LINUX)
- target_link_libraries(opentrack-user-interface dl)
- # for process detector
- target_link_libraries(opentrack-user-interface procps)
+if(NOT APPLE AND NOT WIN32)
+ target_compile_definitions(${self} PRIVATE -DOTR_X11_THREADS)
+ otr_pkgconfig(${self} x11)
endif()
-
diff --git a/gui/correlation-calibrator.ui b/gui/correlation-calibrator.ui
new file mode 100644
index 00000000..02fdf1d2
--- /dev/null
+++ b/gui/correlation-calibrator.ui
@@ -0,0 +1,463 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Form</class>
+ <widget class="QWidget" name="Form">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>722</width>
+ <height>209</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string notr="true">correlation-calibrator</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Press &quot;calibrate&quot; in given row to calibrate that axis. Follow instructions in the next window.
+Press &quot;clear calibration&quot; to remove any calibration data pertaining to that axis of position change or rotation.</string>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QTableWidget" name="value_table">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="verticalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="horizontalScrollBarPolicy">
+ <enum>Qt::ScrollBarAlwaysOff</enum>
+ </property>
+ <property name="sizeAdjustPolicy">
+ <enum>QAbstractScrollArea::AdjustToContents</enum>
+ </property>
+ <property name="autoScroll">
+ <bool>true</bool>
+ </property>
+ <property name="editTriggers">
+ <set>QAbstractItemView::NoEditTriggers</set>
+ </property>
+ <property name="tabKeyNavigation">
+ <bool>false</bool>
+ </property>
+ <property name="dragDropOverwriteMode">
+ <bool>false</bool>
+ </property>
+ <property name="showGrid">
+ <bool>true</bool>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ <property name="cornerButtonEnabled">
+ <bool>false</bool>
+ </property>
+ <attribute name="horizontalHeaderVisible">
+ <bool>true</bool>
+ </attribute>
+ <attribute name="horizontalHeaderHighlightSections">
+ <bool>false</bool>
+ </attribute>
+ <attribute name="verticalHeaderVisible">
+ <bool>true</bool>
+ </attribute>
+ <attribute name="verticalHeaderHighlightSections">
+ <bool>false</bool>
+ </attribute>
+ <row>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </row>
+ <row>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </row>
+ <column>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Calibrate</string>
+ </property>
+ </column>
+ <column>
+ <property name="text">
+ <string>Clear calibration</string>
+ </property>
+ </column>
+ <item row="0" column="0">
+ <property name="text">
+ <string>1</string>
+ </property>
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="0" column="1">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="0" column="2">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="0" column="3">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="0" column="4">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="0" column="5">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="0" column="6">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>ItemIsEnabled</set>
+ </property>
+ </item>
+ <item row="0" column="7">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>ItemIsEnabled</set>
+ </property>
+ </item>
+ <item row="1" column="0">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="1" column="1">
+ <property name="text">
+ <string>1</string>
+ </property>
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="1" column="2">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="1" column="3">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="1" column="4">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="1" column="5">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="1" column="6">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>ItemIsEnabled</set>
+ </property>
+ </item>
+ <item row="1" column="7">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>ItemIsEnabled</set>
+ </property>
+ </item>
+ <item row="2" column="0">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="2" column="1">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="2" column="2">
+ <property name="text">
+ <string>1</string>
+ </property>
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="2" column="3">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="2" column="4">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="2" column="5">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="2" column="6">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>ItemIsEnabled</set>
+ </property>
+ </item>
+ <item row="2" column="7">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>ItemIsEnabled</set>
+ </property>
+ </item>
+ <item row="3" column="0">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="3" column="1">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="3" column="2">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="3" column="3">
+ <property name="text">
+ <string>1</string>
+ </property>
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="3" column="4">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="3" column="5">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="3" column="6">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>ItemIsEnabled</set>
+ </property>
+ </item>
+ <item row="3" column="7">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>ItemIsEnabled</set>
+ </property>
+ </item>
+ <item row="4" column="0">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="4" column="1">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="4" column="2">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="4" column="3">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="4" column="4">
+ <property name="text">
+ <string>1</string>
+ </property>
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="4" column="5">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="4" column="6">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>ItemIsEnabled</set>
+ </property>
+ </item>
+ <item row="4" column="7">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>ItemIsEnabled</set>
+ </property>
+ </item>
+ <item row="5" column="0">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="5" column="1">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="5" column="2">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="5" column="3">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="5" column="4">
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="5" column="5">
+ <property name="text">
+ <string>1</string>
+ </property>
+ <property name="flags">
+ <set>NoItemFlags</set>
+ </property>
+ </item>
+ <item row="5" column="6">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>ItemIsEnabled</set>
+ </property>
+ </item>
+ <item row="5" column="7">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="flags">
+ <set>ItemIsEnabled</set>
+ </property>
+ </item>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/gui/export.hpp b/gui/export.hpp
new file mode 100644
index 00000000..3ef3e5b8
--- /dev/null
+++ b/gui/export.hpp
@@ -0,0 +1,11 @@
+// generates export.hpp for each module from compat/linkage.hpp
+
+#pragma once
+
+#include "compat/linkage-macros.hpp"
+
+#ifdef BUILD_USER_INTERFACE
+# define OTR_GUI_EXPORT OTR_GENERIC_EXPORT
+#else
+# define OTR_GUI_EXPORT OTR_GENERIC_IMPORT
+#endif
diff --git a/gui/facetracknoir.ico b/gui/facetracknoir.ico
deleted file mode 100644
index 5cac8da1..00000000
--- a/gui/facetracknoir.ico
+++ /dev/null
Binary files differ
diff --git a/gui/facetracknoir.rc b/gui/facetracknoir.rc
deleted file mode 100644
index 020ffe97..00000000
--- a/gui/facetracknoir.rc
+++ /dev/null
@@ -1,2 +0,0 @@
-#include <windows.h>
-IDI_ICON1 ICON "facetracknoir.ico"
diff --git a/gui/images/english.png b/gui/images/english.png
index 187aabf9..87d9f7d7 100644
--- a/gui/images/english.png
+++ b/gui/images/english.png
Binary files differ
diff --git a/gui/images/facetracknoir.png b/gui/images/opentrack.png
index 39359782..39359782 100644
--- a/gui/images/facetracknoir.png
+++ b/gui/images/opentrack.png
Binary files differ
diff --git a/gui/images/settings16.png b/gui/images/settings16.png
index 3b31623b..fa2e4a11 100644
--- a/gui/images/settings16.png
+++ b/gui/images/settings16.png
Binary files differ
diff --git a/gui/init.cpp b/gui/init.cpp
new file mode 100644
index 00000000..b666b4a9
--- /dev/null
+++ b/gui/init.cpp
@@ -0,0 +1,356 @@
+/* Copyright (c) 2013-2017 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 "init.hpp"
+#include "migration/migration.hpp"
+#include "options/options.hpp"
+using namespace options;
+#include "compat/library-path.hpp"
+#include "compat/arch.hpp"
+
+#include <memory>
+#include <cstdlib>
+#include <cstring>
+#include <cstdio>
+
+#include <QApplication>
+#include <QStyleFactory>
+#include <QLocale>
+#include <QTranslator>
+#include <QDir>
+#include <QFile>
+#include <QFileDialog>
+#include <QString>
+#include <QOperatingSystemVersion>
+#include <QMutex>
+
+#include <QDebug>
+
+#include <cfloat>
+#include <cfenv>
+
+#ifdef __MINGW32__
+extern "C" __declspec(dllimport) unsigned __cdecl _controlfp(unsigned, unsigned);
+#endif
+
+static void set_fp_mask()
+{
+#if defined OTR_ARCH_DENORM_DAZ
+ _MM_SET_DENORMALS_ZERO_MODE(_MM_DENORMALS_ZERO_ON);
+#elif defined OTR_ARCH_DENORM_FTZ
+ _MM_SET_FLUSH_ZERO_MODE(_MM_FLUSH_ZERO_ON);
+#endif
+
+#ifdef OTR_ARCH_FPU_MASK
+ _MM_SET_EXCEPTION_MASK(_MM_MASK_MASK);
+#endif
+
+#ifdef __APPLE__
+#if defined __i386__ || defined __x86_64__
+ fesetenv(FE_DFL_DISABLE_SSE_DENORMS_ENV);
+#endif
+#endif
+
+#ifdef _WIN32
+# ifdef __clang__
+# pragma clang diagnostic push
+# pragma clang diagnostic ignored "-Wreserved-id-macro"
+# endif
+# ifndef _DN_FLUSH
+# define _DN_FLUSH 0x01000000
+# endif
+# ifndef _MCW_DN
+# define _MCW_DN 0x03000000
+# endif
+# ifdef __clang__
+# pragma clang diagnostic pop
+# endif
+ _controlfp(_DN_FLUSH, _MCW_DN);
+#endif
+}
+
+#ifdef OTR_X11_THREADS
+#include <X11/Xlib.h>
+static void enable_x11_threads()
+{
+ (void)XInitThreads();
+}
+#endif
+
+static void set_qt_style()
+{
+#if defined _WIN32 || defined __APPLE__
+ // our layouts on OSX make some control wrongly sized -sh 20160908
+ {
+ const char* const preferred[] {
+#ifdef __APPLE__
+ "macintosh", "fusion", "windowsvista", "windows",
+#else
+ "fusion", "windowsvista", "windows", "windowsxp",
+#endif
+ };
+ for (const char* style_name : preferred)
+ if (QStyle* s = QStyleFactory::create(style_name); s != nullptr)
+ {
+ QApplication::setStyle(s);
+ break;
+ }
+ }
+#endif
+}
+
+#include <string>
+
+#ifdef _WIN32
+# include <windows.h>
+# include <malloc.h>
+#else
+# include <alloca.h>
+#endif
+
+static void qdebug_to_console(QtMsgType loglevel, const QMessageLogContext& ctx, const QString &msg)
+{
+ const char* level;
+
+ switch (loglevel)
+ {
+ default:
+ case QtDebugMsg: level = "DEBUG"; break;
+ case QtWarningMsg: level = "WARN"; break;
+ case QtCriticalMsg: level = "CRIT"; break;
+ case QtFatalMsg: level = "FATAL"; break;
+ case QtInfoMsg: level = "INFO"; break;
+ }
+
+#ifdef _WIN32
+ static_assert(sizeof(wchar_t) == sizeof(decltype(*msg.utf16())));
+
+ if (IsDebuggerPresent())
+ {
+ static QMutex lock;
+ QMutexLocker l(&lock);
+
+ const wchar_t* const bytes = (const wchar_t*)msg.utf16();
+
+ OutputDebugStringW(bytes);
+ OutputDebugStringW(L"\n");
+ }
+ else
+#endif
+ {
+#if defined _WIN32
+ const wchar_t* const bytes = (const wchar_t*)msg.utf16();
+#else
+ unsigned len = (unsigned)msg.size()+1;
+ wchar_t* const bytes = (wchar_t*)alloca(len * sizeof(wchar_t));
+ bytes[len-1] = 0;
+ (void)msg.toWCharArray(bytes);
+#endif
+ if (ctx.file)
+ std::fprintf(stderr, "%s [%s:%d]: %ls\n", level, ctx.file, ctx.line, bytes);
+ else
+ std::fprintf(stderr, "%s %ls\n", level, bytes);
+ std::fflush(stderr);
+ }
+}
+
+#ifdef _WIN32
+
+static void apply_dark_windows_theme_if_needed()
+{
+ // On Windows apply dark theme if requested by user settings
+ QSettings settings("HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", QSettings::NativeFormat);
+ if (settings.value("AppsUseLightTheme") == 0) {
+ qApp->setStyle(QStyleFactory::create("Dark"));
+ QPalette darkPalette;
+ QColor darkColor = QColor(45, 45, 45);
+ QColor disabledColor = QColor(127, 127, 127);
+ darkPalette.setColor(QPalette::Window, darkColor);
+ darkPalette.setColor(QPalette::WindowText, Qt::white);
+ darkPalette.setColor(QPalette::Base, QColor(18, 18, 18));
+ darkPalette.setColor(QPalette::AlternateBase, darkColor);
+ darkPalette.setColor(QPalette::ToolTipBase, Qt::white);
+ darkPalette.setColor(QPalette::ToolTipText, Qt::white);
+ darkPalette.setColor(QPalette::Text, Qt::white);
+ darkPalette.setColor(QPalette::Disabled, QPalette::Text, disabledColor);
+ darkPalette.setColor(QPalette::Button, darkColor);
+ darkPalette.setColor(QPalette::ButtonText, Qt::white);
+ darkPalette.setColor(QPalette::Disabled, QPalette::ButtonText, disabledColor);
+ darkPalette.setColor(QPalette::BrightText, Qt::red);
+ darkPalette.setColor(QPalette::Link, QColor(42, 130, 218));
+
+ darkPalette.setColor(QPalette::Highlight, QColor(42, 130, 218));
+ darkPalette.setColor(QPalette::HighlightedText, Qt::black);
+ darkPalette.setColor(QPalette::Disabled, QPalette::HighlightedText, disabledColor);
+
+ qApp->setPalette(darkPalette);
+
+ qApp->setStyleSheet("QToolTip { color: #ffffff; background-color: #2a82da; border: 1px solid white; }");
+ }
+}
+
+static void add_win32_path()
+{
+ // see https://web.archive.org/web/20180924055536/https://software.intel.com/en-us/articles/limitation-to-the-length-of-the-system-path-variable
+ {
+ QString lib_path = OPENTRACK_BASE_PATH;
+ lib_path.replace("/", "\\");
+ QString mod_path = OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH;
+ mod_path.replace("/", "\\");
+
+ const QString orig_path = qgetenv("PATH");
+
+ QString env_path; env_path.reserve(4096);
+
+#if 0
+ qDebug() << "orig" << orig_path;
+ qDebug() << "libpath" << lib_path;
+ qDebug() << "modpath" << mod_path;
+#endif
+
+ if (lib_path.isEmpty())
+ qDebug() << "env: empty lib_path!";
+ else
+ {
+ if (!QFile(lib_path).exists())
+ qDebug() << "env: lib_path doesn't exist, this shouldn't happen!";
+ env_path += lib_path;
+ env_path += ';';
+ }
+ if (mod_path.isEmpty())
+ qDebug() << "env: can't add mod_path to env PATH";
+ else
+ {
+ if (!QFile(mod_path).exists())
+ qDebug() << "env: mod_path doesn't exist, did you install it correctly?";
+ env_path += mod_path;
+ env_path += ';';
+ }
+
+ if (orig_path.isEmpty())
+ qDebug() << "env: empty PATH";
+ else
+ env_path += orig_path;
+
+#if 0
+ qDebug() << "data" << env_path.constData();
+#endif
+
+ // better length limit than putenv() and SetEnvironmentVariableA
+ bool ret = SetEnvironmentVariableW(L"PATH", (const wchar_t*)env_path.constData());
+
+ if (!ret)
+ qDebug() << "_putenv() failed with" << (void*)GetLastError();
+ }
+}
+
+static void attach_parent_console()
+{
+ if (GetConsoleWindow() != nullptr)
+ return;
+
+ fflush(stdin);
+ fflush(stderr);
+
+ if (AttachConsole(ATTACH_PARENT_PROCESS))
+ {
+ _wfreopen(L"CON", L"w", stdout);
+ _wfreopen(L"CON", L"w", stderr);
+ _wfreopen(L"CON", L"r", stdin);
+ freopen("CON", "w", stdout);
+ freopen("CON", "w", stderr);
+ freopen("CON", "r", stdin);
+
+ // skip prompt in cmd.exe window
+ fprintf(stderr, "\n");
+ fflush(stderr);
+ }
+}
+
+#endif
+
+static int run_window(std::unique_ptr<QWidget> main_window)
+{
+ if (!main_window->isEnabled())
+ {
+ qDebug() << "opentrack: exit before window created";
+ return 2;
+ }
+
+ QApplication::setQuitOnLastWindowClosed(true);
+ int status = QApplication::exec();
+
+ return status;
+}
+
+int otr_main(int argc, char** argv, std::function<std::unique_ptr<QWidget>()> const& make_main_window)
+{
+#ifdef _WIN32
+ (void)setvbuf(stderr, nullptr, _IONBF, 0);
+#else
+ (void)setvbuf(stderr, nullptr, _IOLBF, 256);
+#endif
+
+ set_fp_mask();
+
+#ifdef OTR_X11_THREADS
+ enable_x11_threads();
+#endif
+
+ QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
+
+ QApplication app(argc, argv);
+
+#ifdef _WIN32
+ attach_parent_console();
+#endif
+ (void)qInstallMessageHandler(qdebug_to_console);
+#ifdef _WIN32
+ apply_dark_windows_theme_if_needed();
+ add_win32_path();
+#endif
+
+ QDir::setCurrent(OPENTRACK_BASE_PATH);
+
+ set_qt_style();
+ QTranslator t;
+
+ {
+ const char* forced_locale = getenv("OTR_FORCE_LANG");
+
+ if (forced_locale)
+ {
+ QLocale::setDefault(QLocale(forced_locale)); // force i18n for testing
+ qDebug() << "locale:" << forced_locale;
+ }
+
+ using namespace options::globals;
+
+ const bool no_i18n = with_global_settings_object([](QSettings& s) {
+ return s.value("disable-translation", false).toBool();
+ });
+
+ if (forced_locale || !no_i18n)
+ {
+ (void) t.load(QLocale(), "", "", OPENTRACK_BASE_PATH + "/" OPENTRACK_I18N_PATH, ".qm");
+ (void) QCoreApplication::installTranslator(&t);
+ }
+ }
+
+ int ret = run_window(make_main_window());
+
+#if 0
+ // msvc crashes in Qt plugin system's dtor
+ // Note: QLibrary::PreventUnloadHint seems to workaround it
+#if defined _MSC_VER
+ TerminateProcess(GetCurrentProcess(), 0);
+#endif
+#endif
+
+ return ret;
+}
diff --git a/gui/init.hpp b/gui/init.hpp
new file mode 100644
index 00000000..28ff55c7
--- /dev/null
+++ b/gui/init.hpp
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "export.hpp"
+
+#include <functional>
+#include <memory>
+#include <QWidget>
+
+OTR_GUI_EXPORT int otr_main(int argc, char** argv, std::function<std::unique_ptr<QWidget>()> const& make_main_window);
+
+template<typename F>
+auto run_application(int argc, char** argv, F&& fun)
+{
+ return otr_main(argc, argv, fun);
+}
diff --git a/gui/keyboard.cpp b/gui/keyboard.cpp
new file mode 100644
index 00000000..90849bab
--- /dev/null
+++ b/gui/keyboard.cpp
@@ -0,0 +1,64 @@
+#undef NDEBUG
+#include <cassert>
+
+#include "keyboard.h"
+
+#include <QDebug>
+
+#ifdef _WIN32
+
+void keyboard_listener::receive_key(const Key& k)
+{
+ if(!k.guid.isEmpty())
+ {
+ int mods = 0;
+ if (k.alt) mods |= Qt::AltModifier;
+ if (k.shift) mods |= Qt::ShiftModifier;
+ if (k.ctrl) mods |= Qt::ControlModifier;
+
+ emit joystick_button_pressed(k.guid, k.keycode | mods, k.held);
+ }
+ else
+ {
+ Qt::KeyboardModifiers m;
+ QKeySequence k_;
+
+ if (win_key::to_qt(k, k_, m))
+ for (unsigned i = 0; i < (unsigned)k_.count(); i++)
+ emit key_pressed(QKeySequence(int(m) | k_[i]));
+ }
+}
+
+#endif
+
+keyboard_listener::keyboard_listener(QWidget* parent) : QDialog(parent)
+{
+ ui.setupUi(this);
+ setFocusPolicy(Qt::StrongFocus);
+#ifdef _WIN32
+ (void)token;
+#endif
+}
+
+#if !defined _WIN32
+void keyboard_listener::keyPressEvent(QKeyEvent* event)
+{
+ switch (event->key())
+ {
+ case Qt::Key_Control:
+ case Qt::Key_Shift:
+ case Qt::Key_Meta:
+ case Qt::Key_Alt:
+ case Qt::Key_AltGr:
+ case Qt::Key_NumLock:
+ break;
+ case Qt::Key_Escape:
+ close();
+ break;
+
+ default:
+ emit key_pressed(QKeySequence(event->key() | event->modifiers()));
+ break;
+ }
+}
+#endif
diff --git a/gui/keyboard.h b/gui/keyboard.h
index 690bd651..ea35d372 100644
--- a/gui/keyboard.h
+++ b/gui/keyboard.h
@@ -1,68 +1,40 @@
#pragma once
-#include "ui_keyboard_listener.h"
+
+/* Copyright (c) 2015, 2017 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 "export.hpp"
+
#ifdef _WIN32
-#include "logic/win32-shortcuts.h"
-#include "dinput/keybinding-worker.hpp"
+# include "logic/win32-shortcuts.h"
+# include "dinput/keybinding-worker.hpp"
#endif
+
+#include "ui_keyboard_listener.h"
+
#include <QDialog>
-#include <QKeyEvent>
-#include <QDebug>
+#include <QtEvents>
-class KeyboardListener : public QDialog
+class OTR_GUI_EXPORT keyboard_listener : public QDialog
{
Q_OBJECT
- Ui_keyboard_listener ui;
-#ifdef _WIN32
- KeybindingWorker::Token token;
-#endif
-public:
- KeyboardListener(QWidget* parent = nullptr) : QDialog(parent)
+
#ifdef _WIN32
- , token([&](const Key& k) {
- if(k.guid != "")
- {
- int mods = 0;
- if (k.alt) mods |= Qt::AltModifier;
- if (k.shift) mods |= Qt::ShiftModifier;
- if (k.ctrl) mods |= Qt::ControlModifier;
- joystick_button_pressed(k.guid, k.keycode | mods, k.held);
- }
- else
- {
- Qt::KeyboardModifiers m;
- QKeySequence k_;
- if (win_key::to_qt(k, k_, m))
- key_pressed(static_cast<QVariant>(k_).toInt() | m);
- }
- })
-#endif
- {
- ui.setupUi(this);
- setFocusPolicy(Qt::StrongFocus);
- }
-#ifndef _WIN32
- void keyPressEvent(QKeyEvent* event) override
- {
- switch (event->key())
- {
- case Qt::Key_Control:
- case Qt::Key_Shift:
- case Qt::Key_Meta:
- case Qt::Key_Alt:
- case Qt::Key_AltGr:
- case Qt::Key_CapsLock:
- case Qt::Key_NumLock:
- break;
- case Qt::Key_Escape:
- close();
- break;
+ void receive_key(const Key& k);
- default:
- emit key_pressed(QKeySequence(event->key() | event->modifiers()));
- break;
- }
- }
+ KeybindingWorker::Token token{[this](const Key& k) {receive_key(k);}};
+#else
+ void keyPressEvent(QKeyEvent* event) override;
#endif
+
+ Ui_keyboard_listener ui;
+
+public:
+ keyboard_listener(QWidget* parent = nullptr);
signals:
void key_pressed(QKeySequence k);
void joystick_button_pressed(QString guid, int idx, bool held);
diff --git a/gui/lang/de_DE.ts b/gui/lang/de_DE.ts
new file mode 100644
index 00000000..8d2dbcae
--- /dev/null
+++ b/gui/lang/de_DE.ts
@@ -0,0 +1,428 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="de_DE">
+<context>
+ <name>BrowseButton</name>
+ <message>
+ <source>Set executable name</source>
+ <translation>Namen der ausführbaren Datei setzen</translation>
+ </message>
+ <message>
+ <source>Executable (*.exe);;All Files (*)</source>
+ <translation>Ausführbare Dateien (*.exe);;Alle Dateien (*)</translation>
+ </message>
+</context>
+<context>
+ <name>Form</name>
+ <message>
+ <source>Press &quot;calibrate&quot; in given row to calibrate that axis. Follow instructions in the next window.
+Press &quot;clear calibration&quot; to remove any calibration data pertaining to that axis of position change or rotation.</source>
+ <translation>Klicke „Kalibrieren“ in den angegebenen Zeilen, um die jeweilige Achse zu kalibieren. Folge den Anweisungen im nächsten Fenster.
+Klicke „Kalibrierung löschen“, um jegliche Kalibrierungsdaten der zugehörigen Positions- oder Rotationsachse zu löschen.</translation>
+ </message>
+ <message>
+ <source>X</source>
+ <translation>X</translation>
+ </message>
+ <message>
+ <source>Y</source>
+ <translation>Y</translation>
+ </message>
+ <message>
+ <source>Z</source>
+ <translation>Z</translation>
+ </message>
+ <message>
+ <source>Yaw</source>
+ <translation>Gieren</translation>
+ </message>
+ <message>
+ <source>Pitch</source>
+ <translation>Nicken</translation>
+ </message>
+ <message>
+ <source>Roll</source>
+ <translation>Rollen</translation>
+ </message>
+ <message>
+ <source>Calibrate</source>
+ <translation>Kalibrieren</translation>
+ </message>
+ <message>
+ <source>Clear calibration</source>
+ <translation>Kalibrierung löschen</translation>
+ </message>
+ <message>
+ <source>1</source>
+ <translation>1</translation>
+ </message>
+</context>
+<context>
+ <name>keyboard_listener</name>
+ <message>
+ <source>Dialog</source>
+ <translation>Dialog</translation>
+ </message>
+ <message>
+ <source>Press a key or close this window to remove the keybinding.</source>
+ <translation>Drücke eine Taste oder schließe das Fenster, um die Kurztaste zu löschen.</translation>
+ </message>
+</context>
+<context>
+ <name>mapping_dialog</name>
+ <message>
+ <source>Mapping properties</source>
+ <translation>Abbildungsparameter</translation>
+ </message>
+ <message>
+ <source>Yaw</source>
+ <translation>Gieren</translation>
+ </message>
+ <message>
+ <source>Max input</source>
+ <translation>Maximale Eingabe</translation>
+ </message>
+ <message>
+ <source>Asymmetric mapping below</source>
+ <translation>Assymmetrische Abbildung unterhalb</translation>
+ </message>
+ <message>
+ <source>Pitch</source>
+ <translation>Nicken</translation>
+ </message>
+ <message>
+ <source>Max output</source>
+ <translation>Maximale Ausgabe</translation>
+ </message>
+ <message>
+ <source>180°</source>
+ <translation>180°</translation>
+ </message>
+ <message>
+ <source>90°</source>
+ <translation>90°</translation>
+ </message>
+ <message>
+ <source>Roll</source>
+ <translation>Rollen</translation>
+ </message>
+ <message>
+ <source>X</source>
+ <translation>X</translation>
+ </message>
+ <message>
+ <source>Y</source>
+ <translation>Y</translation>
+ </message>
+ <message>
+ <source>Z</source>
+ <translation>Z</translation>
+ </message>
+ <message>
+ <source>%1°</source>
+ <translation>%1°</translation>
+ </message>
+ <message>
+ <source>%1 cm</source>
+ <translation>%1 cm</translation>
+ </message>
+</context>
+<context>
+ <name>options_dialog</name>
+ <message>
+ <source>Options</source>
+ <translation>Optionen</translation>
+ </message>
+ <message>
+ <source>Shortcuts</source>
+ <translation>Kurztasten</translation>
+ </message>
+ <message>
+ <source>Global shortcuts</source>
+ <translation>Globale Kurztasten</translation>
+ </message>
+ <message>
+ <source>Use current tracker pose as looking perfectly forward.</source>
+ <translation>Benutze aktuelle Tracker-Pose als perfekt nach vorn gerichtet.</translation>
+ </message>
+ <message>
+ <source>Center</source>
+ <translation>Zentrieren</translation>
+ </message>
+ <message>
+ <source>Bind</source>
+ <translation>Belegen</translation>
+ </message>
+ <message>
+ <source>Start tracking</source>
+ <translation>Tracking starten</translation>
+ </message>
+ <message>
+ <source>Stop tracking</source>
+ <translation>Tracking stoppen</translation>
+ </message>
+ <message>
+ <source>Keep looking forward until next zero keypress.</source>
+ <translation>Weiter vorwärts schauen bis zum nächsten Drücken der Nullen-Taste.</translation>
+ </message>
+ <message>
+ <source>Zero</source>
+ <translation>Nullen</translation>
+ </message>
+ <message>
+ <source>Freeze the position returned by the tracker while this mode is active.</source>
+ <translation>Position des Trackers einfrieren, solange dieser Modus aktiv ist.</translation>
+ </message>
+ <message>
+ <source>Toggle</source>
+ <translation>Umschalten</translation>
+ </message>
+ <message>
+ <source>Zero while held</source>
+ <translation>Nullen während gedrückt</translation>
+ </message>
+ <message>
+ <source>Restart tracking</source>
+ <translation>Tracking neu starten</translation>
+ </message>
+ <message>
+ <source>Toggle while held</source>
+ <translation>Umschalten während gedrückt</translation>
+ </message>
+ <message>
+ <source>Toggle tracking</source>
+ <translation>Tracking umschalten</translation>
+ </message>
+ <message>
+ <source>Disable user interface localization</source>
+ <translation>Übersetzungen der Benutzeroberfläche abschalten</translation>
+ </message>
+ <message>
+ <source>Centering method</source>
+ <translation>Zentriermethode</translation>
+ </message>
+ <message>
+ <source>Center at startup</source>
+ <translation>Zentrieren beim Start</translation>
+ </message>
+ <message>
+ <source>Disabled</source>
+ <translation>Abgeschaltet</translation>
+ </message>
+ <message>
+ <source>Point</source>
+ <translation>Punkt</translation>
+ </message>
+ <message>
+ <source>Wireless VR 360</source>
+ <translation>Wireless VR 360</translation>
+ </message>
+ <message>
+ <source>Roll compensated</source>
+ <translation>rollkompensiert</translation>
+ </message>
+ <message>
+ <source>Minimize to tray</source>
+ <translation>In den Systemabschnitt minimieren</translation>
+ </message>
+ <message>
+ <source>Enable tray</source>
+ <translation>Benachrichtigungssymbol aktivieren</translation>
+ </message>
+ <message>
+ <source>Minimize to tray on startup when enabled</source>
+ <translation>Wenn aktiviert, beim Start in den Systemabschnitt minimieren</translation>
+ </message>
+ <message>
+ <source>Output</source>
+ <translation>Ausgabe</translation>
+ </message>
+ <message>
+ <source>Axis assignment</source>
+ <translation>Achsen-Zuweisung</translation>
+ </message>
+ <message>
+ <source>Pitch</source>
+ <translation>Nicken</translation>
+ </message>
+ <message>
+ <source>X</source>
+ <translation>X</translation>
+ </message>
+ <message>
+ <source>Y</source>
+ <translation>Y</translation>
+ </message>
+ <message>
+ <source>Z</source>
+ <translation>Z</translation>
+ </message>
+ <message>
+ <source>Yaw</source>
+ <translation>Gieren</translation>
+ </message>
+ <message>
+ <source>Roll</source>
+ <translation>Rollen</translation>
+ </message>
+ <message>
+ <source>Relative translation only</source>
+ <translation>Nur relative Übersetzung</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>Quelle</translation>
+ </message>
+ <message>
+ <source>Pre-invert</source>
+ <translation>Vor-Invertieren</translation>
+ </message>
+ <message>
+ <source>Destination</source>
+ <translation>Ziel</translation>
+ </message>
+ <message>
+ <source>Post-invert</source>
+ <translation>Nach-Invertieren</translation>
+ </message>
+ <message>
+ <source>Custom center pose</source>
+ <translation>Benutzerdefinierte Mittelpunkt-Pose</translation>
+ </message>
+ <message>
+ <source>Alter the centered position sent to games. Useful if the default position is too much downward or upward.</source>
+ <translation>Verändere die zentrierte Position, die an Spiele gesendet wird. Nützlich, falls die Standard-Position zu weit unten oder oben ist.</translation>
+ </message>
+ <message>
+ <source>°</source>
+ <translation>°</translation>
+ </message>
+ <message>
+ <source> cm</source>
+ <translation> cm</translation>
+ </message>
+ <message>
+ <source>CSV Data Logging</source>
+ <translation>CSV-Datenausgabe</translation>
+ </message>
+ <message>
+ <source>Enable - You will be asked for a filename whenever tracking starts</source>
+ <translation>Einschalten - Der Dateiname wird jedesmal abgefragt, wenn das Tracking startet</translation>
+ </message>
+ <message>
+ <source>Relative translation</source>
+ <translation>Relative Übersetzung</translation>
+ </message>
+ <message>
+ <source>With relative mode on, translation is applied after rotation. For example, rotating +180 degrees yaw and moving backwards results in moving forward as a result of that rotation.</source>
+ <translation>Wenn die relative Modus aktiv ist, wird die Übersetzung nach der Rotation angewendet. Zum Beispiel wird dadurch beim Gieren um 180° mit Rückwärtsbewegung in eine Vorwärtsbewegung umgewandelt.</translation>
+ </message>
+ <message>
+ <source>Mode</source>
+ <translation>Modus</translation>
+ </message>
+ <message>
+ <source>Enabled</source>
+ <translation>Eingeschaltet</translation>
+ </message>
+ <message>
+ <source>Enabled when not aiming</source>
+ <translation>Eingeschaltet, während nicht gezielt wird</translation>
+ </message>
+ <message>
+ <source>Disable for Y</source>
+ <translation>Für Y abschalten</translation>
+ </message>
+ <message>
+ <source>Disable for X</source>
+ <translation>Für X abschalten</translation>
+ </message>
+ <message>
+ <source>Disable effect by roll</source>
+ <translation>Effekt durch Rollen abschalten</translation>
+ </message>
+ <message>
+ <source>Disable for Z (for zoom on Z axis)</source>
+ <translation>Für Z abschalten (für Zoom auf der Z-Achse)</translation>
+ </message>
+ <message>
+ <source>Disable effect by pitch</source>
+ <translation>Effekt durch Nicken abschalten</translation>
+ </message>
+ <message>
+ <source>Disable effect by yaw</source>
+ <translation>Effekt durch Gieren abschalten</translation>
+ </message>
+ <message>
+ <source>Neck displacement</source>
+ <translation>Nacken-Versatz</translation>
+ </message>
+ <message>
+ <source>Eyes will be offset from the pivot of rotation, assumed to be the neck. It also works with relative translation disabled.</source>
+ <translation>Die Augen werden gegenüber des Drehpunktes versetzt sein, unter Annahme, sie seien der Nacken. Dies funktioniert auch dann, wenn die relative Übersetzung abgeschaltet ist.</translation>
+ </message>
+ <message>
+ <source>Enable</source>
+ <translation>Einschalten</translation>
+ </message>
+ <message>
+ <source>Forward from center of rotation</source>
+ <translation>Vom Drehpunkt nach vorn verschieben</translation>
+ </message>
+ <message>
+ <source>Game detection</source>
+ <translation>Spiel-Erkennung</translation>
+ </message>
+ <message>
+ <source>Start tracking automatically when a game starts with selected profile, and stop when the game exits.</source>
+ <translation>Tracking beim Spielstart automatisch mit dem ausgewählten Profil starten, und stoppen, wenn das Spiel beendet wird.</translation>
+ </message>
+ <message>
+ <source>Mouse %1</source>
+ <translation>Maus %1</translation>
+ </message>
+ <message>
+ <source>Joy button %1</source>
+ <translation>Joystick-Knopf %1</translation>
+ </message>
+ <message>
+ <source>None</source>
+ <translation>Nichts</translation>
+ </message>
+ <message>
+ <source>Tracker</source>
+ <translation>Tracker</translation>
+ </message>
+ <message>
+ <source>Filter</source>
+ <translation>Filter</translation>
+ </message>
+</context>
+<context>
+ <name>process_detector</name>
+ <message>
+ <source>Game detector</source>
+ <translation>Spiel-Erkennung</translation>
+ </message>
+ <message>
+ <source>Start profiles from game executable names in this list</source>
+ <translation>Profile anhand der ausführbaren Dateien dieser Liste starten</translation>
+ </message>
+ <message>
+ <source>Executable</source>
+ <translation>Ausführbare Datei</translation>
+ </message>
+ <message>
+ <source>Profile</source>
+ <translation>Profil</translation>
+ </message>
+ <message>
+ <source>+</source>
+ <translation>Hinzufügen</translation>
+ </message>
+ <message>
+ <source>-</source>
+ <translation>Entfernen</translation>
+ </message>
+</context>
+</TS>
diff --git a/gui/lang/nl_NL.ts b/gui/lang/nl_NL.ts
index 4d47476c..1b9d8fe9 100644
--- a/gui/lang/nl_NL.ts
+++ b/gui/lang/nl_NL.ts
@@ -4,755 +4,422 @@
<context>
<name>BrowseButton</name>
<message>
- <location filename="../process_detector.cpp" line="+66"/>
<source>Set executable name</source>
<translation>Toepassingsnaam instellen</translation>
</message>
<message>
- <location line="+2"/>
<source>Executable (*.exe);;All Files (*)</source>
<translation>Toepassing (*.exe);; Alle bestanden (*)</translation>
</message>
</context>
<context>
- <name>MainWindow</name>
+ <name>Form</name>
<message>
- <location filename="../main-window.cpp" line="+97"/>
- <source>Create new empty config</source>
- <translation>Nieuwe lege configuratie aanmaken</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Create new copied config</source>
- <translation>Bestaande configuratie kopiëren</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Open configuration directory</source>
- <translation>Locatie van configuratiebestanden openen</translation>
- </message>
- <message>
- <location line="+78"/>
- <location line="+376"/>
- <source>opentrack</source>
- <translation></translation>
- </message>
- <message>
- <location line="-373"/>
- <source> (debug)</source>
- <translation> (debuggen)</translation>
- </message>
- <message>
- <location line="+8"/>
- <location line="+553"/>
- <source>Show the Octopus</source>
- <translation>Inktvis weergeven</translation>
- </message>
- <message>
- <location line="-553"/>
- <location line="+553"/>
- <source>Hide the Octopus</source>
- <translation>Inktvis verbergen</translation>
- </message>
- <message>
- <location line="-546"/>
- <source>Tracker settings</source>
- <translation>Tracker-instellingen</translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Filter settings</source>
- <translation>Filter-instellingen</translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Protocol settings</source>
- <translation>Protocol-instellingen</translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Mappings</source>
- <translation>Verwijzingen</translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Options</source>
- <translation>Opties</translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Exit</source>
- <translation>Afsluiten</translation>
+ <source>Press &quot;calibrate&quot; in given row to calibrate that axis. Follow instructions in the next window.
+Press &quot;clear calibration&quot; to remove any calibration data pertaining to that axis of position change or rotation.</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="+38"/>
- <source>The Octopus is sad</source>
- <translation>De inktvis is verdrietig</translation>
+ <source>X</source>
+ <translation type="unfinished">X</translation>
</message>
<message>
- <location line="+1"/>
- <source>Check permissions for your .ini directory:
-
-&quot;%1&quot;%2
-
-Exiting now.</source>
- <translation>Controleer de schrijfrechten voor de configuratie-locatie:
-
-&quot;%1&quot;%2
-
-Programma wordt afgesloten.</translation>
+ <source>Y</source>
+ <translation type="unfinished">Y</translation>
</message>
<message>
- <location line="+190"/>
- <source>Library load error</source>
- <translation>Fout met het laden van de library</translation>
+ <source>Z</source>
+ <translation type="unfinished">Z</translation>
</message>
<message>
- <location line="+1"/>
- <source>One of libraries failed to load. Check installation.</source>
- <translation>Een van de libraries kon niet worden geladen. Controleer de installatie.</translation>
+ <source>Yaw</source>
+ <translation type="unfinished">Yaw</translation>
</message>
<message>
- <location line="+96"/>
- <location line="+4"/>
- <source> :: </source>
- <translation> :: </translation>
+ <source>Pitch</source>
+ <translation type="unfinished">Pitch</translation>
</message>
-</context>
-<context>
- <name>OptionsDialog</name>
<message>
- <location filename="../options-dialog.cpp" line="+27"/>
- <source>Joy button %1</source>
- <translation>Joystick-knop %1</translation>
+ <source>Roll</source>
+ <translation type="unfinished">Rollen</translation>
</message>
<message>
- <location line="+3"/>
- <location line="+164"/>
- <source>None</source>
- <translation>Geen</translation>
+ <source>Calibrate</source>
+ <translation type="unfinished"></translation>
</message>
-</context>
-<context>
- <name>UI_new_config</name>
<message>
- <location filename="../new_config.ui" line="+17"/>
- <source>Config filename</source>
- <translation>Bestandsnaam van de configuratie</translation>
+ <source>Clear calibration</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="+10"/>
- <source>New file name:</source>
- <translation>Nieuwe bestandsnaam</translation>
+ <source>1</source>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
<name>keyboard_listener</name>
<message>
- <location filename="../keyboard_listener.ui" line="+14"/>
<source>Dialog</source>
<translation>Dialoogvenster</translation>
</message>
<message>
- <location line="+6"/>
<source>Press a key or close this window to remove the keybinding.</source>
<translation>Druk op een toets of sluit dit venster om de toewijzing ongedaan te maken.</translation>
</message>
</context>
<context>
- <name>main_window</name>
- <message>
- <location filename="../main-window.ui" line="+278"/>
- <source>Raw tracker data</source>
- <translation>Ongefilterde tracker-data</translation>
- </message>
- <message>
- <location line="+67"/>
- <location line="+479"/>
- <source>Z</source>
- <translation>Z</translation>
- </message>
- <message>
- <location line="-463"/>
- <location line="+409"/>
- <source>Pitch</source>
- <translation>Pitch</translation>
- </message>
+ <name>mapping_dialog</name>
<message>
- <location line="-356"/>
- <location line="+315"/>
- <source>Y</source>
- <translation>Y</translation>
- </message>
- <message>
- <location line="-299"/>
- <location line="+277"/>
- <source>X</source>
- <translation>X</translation>
- </message>
- <message>
- <location line="-230"/>
- <location line="+309"/>
- <source>Roll</source>
- <translation>Rollen</translation>
+ <source>Mapping properties</source>
+ <translation type="unfinished">Verwijzings-instellingen</translation>
</message>
<message>
- <location line="-293"/>
- <location line="+309"/>
<source>Yaw</source>
- <translation>Yaw</translation>
- </message>
- <message>
- <location line="-200"/>
- <source>Game data</source>
- <translation>Speldata</translation>
- </message>
- <message>
- <location line="+366"/>
- <source>Profile</source>
- <translation>Profiel</translation>
- </message>
- <message>
- <location line="+32"/>
- <source>Options</source>
- <translation>Opties</translation>
- </message>
- <message>
- <location line="+17"/>
- <source>Mapping</source>
- <translation>Verwijzing</translation>
- </message>
- <message>
- <location line="+23"/>
- <source>Tracking</source>
- <translation>Tracken</translation>
- </message>
- <message>
- <location line="+36"/>
- <source>Start</source>
- <translation>Start</translation>
- </message>
- <message>
- <location line="+22"/>
- <source>Stop</source>
- <translation>Stop</translation>
- </message>
- <message>
- <location line="+43"/>
- <source>Input</source>
- <translation>Invoer</translation>
- </message>
- <message>
- <location line="+49"/>
- <location line="+62"/>
- <location line="+62"/>
- <source>🔨</source>
- <translation>🔨</translation>
- </message>
- <message>
- <location line="-111"/>
- <source>Output</source>
- <translation>Uitvoer</translation>
+ <translation type="unfinished">Yaw</translation>
</message>
<message>
- <location line="+62"/>
- <source>Filter</source>
- <translation>Filter</translation>
+ <source>Max input</source>
+ <translation type="unfinished"></translation>
</message>
-</context>
-<context>
- <name>mapping_window</name>
<message>
- <location filename="../mapping-window.ui" line="+26"/>
- <source>Mapping properties</source>
- <translation>Verwijzings-instellingen</translation>
+ <source>Asymmetric mapping below</source>
+ <translation type="unfinished">Assymetrische verwijzingen hieronder</translation>
</message>
<message>
- <location line="+20"/>
- <source>Yaw</source>
- <translation>Yaw</translation>
+ <source>Pitch</source>
+ <translation type="unfinished">Pitch</translation>
</message>
<message>
- <location line="+24"/>
- <location line="+88"/>
- <location line="+88"/>
- <source>Max rotation</source>
- <translation>Maximale rotatie</translation>
+ <source>Max output</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="-138"/>
- <location line="+88"/>
- <location line="+88"/>
- <location line="+92"/>
- <location line="+88"/>
- <location line="+88"/>
- <source>Asymmetric mapping below</source>
- <translation>Assymetrische verwijzingen hieronder</translation>
+ <source>180°</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="-418"/>
- <source>Pitch</source>
- <translation>Pitch</translation>
+ <source>90°</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="+88"/>
<source>Roll</source>
- <translation>Rollen</translation>
+ <translation type="unfinished">Rollen</translation>
</message>
<message>
- <location line="+92"/>
<source>X</source>
- <translation>X</translation>
+ <translation type="unfinished">X</translation>
</message>
<message>
- <location line="+24"/>
- <location line="+88"/>
- <location line="+88"/>
- <source>Max translation</source>
- <translation>Maximale translatie</translation>
- </message>
- <message>
- <location line="-112"/>
<source>Y</source>
- <translation>Y</translation>
+ <translation type="unfinished">Y</translation>
</message>
<message>
- <location line="+88"/>
<source>Z</source>
- <translation>Z</translation>
+ <translation type="unfinished">Z</translation>
</message>
-</context>
-<context>
- <name>new_file_dialog</name>
<message>
- <location filename="../new_file_dialog.h" line="+42"/>
- <source>File exists</source>
- <translation>Bestand aanwezig</translation>
+ <source>%1°</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
- <source>This file already exists. Pick another name.</source>
- <translation>Dit bestand is reeds aanwezig. Kies een andere naam.</translation>
+ <source>%1 cm</source>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
<name>options_dialog</name>
<message>
- <location filename="../options-dialog.ui" line="+20"/>
<source>Options</source>
<translation>Opties</translation>
</message>
<message>
- <location line="+38"/>
<source>Shortcuts</source>
<translation>Sneltoetsen</translation>
</message>
<message>
- <location line="+21"/>
<source>Global shortcuts</source>
<translation>Algehele sneltoetsen</translation>
</message>
<message>
- <location line="+21"/>
- <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Center&lt;/span&gt; - use current pose as looking perfectly forward.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Toggle&lt;/span&gt; - keep looking at same spot until next toggle keypress.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Zero&lt;/span&gt; - keep looking forward until next zero keypress.&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
- <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Centreren&lt;/span&gt; - gebruik de huidige kijkrichting als ijkpunt voor het centreren.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Центр&lt;/span&gt; - фиксирует взгляд в нулевой точке до следующего нажатия клавиши.&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
- </message>
- <message>
- <location line="+66"/>
- <location line="+32"/>
- <location line="+29"/>
- <location line="+131"/>
- <location line="+51"/>
- <location line="+13"/>
- <location line="+61"/>
- <location line="+13"/>
- <location line="+29"/>
- <location line="+13"/>
- <location line="+70"/>
- <location line="+32"/>
- <location line="+13"/>
- <location line="+13"/>
- <location line="+32"/>
- <location line="+76"/>
- <location line="+51"/>
- <location line="+13"/>
<source>Bind</source>
<translation>Koppelen</translation>
</message>
<message>
- <location line="-403"/>
<source>Restart tracking</source>
<translation>Tracken opnieuw starten</translation>
</message>
<message>
- <location line="+35"/>
<source>Toggle while held</source>
<translation>Wisselen zolang knop is ingedrukt</translation>
</message>
<message>
- <location line="+39"/>
<source>Toggle tracking</source>
<translation>Schakelen tussen tracken en niet-tracken</translation>
</message>
<message>
- <location line="-298"/>
<source>Start tracking</source>
<translation>Tracken starten</translation>
</message>
<message>
- <location line="+67"/>
<source>Stop tracking</source>
<translation>Tracken stoppen</translation>
</message>
<message>
- <location line="-128"/>
<source>Center</source>
<translation>Centreren</translation>
</message>
<message>
- <location line="+163"/>
<source>Zero</source>
<translation>Weergave forceren naar perfect horizontale weergave</translation>
</message>
<message>
- <location line="+32"/>
<source>Zero while held</source>
<translation>Weergave forceren naar perfect horizontale weergave (zolang knop is ingedrukt)</translation>
</message>
<message>
- <location line="-16"/>
<source>Toggle</source>
<translation>Wisselen</translation>
</message>
<message>
- <location line="+528"/>
<source>Center at startup</source>
<translation>Automatisch centreren bij starten van tracking</translation>
</message>
<message>
- <location line="+60"/>
<source>Minimize to tray</source>
<translation>Minimaliseren naar taakbalk</translation>
</message>
<message>
- <location line="+245"/>
- <location line="+69"/>
- <location line="+53"/>
+ <source>Relative translation only</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Alter the centered position sent to games. Useful if the default position is too much downward or upward.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
<source>°</source>
<translation>°</translation>
</message>
<message>
- <location line="+812"/>
- <location line="+261"/>
- <source>Enable</source>
- <translation>Inschakelen</translation>
+ <source>Mode</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="-1403"/>
- <source>Minimize to tray on startup when enabled</source>
- <translation>Programma geminimaliseerd starten (indien minimaliseren is ingeschakeld)</translation>
+ <source>Enabled</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="-13"/>
- <source>Enable tray</source>
- <translation>Taakbalk inschakelen</translation>
+ <source>Enabled when not aiming</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="+30"/>
- <source>Camera</source>
- <translation>Camera</translation>
+ <source>Enable</source>
+ <translation>Inschakelen</translation>
</message>
<message>
- <location line="+12"/>
- <source>Camera angle</source>
- <translation>Camera-afwijking</translation>
+ <source>Minimize to tray on startup when enabled</source>
+ <translation>Programma geminimaliseerd starten (indien minimaliseren is ingeschakeld)</translation>
</message>
<message>
- <location line="+9"/>
- <source>Use camera center as translation offset</source>
- <translation>Het midden van de camera gebruiken als afwijking</translation>
+ <source>Enable tray</source>
+ <translation>Taakbalk inschakelen</translation>
</message>
<message>
- <location line="+47"/>
- <location line="+215"/>
- <location line="+247"/>
- <location line="+65"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+58"/>
<source>Roll</source>
<translation>Rollen</translation>
</message>
<message>
- <location line="-843"/>
- <location line="+139"/>
- <location line="+344"/>
- <location line="+24"/>
- <location line="+34"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+58"/>
<source>Pitch</source>
<translation>Pitch</translation>
</message>
<message>
- <location line="-815"/>
- <location line="+176"/>
- <location line="+279"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+81"/>
- <location line="+55"/>
- <location line="+58"/>
- <location line="+58"/>
<source>Yaw</source>
<translation>Yaw</translation>
</message>
<message>
- <location line="-791"/>
<source>Custom center pose</source>
<translation>Aangepaste neutrale positie</translation>
</message>
<message>
- <location line="+9"/>
- <source>Alter the centered position sent to games.</source>
- <translation>De neutrale positie die naar spellen wordt gestuurd aanpassen.</translation>
- </message>
- <message>
- <location line="+49"/>
- <location line="+23"/>
- <location line="+60"/>
- <location line="+1039"/>
- <location line="+22"/>
<source> cm</source>
<translation> cm</translation>
</message>
<message>
- <location line="-1010"/>
- <source>Centering method</source>
- <translation>Centreermethode</translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Try changing this if centering doesn&apos;t perform correctly for your input device.</source>
- <translation>Verander deze instelling als het centreren een incorrect resultaat geeft.</translation>
- </message>
- <message>
- <location line="+34"/>
- <source>Method</source>
- <translation>Methode</translation>
- </message>
- <message>
- <location line="+14"/>
- <source>Relative (inertial device)</source>
- <translation>Relatief (tracking met bewegingsmeting)</translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Absolute (camera device)</source>
- <translation>Absoluut (tracking met optische meting)</translation>
- </message>
- <message>
- <location line="+37"/>
<source>Output</source>
<translation>Uitvoer</translation>
</message>
<message>
- <location line="+630"/>
- <location line="+15"/>
<source>Relative translation</source>
<translation>Relatieve omzetting</translation>
</message>
<message>
- <location line="+15"/>
<source>With relative mode on, translation is applied after rotation. For example, rotating +180 degrees yaw and moving backwards results in moving forward as a result of that rotation.</source>
<translation>Met de relatieve modus aan, wordt de relatieve omzetting toegepast ná rotatie. Zo zal een draaiing van 180 graden op de yaw-as gevolgd door een achterwaartse beweging effectief resulteren in een voorwaartse beweging omdat de draaiing eerst is toegepast.</translation>
</message>
<message>
- <location line="+65"/>
<source>Disable for X</source>
<translation>Uitschakelen voor de X-as</translation>
</message>
<message>
- <location line="+16"/>
<source>Disable for Y</source>
<translation>Uitschakelen voor de Y-as</translation>
</message>
<message>
- <location line="+16"/>
<source>Disable for Z (for zoom on Z axis)</source>
<translation>Uitschakelen voor de Z-as (voor het zoomen met de Z-as)</translation>
</message>
<message>
- <location line="+13"/>
<source>Disable effect by yaw</source>
<translation>Effect uitschakelen bij yaw</translation>
</message>
<message>
- <location line="+13"/>
<source>Disable effect by pitch</source>
<translation>Effect uitschakelen bij pitch</translation>
</message>
<message>
- <location line="+13"/>
<source>Disable effect by roll</source>
<translation>Effect uitschakelen bij rol</translation>
</message>
<message>
- <location line="-779"/>
- <source>Output remap</source>
- <translation>Uitvoer aanpassen</translation>
- </message>
- <message>
- <location line="+537"/>
- <source>Assign input axis to output axis.</source>
- <translation>Ingangs-as toewijzen aan uitgangs-as.</translation>
- </message>
- <message>
- <location line="-777"/>
- <location line="+320"/>
- <location line="+27"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+58"/>
<source>X</source>
<translation>X</translation>
</message>
<message>
- <location line="-369"/>
- <source>Invert</source>
- <translation>Omkeren</translation>
- </message>
- <message>
- <location line="-303"/>
- <location line="+322"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+52"/>
- <location line="+84"/>
- <location line="+58"/>
- <location line="+58"/>
<source>Y</source>
<translation>Y</translation>
</message>
<message>
- <location line="-1010"/>
- <source>Never translate the application interface</source>
+ <source>Disable user interface localization</source>
<translation>De applicatie nooit vertaald weergeven</translation>
</message>
<message>
- <location line="+114"/>
- <source>Specify an angle to rotate position tracking. It lets the tracker avoid moving on the X and Y axes when zooming, since camera isn&apos;t mounted perfectly in front of the model, but above or below.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+242"/>
- <location line="+304"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+34"/>
- <location line="+24"/>
<source>Z</source>
<translation>Z</translation>
</message>
<message>
- <location line="-335"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+58"/>
<source>Disabled</source>
<translation>Uitgeschakeld</translation>
</message>
<message>
- <location line="-212"/>
<source>Destination</source>
<translation>Doel</translation>
</message>
<message>
- <location line="+52"/>
<source>Source</source>
<translation>Bron</translation>
</message>
<message>
- <location line="+249"/>
<source>CSV Data Logging</source>
<translation>CSV-data loggen</translation>
</message>
<message>
- <location line="+15"/>
<source>Enable - You will be asked for a filename whenever tracking starts</source>
<translation>Inschakalen - Er zal worden gevraagd naar een bestandsnaam wanneer het tracken start</translation>
</message>
<message>
- <location line="+202"/>
<source>Neck displacement</source>
<translation>Verschuiven van de nekpositie</translation>
</message>
<message>
- <location line="+12"/>
<source>Eyes will be offset from the pivot of rotation, assumed to be the neck. It also works with relative translation disabled.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+40"/>
- <source>Height from center of rotation</source>
- <translation>Hoogte vanaf het midden van de rotatie</translation>
- </message>
- <message>
- <location line="+57"/>
<source>Forward from center of rotation</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+52"/>
- <location line="+12"/>
<source>Game detection</source>
<translation>Speldetectie</translation>
</message>
<message>
- <location line="+15"/>
<source>Start tracking automatically when a game starts with selected profile, and stop when the game exits.</source>
<translation>Tracken automatisch starten en stoppen wanneer een spel wordt gestart en gestopt, op basis van het ingestelde profiel.</translation>
</message>
+ <message>
+ <source>Joy button %1</source>
+ <translation type="unfinished">Joystick-knop %1</translation>
+ </message>
+ <message>
+ <source>None</source>
+ <translation type="unfinished">Geen</translation>
+ </message>
+ <message>
+ <source>Centering method</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Point</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wireless VR 360</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Roll compensated</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Freeze the position returned by the tracker while this mode is active.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Tracker</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Filter</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Mouse %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Use current tracker pose as looking perfectly forward.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Keep looking forward until next zero keypress.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Axis assignment</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Pre-invert</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Post-invert</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>process_detector</name>
<message>
- <location filename="../process_widget.ui" line="+14"/>
<source>Game detector</source>
<translation>Speldetector</translation>
</message>
<message>
- <location line="+34"/>
<source>Executable</source>
<translation>Toepassing</translation>
</message>
<message>
- <location line="+5"/>
<source>Profile</source>
<translation>Profiel</translation>
</message>
<message>
- <location line="+44"/>
<source>+</source>
<translation></translation>
</message>
<message>
- <location line="+20"/>
<source>-</source>
<translation></translation>
</message>
<message>
- <location line="+10"/>
<source>Start profiles from game executable names in this list</source>
<translation>Profielen vanuit de spelbestandsnaam in deze lijst starten</translation>
</message>
diff --git a/gui/lang/ru_RU.ts b/gui/lang/ru_RU.ts
index 78c160ac..5b3fcc03 100644
--- a/gui/lang/ru_RU.ts
+++ b/gui/lang/ru_RU.ts
@@ -4,760 +4,426 @@
<context>
<name>BrowseButton</name>
<message>
- <location filename="../process_detector.cpp" line="+66"/>
<source>Set executable name</source>
<translation>Укажите исполняемый файл</translation>
</message>
<message>
- <location line="+2"/>
<source>Executable (*.exe);;All Files (*)</source>
<translation></translation>
</message>
</context>
<context>
- <name>MainWindow</name>
+ <name>Form</name>
<message>
- <location filename="../main-window.cpp" line="+97"/>
- <source>Create new empty config</source>
- <translation>Создать новый пустой профиль</translation>
+ <source>Press &quot;calibrate&quot; in given row to calibrate that axis. Follow instructions in the next window.
+Press &quot;clear calibration&quot; to remove any calibration data pertaining to that axis of position change or rotation.</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
- <source>Create new copied config</source>
- <translation>Создать новый профиль на основе текущего</translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Open configuration directory</source>
- <translation>Открыть каталог с профилями</translation>
- </message>
- <message>
- <location line="+78"/>
- <location line="+376"/>
- <source>opentrack</source>
- <translation></translation>
- </message>
- <message>
- <location line="-373"/>
- <source> (debug)</source>
- <translation></translation>
- </message>
- <message>
- <location line="+8"/>
- <location line="+553"/>
- <source>Show the Octopus</source>
- <translation>Показать осьминожка</translation>
- </message>
- <message>
- <location line="-553"/>
- <location line="+553"/>
- <source>Hide the Octopus</source>
- <translation>Спрятать осьминожка</translation>
- </message>
- <message>
- <location line="-546"/>
- <source>Tracker settings</source>
- <translation>Настройка источника данных</translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Filter settings</source>
- <translation>Настройка фильтрации/сглаживания</translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Protocol settings</source>
- <translation>Настройка выходного интерфейса</translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Mappings</source>
- <translation>Настройка кривых</translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Options</source>
- <translation>Настройки</translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Exit</source>
- <translation>Закрыть</translation>
+ <source>X</source>
+ <translation type="unfinished">X</translation>
</message>
<message>
- <location line="+38"/>
- <source>The Octopus is sad</source>
- <translation>Осьминожек опечален</translation>
+ <source>Y</source>
+ <translation type="unfinished">Y</translation>
</message>
<message>
- <location line="+1"/>
- <source>Check permissions for your .ini directory:
-
-&quot;%1&quot;%2
-
-Exiting now.</source>
- <translation>Проверьте права доступа на Вашу .ini папку:
-
-&quot;%1&quot;%2
-
-Закрытие программы.</translation>
+ <source>Z</source>
+ <translation type="unfinished">Z</translation>
</message>
<message>
- <location line="+190"/>
- <source>Library load error</source>
- <translation>Ошибка загрузки библиотеки</translation>
+ <source>Yaw</source>
+ <translation type="unfinished">Yaw</translation>
</message>
<message>
- <location line="+1"/>
- <source>One of libraries failed to load. Check installation.</source>
- <translation>Одна из библиотек загрузилась неудачно. Проверьте инсталлятор.</translation>
+ <source>Pitch</source>
+ <translation type="unfinished">Pitch</translation>
</message>
<message>
- <location line="+96"/>
- <location line="+4"/>
- <source> :: </source>
- <translation> :: </translation>
- </message>
-</context>
-<context>
- <name>OptionsDialog</name>
- <message>
- <location filename="../options-dialog.cpp" line="+27"/>
- <source>Joy button %1</source>
- <translation>Джойстик #%1</translation>
+ <source>Roll</source>
+ <translation type="unfinished">Roll</translation>
</message>
<message>
- <location line="+3"/>
- <location line="+164"/>
- <source>None</source>
- <translation>Не назначена</translation>
+ <source>Calibrate</source>
+ <translation type="unfinished"></translation>
</message>
-</context>
-<context>
- <name>UI_new_config</name>
<message>
- <location filename="../new_config.ui" line="+17"/>
- <source>Config filename</source>
- <translation>Создание профиля</translation>
+ <source>Clear calibration</source>
+ <translation type="unfinished"></translation>
</message>
<message>
- <location line="+10"/>
- <source>New file name:</source>
- <translation>Новое имя профиля:</translation>
+ <source>1</source>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
<name>keyboard_listener</name>
<message>
- <location filename="../keyboard_listener.ui" line="+14"/>
<source>Dialog</source>
<translation>Назначение клавиши</translation>
</message>
<message>
- <location line="+6"/>
<source>Press a key or close this window to remove the keybinding.</source>
<translation>Нажмите любую клавишу или закройте окно для сброса текущего значения</translation>
</message>
</context>
<context>
- <name>main_window</name>
- <message>
- <location filename="../main-window.ui" line="+278"/>
- <source>Raw tracker data</source>
- <translation>Исходные данные</translation>
- </message>
- <message>
- <location line="+67"/>
- <location line="+479"/>
- <source>Z</source>
- <translation>Z</translation>
- </message>
- <message>
- <location line="-463"/>
- <location line="+409"/>
- <source>Pitch</source>
- <translation>Pitch</translation>
- </message>
+ <name>mapping_dialog</name>
<message>
- <location line="-356"/>
- <location line="+315"/>
- <source>Y</source>
- <translation>Y</translation>
- </message>
- <message>
- <location line="-299"/>
- <location line="+277"/>
- <source>X</source>
- <translation>X</translation>
- </message>
- <message>
- <location line="-230"/>
- <location line="+309"/>
- <source>Roll</source>
- <translation>Roll</translation>
+ <source>Mapping properties</source>
+ <translation>Настройка кривых</translation>
</message>
<message>
- <location line="-293"/>
- <location line="+309"/>
<source>Yaw</source>
<translation>Yaw</translation>
</message>
<message>
- <location line="-200"/>
- <source>Game data</source>
- <translation>Игровые данные</translation>
- </message>
- <message>
- <location line="+366"/>
- <source>Profile</source>
- <translation>Профиль</translation>
- </message>
- <message>
- <location line="+32"/>
- <source>Options</source>
- <translation>Настройки</translation>
- </message>
- <message>
- <location line="+17"/>
- <source>Mapping</source>
- <translation> Кривые</translation>
+ <source>Max input</source>
+ <translation>Фильтр исходной оси</translation>
</message>
<message>
- <location line="+23"/>
- <source>Tracking</source>
- <translation>Статус работы трекера</translation>
- </message>
- <message>
- <location line="+36"/>
- <source>Start</source>
- <translation>Запустить</translation>
+ <source>Asymmetric mapping below</source>
+ <translation>Ассиметричная настройка кривых</translation>
</message>
<message>
- <location line="+22"/>
- <source>Stop</source>
- <translation>Остановить</translation>
+ <source>Pitch</source>
+ <translation>Pitch</translation>
</message>
<message>
- <location line="+43"/>
- <source>Input</source>
- <translation>Источник данных</translation>
+ <source>Max output</source>
+ <translation>Фильтр выходной оси</translation>
</message>
<message>
- <location line="+49"/>
- <location line="+62"/>
- <location line="+62"/>
- <source>🔨</source>
+ <source>180°</source>
<translation></translation>
</message>
<message>
- <location line="-111"/>
- <source>Output</source>
- <translation>Выходной интерфейс</translation>
- </message>
- <message>
- <location line="+62"/>
- <source>Filter</source>
- <translation>Фильтрация/сглаживание</translation>
- </message>
-</context>
-<context>
- <name>mapping_window</name>
- <message>
- <location filename="../mapping-window.ui" line="+26"/>
- <source>Mapping properties</source>
- <translation>Настройка кривых</translation>
- </message>
- <message>
- <location line="+20"/>
- <source>Yaw</source>
- <translation>Yaw</translation>
- </message>
- <message>
- <location line="+24"/>
- <location line="+88"/>
- <location line="+88"/>
- <source>Max rotation</source>
- <translation>Максимальный угол</translation>
- </message>
- <message>
- <location line="-138"/>
- <location line="+88"/>
- <location line="+88"/>
- <location line="+92"/>
- <location line="+88"/>
- <location line="+88"/>
- <source>Asymmetric mapping below</source>
- <translation>Ассиметричная настройка кривых</translation>
- </message>
- <message>
- <location line="-418"/>
- <source>Pitch</source>
- <translation>Pitch</translation>
+ <source>90°</source>
+ <translation></translation>
</message>
<message>
- <location line="+88"/>
<source>Roll</source>
<translation>Roll</translation>
</message>
<message>
- <location line="+92"/>
<source>X</source>
<translation>X</translation>
</message>
<message>
- <location line="+24"/>
- <location line="+88"/>
- <location line="+88"/>
- <source>Max translation</source>
- <translation>Максимальное смещение</translation>
- </message>
- <message>
- <location line="-112"/>
<source>Y</source>
<translation>Y</translation>
</message>
<message>
- <location line="+88"/>
<source>Z</source>
<translation>Z</translation>
</message>
-</context>
-<context>
- <name>new_file_dialog</name>
<message>
- <location filename="../new_file_dialog.h" line="+42"/>
- <source>File exists</source>
- <translation>Файл создан</translation>
+ <source>%1°</source>
+ <translation></translation>
</message>
<message>
- <location line="+1"/>
- <source>This file already exists. Pick another name.</source>
- <translation>Данный файл уже создан. Пожалуйста выберите другое имя.</translation>
+ <source>%1 cm</source>
+ <translation type="unfinished"></translation>
</message>
</context>
<context>
<name>options_dialog</name>
<message>
- <location filename="../options-dialog.ui" line="+20"/>
<source>Options</source>
<translation>Настройки</translation>
</message>
<message>
- <location line="+38"/>
<source>Shortcuts</source>
<translation>Горячие клавиши</translation>
</message>
<message>
- <location line="+21"/>
<source>Global shortcuts</source>
<translation>Глобальные горячие клавиши</translation>
</message>
<message>
- <location line="+21"/>
- <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Center&lt;/span&gt; - use current pose as looking perfectly forward.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Toggle&lt;/span&gt; - keep looking at same spot until next toggle keypress.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Zero&lt;/span&gt; - keep looking forward until next zero keypress.&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
- <translatorcomment>использовать текущую позу как позу вперед</translatorcomment>
- <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Центрирование&lt;/span&gt; - использовать текущую позу в качестве центра.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Фиксация обзора&lt;/span&gt; - фиксация обзора до следующего нажатия клавиши.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Центр&lt;/span&gt; - фиксирует взгляд в нулевой точке до следующего нажатия клавиши.&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
- </message>
- <message>
- <location line="+66"/>
- <location line="+32"/>
- <location line="+29"/>
- <location line="+131"/>
- <location line="+51"/>
- <location line="+13"/>
- <location line="+61"/>
- <location line="+13"/>
- <location line="+29"/>
- <location line="+13"/>
- <location line="+70"/>
- <location line="+32"/>
- <location line="+13"/>
- <location line="+13"/>
- <location line="+32"/>
- <location line="+76"/>
- <location line="+51"/>
- <location line="+13"/>
<source>Bind</source>
<translation>Назначить</translation>
</message>
<message>
- <location line="-403"/>
<source>Restart tracking</source>
<translation>Перезапустить трекер</translation>
</message>
<message>
- <location line="+35"/>
<source>Toggle while held</source>
<translation>Фиксация обзора при удержании</translation>
</message>
<message>
- <location line="+39"/>
<source>Toggle tracking</source>
<translation>Запустить/Остановить трекер</translation>
</message>
<message>
- <location line="-298"/>
<source>Start tracking</source>
<translation>Запустить трекер</translation>
</message>
<message>
- <location line="+67"/>
<source>Stop tracking</source>
<translation>Остановить трекер</translation>
</message>
<message>
- <location line="-128"/>
<source>Center</source>
<translation>Центрирование</translation>
</message>
<message>
- <location line="+163"/>
<source>Zero</source>
<translation>Центр</translation>
</message>
<message>
- <location line="+32"/>
<source>Zero while held</source>
<translation>Центр при удержании</translation>
</message>
<message>
- <location line="-16"/>
<source>Toggle</source>
<translation>Фиксация обзора</translation>
</message>
<message>
- <location line="+528"/>
<source>Center at startup</source>
<translation>Центрирование при запуске</translation>
</message>
<message>
- <location line="+34"/>
- <source>Never translate the application interface</source>
- <translation></translation>
- </message>
- <message>
- <location line="+26"/>
<source>Minimize to tray</source>
<translation>Настройка трея</translation>
</message>
<message>
- <location line="+245"/>
- <location line="+69"/>
- <location line="+53"/>
<source>°</source>
<translation>°</translation>
</message>
<message>
- <location line="+812"/>
- <location line="+261"/>
<source>Enable</source>
<translation>Включить</translation>
</message>
<message>
- <location line="-1403"/>
<source>Minimize to tray on startup when enabled</source>
<translation>Сворачивать в трей при запуске</translation>
</message>
<message>
- <location line="-13"/>
<source>Enable tray</source>
<translation>Добавлять opentrack в трей</translation>
</message>
<message>
- <location line="+30"/>
- <source>Camera</source>
- <translation>Камера</translation>
- </message>
- <message>
- <location line="+12"/>
- <source>Camera angle</source>
- <translation>Коррекция расположения камеры</translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Use camera center as translation offset</source>
- <translation>Включить</translation>
- </message>
- <message>
- <location line="+13"/>
- <source>Specify an angle to rotate position tracking. It lets the tracker avoid moving on the X and Y axes when zooming, since camera isn&apos;t mounted perfectly in front of the model, but above or below.</source>
- <translation>Используйте данную настройку для того, чтобы скорректировать работу камеры в случае, когда она у Вас расположена не четко напротив клипсы. Если у вас при зуме осьминожек убегает - то это то, что Вам нужно! Например: при &quot;убегании&quot; вниз скорректируйте ось Pitch.</translation>
- </message>
- <message>
- <location line="+34"/>
- <location line="+215"/>
- <location line="+247"/>
- <location line="+65"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+58"/>
<source>Roll</source>
<translation>Roll</translation>
</message>
<message>
- <location line="-843"/>
- <location line="+139"/>
- <location line="+344"/>
- <location line="+24"/>
- <location line="+34"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+58"/>
<source>Pitch</source>
<translation>Pitch</translation>
</message>
<message>
- <location line="-815"/>
- <location line="+176"/>
- <location line="+279"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+81"/>
- <location line="+55"/>
- <location line="+58"/>
- <location line="+58"/>
<source>Yaw</source>
<translation>Yaw</translation>
</message>
<message>
- <location line="-791"/>
<source>Custom center pose</source>
<translation>Пользовательское положение центральной позиции</translation>
</message>
<message>
- <location line="+9"/>
- <source>Alter the centered position sent to games.</source>
- <translation>Данная настройка позволяет изменить изначальную точку нахождения в вашей любимой игре. Например: если вам хочется сидеть подальше от лобового стекла внесите поправку в ось Z. И каждый раз при центрировании Вы будете находиться в данном позиции.</translation>
- </message>
- <message>
- <location line="+49"/>
- <location line="+23"/>
- <location line="+60"/>
- <location line="+1039"/>
- <location line="+22"/>
<source> cm</source>
<translation> см</translation>
</message>
<message>
- <location line="-1010"/>
- <source>Centering method</source>
- <translation>Режим центрирования</translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Try changing this if centering doesn&apos;t perform correctly for your input device.</source>
- <translation>Если для Вашего трекера текущий режим центрирования отрабатывает некорректно, то попробуйте изменить его на другой.</translation>
- </message>
- <message>
- <location line="+34"/>
- <source>Method</source>
- <translation>Метод центрирования</translation>
- </message>
- <message>
- <location line="+14"/>
- <source>Relative (inertial device)</source>
- <translation>Относительный (инерционники)</translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Absolute (camera device)</source>
- <translation>Абсолютный (камеры)</translation>
- </message>
- <message>
- <location line="+37"/>
<source>Output</source>
<translation>Выходной интерфейс</translation>
</message>
<message>
- <location line="+630"/>
- <location line="+15"/>
<source>Relative translation</source>
<translation>Относительный сдвиг</translation>
</message>
<message>
- <location line="+15"/>
<source>With relative mode on, translation is applied after rotation. For example, rotating +180 degrees yaw and moving backwards results in moving forward as a result of that rotation.</source>
<translation>Другой режим интерпритации поворотов.
При активированном режиме смещения по осям применяются после поворота. Важно! В этом режиме сначала выполняется поворот по оси YAW и только потом смещение по осям X, Y, Z, в противном случае у вас будут неверно интерпритироваться движения. Например: при повороте на 180 градусов по оси YAW и движении вперед, камера будет приближаться, а пилот &quot;отдаляться в спинку кресла&quot;.</translation>
</message>
<message>
- <location line="+65"/>
<source>Disable for X</source>
<translation>Откл. по оси X</translation>
</message>
<message>
- <location line="+16"/>
<source>Disable for Y</source>
<translation>Откл. по оси Y</translation>
</message>
<message>
- <location line="+16"/>
<source>Disable for Z (for zoom on Z axis)</source>
<translation>Откл. по оси Z (Ось приближения)</translation>
</message>
<message>
- <location line="+13"/>
<source>Disable effect by yaw</source>
<translation>Откл. по оси Yaw</translation>
</message>
<message>
- <location line="+13"/>
<source>Disable effect by pitch</source>
<translation>Откл. по оси Pitch</translation>
</message>
<message>
- <location line="+13"/>
<source>Disable effect by roll</source>
<translation>Откл. по оси Roll</translation>
</message>
<message>
- <location line="+31"/>
<source>Eyes will be offset from the pivot of rotation, assumed to be the neck. It also works with relative translation disabled.</source>
<translation>Смещение точки взгляда относительно оси вращения. Работает вместе с относительным сдвигом</translation>
</message>
<message>
- <location line="-810"/>
- <source>Output remap</source>
- <translation>Переназначение осей</translation>
- </message>
- <message>
- <location line="+537"/>
- <source>Assign input axis to output axis.</source>
- <translation>Сопостовление исходных и игровых осей.</translation>
- </message>
- <message>
- <location line="-777"/>
- <location line="+320"/>
- <location line="+27"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+58"/>
<source>X</source>
<translation>X</translation>
</message>
<message>
- <location line="-369"/>
- <source>Invert</source>
- <translation>Инвертировать</translation>
- </message>
- <message>
- <location line="-303"/>
- <location line="+322"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+52"/>
- <location line="+84"/>
- <location line="+58"/>
- <location line="+58"/>
<source>Y</source>
<translation>Y</translation>
</message>
<message>
- <location line="-654"/>
- <location line="+304"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+34"/>
- <location line="+24"/>
<source>Z</source>
<translation>Z</translation>
</message>
<message>
- <location line="-335"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+58"/>
<source>Disabled</source>
<translation>Отключена</translation>
</message>
<message>
- <location line="-212"/>
<source>Destination</source>
<translation>Игровая ось</translation>
</message>
<message>
- <location line="+52"/>
<source>Source</source>
<translation>Исходная ось</translation>
</message>
<message>
- <location line="+249"/>
+ <source>Relative translation only</source>
+ <translation>Только относительный сдвиг</translation>
+ </message>
+ <message>
+ <source>Alter the centered position sent to games. Useful if the default position is too much downward or upward.</source>
+ <translation>Изменение центрального положения камеры в игре. Полезно, если Вам необходимо чтобы взгляд персонажа в игре по умолчанию был смещен в нужную сторону. Например, можно пилот или водитель может сидеть правей, ниже или выше исходного положения камеры.</translation>
+ </message>
+ <message>
<source>CSV Data Logging</source>
<translation>Логирование в формат CSV</translation>
</message>
<message>
- <location line="+15"/>
<source>Enable - You will be asked for a filename whenever tracking starts</source>
<translation>Включить - необходимо будет указать имя файла при запуске трекера</translation>
</message>
<message>
- <location line="+202"/>
- <source>Neck displacement</source>
- <translation>Настройка смещения шеи, как смещения оси поворота</translation>
+ <source>Mode</source>
+ <translation> Статус опции</translation>
</message>
<message>
- <location line="+52"/>
- <source>Height from center of rotation</source>
- <translation>Выше/ниже</translation>
+ <source>Enabled</source>
+ <translation>Включена</translation>
+ </message>
+ <message>
+ <source>Enabled when not aiming</source>
+ <translation>Включена, если не прицеливаться</translation>
+ </message>
+ <message>
+ <source>Neck displacement</source>
+ <translation>Настройка смещения шеи, как смещения оси поворота</translation>
</message>
<message>
- <location line="+57"/>
<source>Forward from center of rotation</source>
<translation>Вперед/назад</translation>
</message>
<message>
- <location line="+52"/>
- <location line="+12"/>
<source>Game detection</source>
<translation>Захват игр</translation>
</message>
<message>
- <location line="+15"/>
<source>Start tracking automatically when a game starts with selected profile, and stop when the game exits.</source>
<translation>Данное меню позволяет автоматизировать запуск opentrack&apos;а. Как только программа определит Вашу игру - opentrack начнет отслеживать Ваши движения с выбранным профилем, а по закрытию игры - остановит его. На практике это нажатие кнопки &quot;Запустить&quot; и &quot;Остановить&quot; в автоматическом режиме.</translation>
</message>
+ <message>
+ <source>Joy button %1</source>
+ <translation>Джойстик #%1</translation>
+ </message>
+ <message>
+ <source>None</source>
+ <translation>Не назначена</translation>
+ </message>
+ <message>
+ <source>Centering method</source>
+ <translation>Метод центровки</translation>
+ </message>
+ <message>
+ <source>Point</source>
+ <translation>Точечная</translation>
+ </message>
+ <message>
+ <source>Wireless VR 360</source>
+ <translation>Беспроводная VR 360</translation>
+ </message>
+ <message>
+ <source>Roll compensated</source>
+ <translation>Roll компенсированная</translation>
+ </message>
+ <message>
+ <source>Freeze the position returned by the tracker while this mode is active.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Disable user interface localization</source>
+ <translation>Использовать английский интерфейс</translation>
+ </message>
+ <message>
+ <source>Tracker</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Filter</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Mouse %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Use current tracker pose as looking perfectly forward.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Keep looking forward until next zero keypress.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Axis assignment</source>
+ <translation>Переназначение осей</translation>
+ </message>
+ <message>
+ <source>Pre-invert</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Post-invert</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>process_detector</name>
<message>
- <location filename="../process_widget.ui" line="+14"/>
<source>Game detector</source>
<translation>Захват игр</translation>
</message>
<message>
- <location line="+34"/>
<source>Executable</source>
<translation>Файл</translation>
</message>
<message>
- <location line="+5"/>
<source>Profile</source>
<translation>Профиль</translation>
</message>
<message>
- <location line="+44"/>
<source>+</source>
<translation></translation>
</message>
<message>
- <location line="+20"/>
<source>-</source>
<translation></translation>
</message>
<message>
- <location line="+10"/>
<source>Start profiles from game executable names in this list</source>
- <translation>Запускать opentrack при старте игры</translation>
+ <translation>Включить захват игр</translation>
</message>
</context>
</TS>
diff --git a/gui/lang/stub.ts b/gui/lang/stub.ts
index efffe68c..ee96d3be 100644
--- a/gui/lang/stub.ts
+++ b/gui/lang/stub.ts
@@ -4,751 +4,422 @@
<context>
<name>BrowseButton</name>
<message>
- <location filename="../process_detector.cpp" line="+66"/>
<source>Set executable name</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+2"/>
<source>Executable (*.exe);;All Files (*)</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
- <name>MainWindow</name>
+ <name>Form</name>
<message>
- <location filename="../main-window.cpp" line="+97"/>
- <source>Create new empty config</source>
+ <source>Press &quot;calibrate&quot; in given row to calibrate that axis. Follow instructions in the next window.
+Press &quot;clear calibration&quot; to remove any calibration data pertaining to that axis of position change or rotation.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
- <source>Create new copied config</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1"/>
- <source>Open configuration directory</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+78"/>
- <location line="+376"/>
- <source>opentrack</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-373"/>
- <source> (debug)</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <location line="+553"/>
- <source>Show the Octopus</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-553"/>
- <location line="+553"/>
- <source>Hide the Octopus</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-546"/>
- <source>Tracker settings</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Filter settings</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Protocol settings</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Mappings</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+5"/>
- <source>Options</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Exit</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+38"/>
- <source>The Octopus is sad</source>
+ <source>X</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
- <source>Check permissions for your .ini directory:
-
-&quot;%1&quot;%2
-
-Exiting now.</source>
+ <source>Y</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+190"/>
- <source>Library load error</source>
+ <source>Z</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
- <source>One of libraries failed to load. Check installation.</source>
+ <source>Yaw</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+96"/>
- <location line="+4"/>
- <source> :: </source>
+ <source>Pitch</source>
<translation type="unfinished"></translation>
</message>
-</context>
-<context>
- <name>OptionsDialog</name>
<message>
- <location filename="../options-dialog.cpp" line="+27"/>
- <source>Joy button %1</source>
+ <source>Roll</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+3"/>
- <location line="+164"/>
- <source>None</source>
+ <source>Calibrate</source>
<translation type="unfinished"></translation>
</message>
-</context>
-<context>
- <name>UI_new_config</name>
<message>
- <location filename="../new_config.ui" line="+17"/>
- <source>Config filename</source>
+ <source>Clear calibration</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+10"/>
- <source>New file name:</source>
+ <source>1</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>keyboard_listener</name>
<message>
- <location filename="../keyboard_listener.ui" line="+14"/>
<source>Dialog</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+6"/>
<source>Press a key or close this window to remove the keybinding.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
- <name>main_window</name>
- <message>
- <location filename="../main-window.ui" line="+278"/>
- <source>Raw tracker data</source>
- <translation type="unfinished"></translation>
- </message>
+ <name>mapping_dialog</name>
<message>
- <location line="+67"/>
- <location line="+479"/>
- <source>Z</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-463"/>
- <location line="+409"/>
- <source>Pitch</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-356"/>
- <location line="+315"/>
- <source>Y</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-299"/>
- <location line="+277"/>
- <source>X</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-230"/>
- <location line="+309"/>
- <source>Roll</source>
+ <source>Mapping properties</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-293"/>
- <location line="+309"/>
<source>Yaw</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-200"/>
- <source>Game data</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+366"/>
- <source>Profile</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+32"/>
- <source>Options</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+17"/>
- <source>Mapping</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+23"/>
- <source>Tracking</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+36"/>
- <source>Start</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+22"/>
- <source>Stop</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+43"/>
- <source>Input</source>
+ <source>Max input</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+49"/>
- <location line="+62"/>
- <location line="+62"/>
- <source>🔨</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-111"/>
- <source>Output</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+62"/>
- <source>Filter</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>mapping_window</name>
- <message>
- <location filename="../mapping-window.ui" line="+26"/>
- <source>Mapping properties</source>
+ <source>Asymmetric mapping below</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+20"/>
- <source>Yaw</source>
+ <source>Pitch</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+24"/>
- <location line="+88"/>
- <location line="+88"/>
- <source>Max rotation</source>
+ <source>Max output</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-138"/>
- <location line="+88"/>
- <location line="+88"/>
- <location line="+92"/>
- <location line="+88"/>
- <location line="+88"/>
- <source>Asymmetric mapping below</source>
+ <source>180°</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-418"/>
- <source>Pitch</source>
+ <source>90°</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+88"/>
<source>Roll</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+92"/>
<source>X</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+24"/>
- <location line="+88"/>
- <location line="+88"/>
- <source>Max translation</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-112"/>
<source>Y</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+88"/>
<source>Z</source>
<translation type="unfinished"></translation>
</message>
-</context>
-<context>
- <name>new_file_dialog</name>
<message>
- <location filename="../new_file_dialog.h" line="+42"/>
- <source>File exists</source>
+ <source>%1°</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+1"/>
- <source>This file already exists. Pick another name.</source>
+ <source>%1 cm</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>options_dialog</name>
<message>
- <location filename="../options-dialog.ui" line="+20"/>
<source>Options</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+38"/>
<source>Shortcuts</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+21"/>
<source>Global shortcuts</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+21"/>
- <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Center&lt;/span&gt; - use current pose as looking perfectly forward.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Toggle&lt;/span&gt; - keep looking at same spot until next toggle keypress.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Zero&lt;/span&gt; - keep looking forward until next zero keypress.&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+66"/>
- <location line="+32"/>
- <location line="+29"/>
- <location line="+131"/>
- <location line="+51"/>
- <location line="+13"/>
- <location line="+61"/>
- <location line="+13"/>
- <location line="+29"/>
- <location line="+13"/>
- <location line="+70"/>
- <location line="+32"/>
- <location line="+13"/>
- <location line="+13"/>
- <location line="+32"/>
- <location line="+76"/>
- <location line="+51"/>
- <location line="+13"/>
<source>Bind</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-403"/>
<source>Restart tracking</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+35"/>
<source>Toggle while held</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+39"/>
<source>Toggle tracking</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-298"/>
<source>Start tracking</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+67"/>
<source>Stop tracking</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-128"/>
<source>Center</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+163"/>
<source>Zero</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+32"/>
<source>Zero while held</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-16"/>
<source>Toggle</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+528"/>
<source>Center at startup</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+34"/>
- <source>Never translate the application interface</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+26"/>
<source>Minimize to tray</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+24"/>
<source>Enable tray</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+13"/>
<source>Minimize to tray on startup when enabled</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+17"/>
- <source>Camera</source>
+ <source>Roll</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+21"/>
- <source>Use camera center as translation offset</source>
+ <source>Pitch</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+13"/>
- <source>Specify an angle to rotate position tracking. It lets the tracker avoid moving on the X and Y axes when zooming, since camera isn&apos;t mounted perfectly in front of the model, but above or below.</source>
+ <source>Yaw</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+34"/>
- <location line="+215"/>
- <location line="+247"/>
- <location line="+65"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+58"/>
- <source>Roll</source>
+ <source>Custom center pose</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-843"/>
- <location line="+139"/>
- <location line="+344"/>
- <location line="+24"/>
- <location line="+34"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+58"/>
- <source>Pitch</source>
+ <source>°</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-815"/>
- <location line="+176"/>
- <location line="+279"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+81"/>
- <location line="+55"/>
- <location line="+58"/>
- <location line="+58"/>
- <source>Yaw</source>
+ <source> cm</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-791"/>
- <source>Custom center pose</source>
+ <source>Eyes will be offset from the pivot of rotation, assumed to be the neck. It also works with relative translation disabled.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+9"/>
- <source>Alter the centered position sent to games.</source>
+ <source>Output</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+33"/>
- <location line="+69"/>
- <location line="+53"/>
- <source>°</source>
+ <source>Relative translation only</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-106"/>
- <location line="+23"/>
- <location line="+60"/>
- <location line="+1039"/>
- <location line="+22"/>
- <source> cm</source>
+ <source>Alter the centered position sent to games. Useful if the default position is too much downward or upward.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-78"/>
- <source>Eyes will be offset from the pivot of rotation, assumed to be the neck. It also works with relative translation disabled.</source>
+ <source>Relative translation</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-932"/>
- <source>Centering method</source>
+ <source>With relative mode on, translation is applied after rotation. For example, rotating +180 degrees yaw and moving backwards results in moving forward as a result of that rotation.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-329"/>
- <source>Camera angle</source>
+ <source>Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+344"/>
- <source>Try changing this if centering doesn&apos;t perform correctly for your input device.</source>
+ <source>Enabled</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+34"/>
- <source>Method</source>
+ <source>Enabled when not aiming</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+14"/>
- <source>Relative (inertial device)</source>
+ <source>Enable</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
- <source>Absolute (camera device)</source>
+ <source>Disable for X</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+37"/>
- <source>Output</source>
+ <source>Disable for Y</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+630"/>
- <location line="+15"/>
- <source>Relative translation</source>
+ <source>Disable for Z (for zoom on Z axis)</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+15"/>
- <source>With relative mode on, translation is applied after rotation. For example, rotating +180 degrees yaw and moving backwards results in moving forward as a result of that rotation.</source>
+ <source>Disable effect by yaw</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+19"/>
- <location line="+261"/>
- <source>Enable</source>
+ <source>Disable effect by pitch</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-215"/>
- <source>Disable for X</source>
+ <source>Disable effect by roll</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+16"/>
- <source>Disable for Y</source>
+ <source>X</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+16"/>
- <source>Disable for Z (for zoom on Z axis)</source>
+ <source>Y</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+13"/>
- <source>Disable effect by yaw</source>
+ <source>Z</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+13"/>
- <source>Disable effect by pitch</source>
+ <source>Disabled</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+13"/>
- <source>Disable effect by roll</source>
+ <source>Destination</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-779"/>
- <source>Output remap</source>
+ <source>Source</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+537"/>
- <source>Assign input axis to output axis.</source>
+ <source>CSV Data Logging</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-777"/>
- <location line="+320"/>
- <location line="+27"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+58"/>
- <source>X</source>
+ <source>Enable - You will be asked for a filename whenever tracking starts</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-369"/>
- <source>Invert</source>
+ <source>Neck displacement</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-303"/>
- <location line="+322"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+52"/>
- <location line="+84"/>
- <location line="+58"/>
- <location line="+58"/>
- <source>Y</source>
+ <source>Forward from center of rotation</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-654"/>
- <location line="+304"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+34"/>
- <location line="+24"/>
- <source>Z</source>
+ <source>Game detection</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-335"/>
- <location line="+58"/>
- <location line="+45"/>
- <location line="+136"/>
- <location line="+58"/>
- <location line="+58"/>
- <source>Disabled</source>
+ <source>Start tracking automatically when a game starts with selected profile, and stop when the game exits.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="-212"/>
- <source>Destination</source>
+ <source>Joy button %1</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+52"/>
- <source>Source</source>
+ <source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+249"/>
- <source>CSV Data Logging</source>
+ <source>Centering method</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+15"/>
- <source>Enable - You will be asked for a filename whenever tracking starts</source>
+ <source>Point</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+202"/>
- <source>Neck displacement</source>
+ <source>Wireless VR 360</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+52"/>
- <source>Height from center of rotation</source>
+ <source>Roll compensated</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+57"/>
- <source>Forward from center of rotation</source>
+ <source>Freeze the position returned by the tracker while this mode is active.</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+52"/>
- <location line="+12"/>
- <source>Game detection</source>
+ <source>Disable user interface localization</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+15"/>
- <source>Start tracking automatically when a game starts with selected profile, and stop when the game exits.</source>
+ <source>Tracker</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Filter</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Mouse %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Use current tracker pose as looking perfectly forward.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Keep looking forward until next zero keypress.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Axis assignment</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Pre-invert</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Post-invert</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>process_detector</name>
<message>
- <location filename="../process_widget.ui" line="+14"/>
<source>Game detector</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+34"/>
<source>Executable</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+5"/>
<source>Profile</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+44"/>
<source>+</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+20"/>
<source>-</source>
<translation type="unfinished"></translation>
</message>
<message>
- <location line="+10"/>
<source>Start profiles from game executable names in this list</source>
<translation type="unfinished"></translation>
</message>
diff --git a/gui/lang/zh_CN.ts b/gui/lang/zh_CN.ts
new file mode 100644
index 00000000..4914f7e1
--- /dev/null
+++ b/gui/lang/zh_CN.ts
@@ -0,0 +1,428 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="zh_CN">
+<context>
+ <name>BrowseButton</name>
+ <message>
+ <source>Set executable name</source>
+ <translation>选择可执行文件</translation>
+ </message>
+ <message>
+ <source>Executable (*.exe);;All Files (*)</source>
+ <translation>可执行文件 (*.exe);;所有文件 (*)</translation>
+ </message>
+</context>
+<context>
+ <name>Form</name>
+ <message>
+ <source>Press &quot;calibrate&quot; in given row to calibrate that axis. Follow instructions in the next window.
+Press &quot;clear calibration&quot; to remove any calibration data pertaining to that axis of position change or rotation.</source>
+ <translation>按 &quot;校准&quot; in given row to calibrate that axis. 按照下一个窗口的指示继续.
+按 &quot;清除校准&quot; to remove any calibration data pertaining to that axis of position change or rotation.</translation>
+ </message>
+ <message>
+ <source>X</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>Y</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>Z</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>Yaw</source>
+ <translation>航向</translation>
+ </message>
+ <message>
+ <source>Pitch</source>
+ <translation>仰俯</translation>
+ </message>
+ <message>
+ <source>Roll</source>
+ <translation>横滚</translation>
+ </message>
+ <message>
+ <source>Calibrate</source>
+ <translation>校准</translation>
+ </message>
+ <message>
+ <source>Clear calibration</source>
+ <translation>清除校准</translation>
+ </message>
+ <message>
+ <source>1</source>
+ <translation></translation>
+ </message>
+</context>
+<context>
+ <name>keyboard_listener</name>
+ <message>
+ <source>Dialog</source>
+ <translation>按键绑定对话框</translation>
+ </message>
+ <message>
+ <source>Press a key or close this window to remove the keybinding.</source>
+ <translation>按键绑定,或者关闭窗口消除绑定。</translation>
+ </message>
+</context>
+<context>
+ <name>mapping_dialog</name>
+ <message>
+ <source>Mapping properties</source>
+ <translation>映射属性</translation>
+ </message>
+ <message>
+ <source>Yaw</source>
+ <translation>航向</translation>
+ </message>
+ <message>
+ <source>Max input</source>
+ <translation>最大输入</translation>
+ </message>
+ <message>
+ <source>Asymmetric mapping below</source>
+ <translation>非对称映射</translation>
+ </message>
+ <message>
+ <source>Pitch</source>
+ <translation>仰俯</translation>
+ </message>
+ <message>
+ <source>Max output</source>
+ <translation>最大输出</translation>
+ </message>
+ <message>
+ <source>180°</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>90°</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>Roll</source>
+ <translation>横滚</translation>
+ </message>
+ <message>
+ <source>X</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>Y</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>Z</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>%1°</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>%1 cm</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>options_dialog</name>
+ <message>
+ <source>Options</source>
+ <translation>选项</translation>
+ </message>
+ <message>
+ <source>Shortcuts</source>
+ <translation>快捷键</translation>
+ </message>
+ <message>
+ <source>Global shortcuts</source>
+ <translation>全局快捷键</translation>
+ </message>
+ <message>
+ <source>Center</source>
+ <translation>回中位置</translation>
+ </message>
+ <message>
+ <source>Bind</source>
+ <translation>绑定</translation>
+ </message>
+ <message>
+ <source>Start tracking</source>
+ <translation>开始跟踪</translation>
+ </message>
+ <message>
+ <source>Stop tracking</source>
+ <translation>停止跟踪</translation>
+ </message>
+ <message>
+ <source>Zero</source>
+ <translation>归零位置</translation>
+ </message>
+ <message>
+ <source>Toggle</source>
+ <translation>盯着看</translation>
+ </message>
+ <message>
+ <source>Zero while held</source>
+ <translation>长按归零</translation>
+ </message>
+ <message>
+ <source>Restart tracking</source>
+ <translation>重新开始跟踪</translation>
+ </message>
+ <message>
+ <source>Toggle while held</source>
+ <translation>长按盯着看</translation>
+ </message>
+ <message>
+ <source>Toggle tracking</source>
+ <translation>开关跟踪</translation>
+ </message>
+ <message>
+ <source>Center at startup</source>
+ <translation>启动时回中</translation>
+ </message>
+ <message>
+ <source>Disable user interface localization</source>
+ <translation>关闭翻译界面</translation>
+ </message>
+ <message>
+ <source>Minimize to tray</source>
+ <translation>最小化到任务栏</translation>
+ </message>
+ <message>
+ <source>Enable tray</source>
+ <translation>开启任务栏图标</translation>
+ </message>
+ <message>
+ <source>Minimize to tray on startup when enabled</source>
+ <translation>启动时最小化到任务栏</translation>
+ </message>
+ <message>
+ <source>Output</source>
+ <translation>输出</translation>
+ </message>
+ <message>
+ <source>X</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>Y</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>Z</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>Yaw</source>
+ <translation>航向</translation>
+ </message>
+ <message>
+ <source>Pitch</source>
+ <translation>仰俯</translation>
+ </message>
+ <message>
+ <source>Roll</source>
+ <translation>横滚</translation>
+ </message>
+ <message>
+ <source>Disabled</source>
+ <translation>不启用</translation>
+ </message>
+ <message>
+ <source>Relative translation only</source>
+ <translation>相对位移</translation>
+ </message>
+ <message>
+ <source>Source</source>
+ <translation>源头</translation>
+ </message>
+ <message>
+ <source>Destination</source>
+ <translation>目标</translation>
+ </message>
+ <message>
+ <source>Custom center pose</source>
+ <translation>定制回中姿态</translation>
+ </message>
+ <message>
+ <source>Alter the centered position sent to games. Useful if the default position is too much downward or upward.</source>
+ <translation>改变发送到游戏的回中位置. 对于默认位置有明显偏移的很有用.</translation>
+ </message>
+ <message>
+ <source>°</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source> cm</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>CSV Data Logging</source>
+ <translation>CSV数据记录</translation>
+ </message>
+ <message>
+ <source>Enable - You will be asked for a filename whenever tracking starts</source>
+ <translation>启用 - 当跟踪开始时会被要求输入文件名</translation>
+ </message>
+ <message>
+ <source>Relative translation</source>
+ <translation>相对位移</translation>
+ </message>
+ <message>
+ <source>With relative mode on, translation is applied after rotation. For example, rotating +180 degrees yaw and moving backwards results in moving forward as a result of that rotation.</source>
+ <translation>相对位移开启时,位移会被后考虑.例如,航向旋转+180度,然后后退的结果是,直接向前移动.</translation>
+ </message>
+ <message>
+ <source>Mode</source>
+ <translation>模式</translation>
+ </message>
+ <message>
+ <source>Enabled</source>
+ <translation>启用</translation>
+ </message>
+ <message>
+ <source>Enabled when not aiming</source>
+ <translation>没有朝向它时启用</translation>
+ </message>
+ <message>
+ <source>Disable for Y</source>
+ <translation>Y轴不启用</translation>
+ </message>
+ <message>
+ <source>Disable for X</source>
+ <translation>X轴不启用</translation>
+ </message>
+ <message>
+ <source>Disable effect by roll</source>
+ <translation>横滚时,不启用</translation>
+ </message>
+ <message>
+ <source>Disable for Z (for zoom on Z axis)</source>
+ <translation>Z轴不启用(用于Z轴放大)</translation>
+ </message>
+ <message>
+ <source>Disable effect by pitch</source>
+ <translation>仰俯不启用</translation>
+ </message>
+ <message>
+ <source>Disable effect by yaw</source>
+ <translation>航向不启用</translation>
+ </message>
+ <message>
+ <source>Neck displacement</source>
+ <translation>脖子的偏移</translation>
+ </message>
+ <message>
+ <source>Eyes will be offset from the pivot of rotation, assumed to be the neck. It also works with relative translation disabled.</source>
+ <translation>眼睛的移动支点其实是脖子。本功能在相对位移功能不开启的情况下也生效。</translation>
+ </message>
+ <message>
+ <source>Enable</source>
+ <translation>启用</translation>
+ </message>
+ <message>
+ <source>Forward from center of rotation</source>
+ <translation>向前偏移</translation>
+ </message>
+ <message>
+ <source>Game detection</source>
+ <translation>游戏侦测</translation>
+ </message>
+ <message>
+ <source>Start tracking automatically when a game starts with selected profile, and stop when the game exits.</source>
+ <translation>当游戏开始运行时自动开始跟踪,游戏退出时停止跟踪。</translation>
+ </message>
+ <message>
+ <source>Joy button %1</source>
+ <translation>游戏手柄按钮 %1</translation>
+ </message>
+ <message>
+ <source>None</source>
+ <translation>空</translation>
+ </message>
+ <message>
+ <source>Centering method</source>
+ <translation>回中方法</translation>
+ </message>
+ <message>
+ <source>Point</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Wireless VR 360</source>
+ <translation type="unfinished">无线 VR 360</translation>
+ </message>
+ <message>
+ <source>Roll compensated</source>
+ <translation>滚转补偿</translation>
+ </message>
+ <message>
+ <source>Freeze the position returned by the tracker while this mode is active.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Tracker</source>
+ <translation>输入</translation>
+ </message>
+ <message>
+ <source>Filter</source>
+ <translation>过滤器</translation>
+ </message>
+ <message>
+ <source>Mouse %1</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Use current tracker pose as looking perfectly forward.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Keep looking forward until next zero keypress.</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Axis assignment</source>
+ <translation>输出重新映射</translation>
+ </message>
+ <message>
+ <source>Pre-invert</source>
+ <translation type="unfinished"></translation>
+ </message>
+ <message>
+ <source>Post-invert</source>
+ <translation type="unfinished"></translation>
+ </message>
+</context>
+<context>
+ <name>process_detector</name>
+ <message>
+ <source>Game detector</source>
+ <translation>游戏侦测</translation>
+ </message>
+ <message>
+ <source>Start profiles from game executable names in this list</source>
+ <translation>运行以下列表可执行文件时启用对应的配置文件</translation>
+ </message>
+ <message>
+ <source>Executable</source>
+ <translation>可执行文件</translation>
+ </message>
+ <message>
+ <source>Profile</source>
+ <translation>配置</translation>
+ </message>
+ <message>
+ <source>+</source>
+ <translation></translation>
+ </message>
+ <message>
+ <source>-</source>
+ <translation></translation>
+ </message>
+</context>
+</TS>
diff --git a/gui/main-window.cpp b/gui/main-window.cpp
deleted file mode 100644
index fb036721..00000000
--- a/gui/main-window.cpp
+++ /dev/null
@@ -1,849 +0,0 @@
-/* Copyright (c) 2013-2016, 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 "main-window.hpp"
-#include "logic/tracker.h"
-#include "options/options.hpp"
-#include "opentrack-library-path.h"
-#include "new_file_dialog.h"
-#include "migration/migration.hpp"
-#include <QFile>
-#include <QFileDialog>
-#include <QDesktopServices>
-#include <QCoreApplication>
-#include <QApplication>
-#include <QIcon>
-#include <QString>
-#include <QChar>
-#include <QSignalBlocker>
-
-#ifdef _WIN32
-# include <windows.h>
-#endif
-
-extern "C" const char* opentrack_version;
-
-MainWindow::MainWindow() :
- State(OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH),
- pose_update_timer(this),
- kbd_quit(QKeySequence("Ctrl+Q"), this),
- menu_action_header(&tray_menu),
- menu_action_show(&tray_menu),
- menu_action_exit(&tray_menu),
- menu_action_tracker(&tray_menu),
- menu_action_filter(&tray_menu),
- menu_action_proto(&tray_menu),
- menu_action_options(&tray_menu),
- menu_action_mappings(&tray_menu)
-{
- ui.setupUi(this);
-
- {
- setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
- adjustSize();
- setFixedSize(size());
- setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | windowFlags());
- }
-
- updateButtonState(false, false);
-
- if (group::ini_directory().size() == 0)
- {
- die_on_config_not_writable();
- return;
- }
-
- if (!refresh_config_list())
- return;
-
- connect(ui.btnEditCurves, SIGNAL(clicked()), this, SLOT(showCurveConfiguration()));
- connect(ui.btnShortcuts, SIGNAL(clicked()), this, SLOT(show_options_dialog()));
- connect(ui.btnShowEngineControls, SIGNAL(clicked()), this, SLOT(showTrackerSettings()));
- connect(ui.btnShowServerControls, SIGNAL(clicked()), this, SLOT(showProtocolSettings()));
- connect(ui.btnShowFilterControls, SIGNAL(clicked()), this, SLOT(showFilterSettings()));
- connect(ui.btnStartTracker, SIGNAL(clicked()), this, SLOT(startTracker()));
- connect(ui.btnStopTracker, SIGNAL(clicked()), this, SLOT(stopTracker()));
- connect(ui.iconcomboProfile, &QComboBox::currentTextChanged, this, [&](const QString& x) { set_profile(x); });
-
- // fill dylib comboboxen
- {
- modules.filters().push_front(std::make_shared<dylib>("", dylib::Filter));
-
- for (mem<dylib>& x : modules.trackers())
- ui.iconcomboTrackerSource->addItem(x->icon, x->name);
-
- for (mem<dylib>& x : modules.protocols())
- ui.iconcomboProtocol->addItem(x->icon, x->name);
-
- for (mem<dylib>& x : modules.filters())
- ui.iconcomboFilter->addItem(x->icon, x->name);
- }
-
- // timers
- connect(&config_list_timer, &QTimer::timeout, this, [this]() { refresh_config_list(); });
- connect(&pose_update_timer, SIGNAL(timeout()), this, SLOT(showHeadPose()));
- connect(&det_timer, SIGNAL(timeout()), this, SLOT(maybe_start_profile_from_executable()));
-
- // ctrl+q exits
- connect(&kbd_quit, SIGNAL(activated()), this, SLOT(exit()));
-
- // profile menu
- {
- profile_menu.addAction(tr("Create new empty config"), this, SLOT(make_empty_config()));
- profile_menu.addAction(tr("Create new copied config"), this, SLOT(make_copied_config()));
- profile_menu.addAction(tr("Open configuration directory"), this, SLOT(open_config_directory()));
- ui.profile_button->setMenu(&profile_menu);
- }
-
- if (!progn(
- const QString cur = group::ini_filename();
- if (is_config_listed(cur))
- return set_profile(cur);
- else
- return set_profile(OPENTRACK_DEFAULT_CONFIG);
- ))
- return;
-
- // only tie and connect main screen options after migrations are done
- // below is fine, set_profile() is called already
-
- // dylibs
- {
- connect(&m.tracker_dll,
- static_cast<void(base_value::*)(const QString&) const>(&base_value::valueChanged),
- this,
- [&](const QString&) { if (pTrackerDialog) pTrackerDialog = nullptr; save_modules(); });
-
- connect(&m.protocol_dll,
- static_cast<void(base_value::*)(const QString&) const>(&base_value::valueChanged),
- this,
- [&](const QString&) { if (pProtocolDialog) pProtocolDialog = nullptr; save_modules(); });
-
- connect(&m.filter_dll,
- static_cast<void(base_value::*)(const QString&) const>(&base_value::valueChanged),
- this,
- [&](const QString&) { if (pFilterDialog) pFilterDialog = nullptr; save_modules(); });
- }
-
- tie_setting(m.tracker_dll, ui.iconcomboTrackerSource);
- tie_setting(m.protocol_dll, ui.iconcomboProtocol);
- tie_setting(m.filter_dll, ui.iconcomboFilter);
-
- connect(this, &MainWindow::emit_start_tracker,
- this, [&]() -> void { qDebug() << "start tracker"; startTracker(); },
- Qt::QueuedConnection);
-
- connect(this, &MainWindow::emit_stop_tracker,
- this, [&]() -> void { qDebug() << "stop tracker"; stopTracker(); },
- Qt::QueuedConnection);
-
- connect(this, &MainWindow::emit_toggle_tracker,
- this, [&]() -> void { qDebug() << "toggle tracker"; if (work) stopTracker(); else startTracker(); },
- Qt::QueuedConnection);
-
- connect(this, &MainWindow::emit_restart_tracker,
- this, [&]() -> void { qDebug() << "restart tracker"; stopTracker(); startTracker(); },
- Qt::QueuedConnection);
-
- // tray
- {
- init_tray_menu();
-
- connect(&s.tray_enabled,
- static_cast<void (base_value::*)(bool) const>(&base_value::valueChanged),
- this,
- [&](bool) { ensure_tray(); });
- ensure_tray();
- }
-
- register_shortcuts();
- det_timer.start(1000);
- config_list_timer.start(1000 * 5);
- kbd_quit.setEnabled(true);
-}
-
-void MainWindow::init_tray_menu()
-{
- tray_menu.clear();
-
- QString display_name(opentrack_version);
- if (display_name.startsWith("opentrack-"))
- {
- display_name = tr("opentrack") + " " + display_name.mid(sizeof("opentrack-") - 1);
- }
- if (display_name.endsWith("-DEBUG"))
- display_name.replace(display_name.size() - int(sizeof("DEBUG")), display_name.size(), tr(" (debug)"));
-
- menu_action_header.setEnabled(false);
- menu_action_header.setText(display_name);
- menu_action_header.setIcon(QIcon(":/images/facetracknoir.png"));
- tray_menu.addAction(&menu_action_header);
-
- menu_action_show.setIconVisibleInMenu(true);
- menu_action_show.setText(isHidden() ? tr("Show the Octopus") : tr("Hide the Octopus"));
- menu_action_show.setIcon(QIcon(":/images/facetracknoir.png"));
- QObject::connect(&menu_action_show, &QAction::triggered, this, [&]() { toggle_restore_from_tray(QSystemTrayIcon::Trigger); });
- tray_menu.addAction(&menu_action_show);
-
- tray_menu.addSeparator();
-
- menu_action_tracker.setText(tr("Tracker settings"));
- menu_action_tracker.setIcon(QIcon(":/images/tools.png"));
- QObject::connect(&menu_action_tracker, &QAction::triggered, this, &MainWindow::showTrackerSettings);
- tray_menu.addAction(&menu_action_tracker);
-
- menu_action_filter.setText(tr("Filter settings"));
- menu_action_filter.setIcon(QIcon(":/images/filter-16.png"));
- QObject::connect(&menu_action_filter, &QAction::triggered, this, &MainWindow::showFilterSettings);
- tray_menu.addAction(&menu_action_filter);
-
- menu_action_proto.setText(tr("Protocol settings"));
- menu_action_proto.setIcon(QIcon(":/images/settings16.png"));
- QObject::connect(&menu_action_proto, &QAction::triggered, this, &MainWindow::showProtocolSettings);
- tray_menu.addAction(&menu_action_proto);
-
- tray_menu.addSeparator();
-
- menu_action_mappings.setIcon(QIcon(":/images/curves.png"));
- menu_action_mappings.setText(tr("Mappings"));
- QObject::connect(&menu_action_mappings, &QAction::triggered, this, &MainWindow::showCurveConfiguration);
- tray_menu.addAction(&menu_action_mappings);
-
- menu_action_options.setIcon(QIcon(":/images/tools.png"));
- menu_action_options.setText(tr("Options"));
- QObject::connect(&menu_action_options, &QAction::triggered, this, &MainWindow::show_options_dialog);
- tray_menu.addAction(&menu_action_options);
-
- tray_menu.addSeparator();
-
- menu_action_exit.setText(tr("Exit"));
- QObject::connect(&menu_action_exit, &QAction::triggered, this, &MainWindow::exit);
- tray_menu.addAction(&menu_action_exit);
-}
-
-void MainWindow::register_shortcuts()
-{
- using t_key = Shortcuts::t_key;
- using t_keys = Shortcuts::t_keys;
-
- t_keys keys
- {
- t_key(s.key_start_tracking1, [&](bool) -> void { emit_start_tracker(); }, true),
- t_key(s.key_start_tracking2, [&](bool) -> void { emit_start_tracker(); }, true),
-
- t_key(s.key_stop_tracking1, [&](bool) -> void { emit_stop_tracker(); }, true),
- t_key(s.key_stop_tracking2, [&](bool) -> void { emit_stop_tracker(); }, true),
-
- t_key(s.key_toggle_tracking1, [&](bool) -> void { emit_toggle_tracker(); }, true),
- t_key(s.key_toggle_tracking2, [&](bool) -> void { emit_toggle_tracker(); }, true),
-
- t_key(s.key_restart_tracking1, [&](bool) -> void { emit_restart_tracker(); }, true),
- t_key(s.key_restart_tracking2, [&](bool) -> void { emit_restart_tracker(); }, true),
- };
-
- global_shortcuts.reload(keys);
-
- if (work)
- work->reload_shortcuts();
-}
-
-void MainWindow::die_on_config_not_writable()
-{
- stopTracker();
-
- static const QString pad(16, QChar(' '));
-
- QMessageBox::critical(this,
- tr("The Octopus is sad"),
- tr("Check permissions for your .ini directory:\n\n\"%1\"%2\n\nExiting now.").arg(group::ini_directory()).arg(pad),
- QMessageBox::Close, QMessageBox::NoButton);
-
- // signals main() to short-circuit
- if (!isVisible())
- setEnabled(false);
-
- setVisible(false);
-
- // tray related
- qApp->setQuitOnLastWindowClosed(true);
-
- close();
-}
-
-bool MainWindow::maybe_die_on_config_not_writable(const QString& current, QStringList* ini_list_)
-{
- const bool open = QFile(group::ini_combine(current)).open(QFile::ReadWrite);
- const QStringList ini_list = group::ini_list();
-
- if (!ini_list.contains(current) || !open)
- {
- die_on_config_not_writable();
- return true;
- }
-
- if (ini_list_ != nullptr)
- *ini_list_ = ini_list;
-
- return false;
-}
-
-bool MainWindow::get_new_config_name_from_dialog(QString& ret)
-{
- new_file_dialog dlg;
- dlg.exec();
- return dlg.is_ok(ret);
-}
-
-MainWindow::~MainWindow()
-{
- if (tray)
- tray->hide();
- stopTracker();
-}
-
-void MainWindow::set_working_directory()
-{
- QDir::setCurrent(OPENTRACK_BASE_PATH);
-}
-
-void MainWindow::save_modules()
-{
- m.b->save();
-}
-
-void MainWindow::make_empty_config()
-{
- QString name;
- if (get_new_config_name_from_dialog(name))
- {
- QFile(group::ini_combine(name)).open(QFile::ReadWrite);
-
- if (!refresh_config_list())
- return;
-
- if (is_config_listed(name))
- {
- QSignalBlocker q(ui.iconcomboProfile);
-
- if (!set_profile(name))
- return;
- mark_config_as_not_needing_migration();
- }
- }
-}
-
-void MainWindow::make_copied_config()
-{
- const QString cur = group::ini_pathname();
- QString name;
- if (cur != "" && get_new_config_name_from_dialog(name))
- {
- const QString new_name = group::ini_combine(name);
- (void) QFile::remove(new_name);
- QFile::copy(cur, new_name);
-
- if (!refresh_config_list())
- return;
-
- if (is_config_listed(name))
- {
- QSignalBlocker q(ui.iconcomboProfile);
-
- if (!set_profile(name))
- return;
- mark_config_as_not_needing_migration();
- }
- }
-
-}
-
-void MainWindow::open_config_directory()
-{
- QDesktopServices::openUrl("file:///" + QDir::toNativeSeparators(group::ini_directory()));
-}
-
-bool MainWindow::refresh_config_list()
-{
- if (work)
- return true;
-
- QStringList ini_list = group::ini_list();
-
- // check for sameness
- const bool exact_same = ini_list.size() > 0 && progn(
- if (ini_list.size() == ui.iconcomboProfile->count())
- {
- const int sz = ini_list.size();
- for (int i = 0; i < sz; i++)
- {
- if (ini_list[i] != ui.iconcomboProfile->itemText(i))
- return false;
- }
- return true;
- }
-
- return false;
- );
-
- QString current = group::ini_filename();
-
- if (!ini_list.contains(current))
- current = OPENTRACK_DEFAULT_CONFIG_Q;
-
- if (maybe_die_on_config_not_writable(current, &ini_list))
- return false;
-
- if (exact_same)
- return true;
-
- const QIcon icon(":/images/settings16.png");
-
- QSignalBlocker l(ui.iconcomboProfile);
-
- ui.iconcomboProfile->clear();
- ui.iconcomboProfile->addItems(ini_list);
-
- for (int i = 0; i < ini_list.size(); i++)
- ui.iconcomboProfile->setItemIcon(i, icon);
-
- ui.iconcomboProfile->setCurrentText(current);
-
- return true;
-}
-
-void MainWindow::updateButtonState(bool running, bool inertialp)
-{
- bool not_running = !running;
- ui.iconcomboProfile->setEnabled(not_running);
- ui.btnStartTracker->setEnabled(not_running);
- ui.btnStopTracker->setEnabled(running);
- ui.iconcomboProtocol->setEnabled(not_running);
- ui.iconcomboFilter->setEnabled(not_running);
- ui.iconcomboTrackerSource->setEnabled(not_running);
- ui.profile_button->setEnabled(not_running);
- ui.video_frame_label->setVisible(not_running || inertialp);
- if(not_running)
- {
- ui.video_frame_label->setPixmap(QPixmap(":/images/tracking-not-started.png"));
- }
- else {
- ui.video_frame_label->setPixmap(QPixmap(":/images/no-feed.png"));
- }
-}
-
-void MainWindow::startTracker()
-{
- if (work)
- return;
-
- {
- double p[6] = {0,0,0, 0,0,0};
- display_pose(p, p);
- }
-
- work = std::make_shared<Work>(pose, ui.video_frame, current_tracker(), current_protocol(), current_filter());
-
- if (!work->is_ok())
- {
- QMessageBox::warning(this, tr("Library load error"),
- tr("One of libraries failed to load. Check installation."),
- QMessageBox::Ok,
- QMessageBox::NoButton);
- work = nullptr;
- return;
- }
-
- if (pTrackerDialog)
- pTrackerDialog->register_tracker(work->libs.pTracker.get());
-
- if (pFilterDialog)
- pFilterDialog->register_filter(work->libs.pFilter.get());
-
- if (pProtocolDialog)
- pProtocolDialog->register_protocol(work->libs.pProtocol.get());
-
- pose_update_timer.start(50);
-
- // NB check valid since SelectedLibraries ctor called
- // trackers take care of layout state updates
- const bool is_inertial = ui.video_frame->layout() == nullptr;
- updateButtonState(true, is_inertial);
-
- ui.btnStopTracker->setFocus();
-}
-
-void MainWindow::stopTracker()
-{
- if (!work)
- return;
-
- opts::set_teardown_flag(true); // XXX hack -sh 20160926
-
- pose_update_timer.stop();
- ui.pose_display->rotate_sync(0,0,0, 0,0,0);
-
- if (pTrackerDialog)
- pTrackerDialog->unregister_tracker();
-
- if (pProtocolDialog)
- pProtocolDialog->unregister_protocol();
-
- if (pFilterDialog)
- pFilterDialog->unregister_filter();
-
- work = nullptr;
-
- {
- double p[6] = {0,0,0, 0,0,0};
- display_pose(p, p);
- }
-
- opts::set_teardown_flag(false); // XXX hack -sh 20160926
-
- updateButtonState(false, false);
- set_title();
- ui.btnStartTracker->setFocus();
-}
-
-void MainWindow::display_pose(const double *mapped, const double *raw)
-{
- ui.pose_display->rotate_async(mapped[Yaw], mapped[Pitch], -mapped[Roll],
- mapped[TX], mapped[TY], mapped[TZ]);
-
- if (mapping_widget)
- mapping_widget->update();
-
- QLCDNumber* raw_[] = {
- ui.raw_x, ui.raw_y, ui.raw_z,
- ui.raw_yaw, ui.raw_pitch, ui.raw_roll,
- };
-
- QLCDNumber* mapped_[] = {
- ui.pose_x, ui.pose_y, ui.pose_z,
- ui.pose_yaw, ui.pose_pitch, ui.pose_roll,
- };
-
- for (int k = 0; k < 6; k++)
- {
- raw_[k]->display(iround(raw[k]));
- mapped_[k]->display(iround(mapped[k]));
- }
-
- QString game_title;
- if (work && work->libs.pProtocol)
- game_title = work->libs.pProtocol->game_name();
- set_title(game_title);
-}
-
-void MainWindow::set_title(const QString& game_title_)
-{
- QString game_title;
- if (game_title_ != "")
- game_title = tr(" :: ") + game_title_;
- QString current = group::ini_filename();
- QString version(opentrack_version);
- version = tr("opentrack") + " " + version.mid(sizeof("opentrack-") - 1);
- setWindowTitle(version + tr(" :: ") + current + game_title);
-}
-
-void MainWindow::showHeadPose()
-{
- double mapped[6], raw[6];
-
- work->tracker->get_raw_and_mapped_poses(mapped, raw);
-
- display_pose(mapped, raw);
-}
-
-template<typename t, typename F>
-bool MainWindow::mk_window_common(ptr<t>& d, F&& ctor)
-{
- if (d)
- {
- d->show();
- d->raise();
-
- return false;
- }
- else if ((d = ptr<t>(ctor())))
- {
- QEventLoop e(d.get());
-
- e.processEvents(); d->adjustSize(); e.processEvents();
-
- // drain the event loop to reflow properly
- d->setWindowFlags(Qt::MSWindowsFixedSizeDialogHint | d->windowFlags()); e.processEvents();
- d->show();
-
- return true;
- }
-
- return false;
-}
-
-template<typename t, typename... Args>
-inline bool MainWindow::mk_window(ptr<t>& place, Args&&... params)
-{
- return mk_window_common(place, [&]() { return new t(std::forward<Args>(params)...); });
-}
-
-template<typename t>
-bool MainWindow::mk_dialog(mem<dylib> lib, ptr<t>& d)
-{
- const bool just_created = mk_window_common(d, [&]() -> t* {
- if (lib && lib->Dialog)
- return reinterpret_cast<t*>(lib->Dialog());
- return nullptr;
- });
-
- if (just_created)
- {
- using plugin_api::detail::BaseDialog;
- QObject::connect(static_cast<BaseDialog*>(d.get()), &BaseDialog::closing,
- this, [&d]() { d = nullptr; },
- Qt::QueuedConnection);
- }
-
- return just_created;
-}
-
-void MainWindow::showTrackerSettings()
-{
- if (mk_dialog(current_tracker(), pTrackerDialog) && work && work->libs.pTracker)
- pTrackerDialog->register_tracker(work->libs.pTracker.get());
-}
-
-void MainWindow::showProtocolSettings()
-{
- if (mk_dialog(current_protocol(), pProtocolDialog) && work && work->libs.pProtocol)
- pProtocolDialog->register_protocol(work->libs.pProtocol.get());
-}
-
-void MainWindow::showFilterSettings()
-{
- if (mk_dialog(current_filter(), pFilterDialog) && work && work->libs.pFilter)
- pFilterDialog->register_filter(work->libs.pFilter.get());
-}
-
-void MainWindow::show_options_dialog()
-{
- if (mk_window(options_widget, [&](bool flag) -> void { set_keys_enabled(!flag); }))
- {
- connect(options_widget.get(), &OptionsDialog::closing, this, &MainWindow::register_shortcuts);
- }
-}
-
-void MainWindow::showCurveConfiguration()
-{
- mk_window(mapping_widget, pose);
-}
-
-void MainWindow::exit()
-{
- QCoreApplication::exit(0);
-}
-
-bool MainWindow::set_profile(const QString& new_name_)
-{
- if (!refresh_config_list())
- return false;
-
- QString new_name = new_name_;
-
- if (!is_config_listed(new_name))
- new_name = OPENTRACK_DEFAULT_CONFIG_Q;
-
- if (maybe_die_on_config_not_writable(new_name, nullptr))
- return false;
-
- ui.iconcomboProfile->setCurrentText(new_name);
- set_profile_in_registry(new_name);
-
- // migrations are for config layout changes and other user-visible
- // incompatibilities in future versions
- run_migrations();
-
- set_title();
- options::detail::bundler::refresh_all_bundles();
-
- return true;
-}
-
-void MainWindow::ensure_tray()
-{
- if (!QSystemTrayIcon::isSystemTrayAvailable())
- return;
-
- if (s.tray_enabled)
- {
- if (!tray)
- {
- tray = std::make_unique<QSystemTrayIcon>(this);
- tray->setIcon(QIcon(":/images/facetracknoir.png"));
- tray->setContextMenu(&tray_menu);
- tray->show();
-
- connect(tray.get(),
- &QSystemTrayIcon::activated,
- this,
- &MainWindow::toggle_restore_from_tray);
- }
- }
- else
- {
- const bool is_hidden = isHidden() || !isVisible();
-
- if (is_hidden)
- {
- show();
- setVisible(true);
-
- raise(); // for OSX
- activateWindow(); // for Windows
- }
-
- if (tray)
- tray->hide();
- tray = nullptr;
- }
-}
-
-void MainWindow::toggle_restore_from_tray(QSystemTrayIcon::ActivationReason e)
-{
- if (progn(
- switch (e)
- {
- // if we enable double click also then it causes
- // toggle back to the original state
- //case QSystemTrayIcon::DoubleClick:
- case QSystemTrayIcon::Trigger: // single click
- return false;
- default:
- return true;
- }
- ))
- {
- return;
- }
-
- ensure_tray();
-
- const bool is_minimized = isHidden() || !is_tray_enabled();
-
- menu_action_show.setText(!isHidden() ? tr("Show the Octopus") : tr("Hide the Octopus"));
-
- setVisible(is_minimized);
- setHidden(!is_minimized);
-
- setWindowState(progn(
- using ws = Qt::WindowStates;
- if (is_minimized)
- return ws(windowState() & (~Qt::WindowMinimized));
- else
- return ws(Qt::WindowNoState);
- ));
-
- if (is_minimized)
- {
- raise(); // for OSX
- activateWindow(); // for Windows
- }
- else
- {
- lower();
- clearFocus();
- }
-}
-
-bool MainWindow::maybe_hide_to_tray(QEvent* e)
-{
- if (e->type() == QEvent::WindowStateChange &&
- (windowState() & Qt::WindowMinimized) &&
- is_tray_enabled())
- {
- e->accept();
- ensure_tray();
- hide();
-
- return true;
- }
-
- return false;
-}
-
-void MainWindow::maybe_start_profile_from_executable()
-{
- if (!work)
- {
- QString prof;
- if (det.config_to_start(prof))
- {
- ui.iconcomboProfile->setCurrentText(prof);
- startTracker();
- }
- }
- else
- {
- if (det.should_stop())
- stopTracker();
- }
-}
-
-void MainWindow::set_keys_enabled(bool flag)
-{
- if (!flag)
- {
- if (work)
- work->sc->reload({});
- global_shortcuts.reload({});
- }
- else
- {
- register_shortcuts();
- }
-}
-
-bool MainWindow::is_config_listed(const QString& name)
-{
- const int sz = ui.iconcomboProfile->count();
- for (int i = 0; i < sz; i++)
- if (ui.iconcomboProfile->itemText(i) == name)
- return true;
- return false;
-}
-
-void MainWindow::changeEvent(QEvent* e)
-{
- if (maybe_hide_to_tray(e))
- e->accept();
- else
- {
- QMainWindow::changeEvent(e);
- }
-}
-
-void MainWindow::closeEvent(QCloseEvent*)
-{
- exit();
-}
-
-bool MainWindow::is_tray_enabled()
-{
- return s.tray_enabled && QSystemTrayIcon::isSystemTrayAvailable();
-}
-
-bool MainWindow::start_in_tray()
-{
- return s.tray_enabled && s.tray_start && QSystemTrayIcon::isSystemTrayAvailable();
-}
-
-void MainWindow::set_profile_in_registry(const QString &profile)
-{
- QSettings settings(OPENTRACK_ORG);
- settings.setValue(OPENTRACK_CONFIG_FILENAME_KEY, profile);
-}
diff --git a/gui/main-window.hpp b/gui/main-window.hpp
deleted file mode 100644
index 71e372f0..00000000
--- a/gui/main-window.hpp
+++ /dev/null
@@ -1,149 +0,0 @@
-/* Copyright (c) 2013-2016, 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.
- */
-
-#pragma once
-
-#include "api/plugin-support.hpp"
-#include "mapping-window.hpp"
-#include "options-dialog.hpp"
-#include "process_detector.h"
-#include "logic/main-settings.hpp"
-#include "logic/tracker.h"
-#include "logic/shortcuts.h"
-#include "logic/work.hpp"
-#include "logic/state.hpp"
-#include "options/options.hpp"
-
-#include <QObject>
-#include <QWidget>
-#include <QMainWindow>
-#include <QKeySequence>
-#include <QShortcut>
-#include <QPixmap>
-#include <QTimer>
-#include <QSystemTrayIcon>
-#include <QString>
-#include <QMenu>
-#include <QAction>
-#include <QEvent>
-#include <QCloseEvent>
-
-#include <vector>
-#include <tuple>
-#include <memory>
-
-#include "ui_main-window.h"
-
-using namespace options;
-
-class MainWindow : public QMainWindow, private State
-{
- Q_OBJECT
-
- Ui::main_window ui;
-
- Shortcuts global_shortcuts;
- module_settings m;
- ptr<QSystemTrayIcon> tray;
- QMenu tray_menu;
- QTimer pose_update_timer;
- QTimer det_timer;
- QTimer config_list_timer;
- ptr<OptionsDialog> options_widget;
- ptr<MapWidget> mapping_widget;
- QShortcut kbd_quit;
- ptr<IFilterDialog> pFilterDialog;
- ptr<IProtocolDialog> pProtocolDialog;
- ptr<ITrackerDialog> pTrackerDialog;
-
- process_detector_worker det;
- QMenu profile_menu;
-
- QAction menu_action_header, menu_action_show, menu_action_exit,
- menu_action_tracker, menu_action_filter, menu_action_proto,
- menu_action_options, menu_action_mappings;
-
- mem<dylib> current_tracker()
- {
- return modules.trackers().value(ui.iconcomboTrackerSource->currentIndex(), nullptr);
- }
- mem<dylib> current_protocol()
- {
- return modules.protocols().value(ui.iconcomboProtocol->currentIndex(), nullptr);
- }
- mem<dylib> current_filter()
- {
- return modules.filters().value(ui.iconcomboFilter->currentIndex(), nullptr);
- }
-
- void updateButtonState(bool running, bool inertialp);
- void display_pose(const double* mapped, const double* raw);
- void ensure_tray();
- void set_title(const QString& game_title = QStringLiteral(""));
- static bool get_new_config_name_from_dialog(QString &ret);
- void set_profile_in_registry(const QString& profile);
- void register_shortcuts();
- void set_keys_enabled(bool flag);
- bool is_config_listed(const QString& name);
-
- void init_tray_menu();
-
- void changeEvent(QEvent* e) override;
- void closeEvent(QCloseEvent*) override;
- bool maybe_hide_to_tray(QEvent* e);
-
- // only use in impl file since no definition in header!
- template<typename t>
- bool mk_dialog(mem<dylib> lib, ptr<t>& d);
-
- // idem
- template<typename t, typename... Args>
- inline bool mk_window(ptr<t>& place, Args&&... params);
-
- // idem
- template<typename t, typename F>
- bool mk_window_common(ptr<t>& d, F&& ctor);
-
-private slots:
- void save_modules();
- void exit();
- bool set_profile(const QString& new_name);
-
- void showTrackerSettings();
- void showProtocolSettings();
- void showFilterSettings();
- void show_options_dialog();
- void showCurveConfiguration();
- void showHeadPose();
-
- void maybe_start_profile_from_executable();
-
- void make_empty_config();
- void make_copied_config();
- void open_config_directory();
- bool refresh_config_list();
-
- void startTracker();
- void stopTracker();
-
- void toggle_restore_from_tray(QSystemTrayIcon::ActivationReason e);
-
-signals:
- void emit_start_tracker();
- void emit_stop_tracker();
- void emit_toggle_tracker();
- void emit_restart_tracker();
-public:
- MainWindow();
- ~MainWindow();
- static void set_working_directory();
- bool maybe_die_on_config_not_writable(const QString& current, QStringList* ini_list);
- void die_on_config_not_writable();
- bool is_tray_enabled();
- bool start_in_tray();
-};
diff --git a/gui/main-window.ui b/gui/main-window.ui
deleted file mode 100644
index 2b1d5671..00000000
--- a/gui/main-window.ui
+++ /dev/null
@@ -1,1373 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <author>Lovecraftian Octopus</author>
- <class>main_window</class>
- <widget class="QMainWindow" name="main_window">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>652</width>
- <height>500</height>
- </rect>
- </property>
- <property name="windowIcon">
- <iconset resource="opentrack-res.qrc">
- <normaloff>:/images/facetracknoir.png</normaloff>:/images/facetracknoir.png</iconset>
- </property>
- <property name="styleSheet">
- <string notr="true">#video_feed { border: 0; }
-</string>
- </property>
- <widget class="QWidget" name="content">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>6</number>
- </property>
- <property name="bottomMargin">
- <number>6</number>
- </property>
- <item>
- <widget class="QFrame" name="frame">
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="lineWidth">
- <number>0</number>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_5">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QFrame" name="top">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>4</number>
- </property>
- <item>
- <widget class="QFrame" name="video_feed">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>320</width>
- <height>240</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>320</width>
- <height>240</height>
- </size>
- </property>
- <widget class="QFrame" name="video_frame">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>320</width>
- <height>240</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>320</width>
- <height>240</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>320</width>
- <height>240</height>
- </size>
- </property>
- <widget class="QLabel" name="video_frame_label">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>320</width>
- <height>240</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>320</width>
- <height>240</height>
- </size>
- </property>
- <property name="maximumSize">
- <size>
- <width>320</width>
- <height>240</height>
- </size>
- </property>
- <property name="palette">
- <palette>
- <active>
- <colorrole role="WindowText">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>104</red>
- <green>104</green>
- <blue>104</blue>
- </color>
- </brush>
- </colorrole>
- </active>
- <inactive>
- <colorrole role="WindowText">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>104</red>
- <green>104</green>
- <blue>104</blue>
- </color>
- </brush>
- </colorrole>
- </inactive>
- <disabled>
- <colorrole role="WindowText">
- <brush brushstyle="SolidPattern">
- <color alpha="255">
- <red>120</red>
- <green>120</green>
- <blue>120</blue>
- </color>
- </brush>
- </colorrole>
- </disabled>
- </palette>
- </property>
- <property name="font">
- <font>
- <family>Candara</family>
- <pointsize>37</pointsize>
- <weight>50</weight>
- <bold>false</bold>
- <kerning>true</kerning>
- </font>
- </property>
- <property name="text">
- <string/>
- </property>
- <property name="pixmap">
- <pixmap resource="opentrack-res.qrc">:/images/tracking-not-started.png</pixmap>
- </property>
- <property name="scaledContents">
- <bool>false</bool>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </widget>
- </widget>
- </item>
- <item>
- <widget class="pose_widget" name="pose_display" native="true">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>320</width>
- <height>240</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="top_display">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="lineWidth">
- <number>0</number>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <property name="spacing">
- <number>6</number>
- </property>
- <property name="leftMargin">
- <number>5</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>6</number>
- </property>
- <item>
- <widget class="QGroupBox" name="box_raw_headpose">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Raw tracker data</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_12">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>0</number>
- </property>
- <item row="0" column="3">
- <widget class="QLCDNumber" name="raw_yaw">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- <property name="lineWidth">
- <number>1</number>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Outline</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="lblZ_4">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Z</string>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="lblRotY_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Pitch</string>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QLCDNumber" name="raw_pitch">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- <property name="lineWidth">
- <number>1</number>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Outline</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="lblY_4">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Y</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="lblX_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>X</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLCDNumber" name="raw_x">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- <property name="lineWidth">
- <number>1</number>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Outline</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QLabel" name="lblRotZ_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Roll</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QLabel" name="lblRotX_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Yaw</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLCDNumber" name="raw_y">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- <property name="lineWidth">
- <number>1</number>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Outline</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QLCDNumber" name="raw_roll">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- <property name="lineWidth">
- <number>1</number>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Outline</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLCDNumber" name="raw_z">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Plain</enum>
- </property>
- <property name="lineWidth">
- <number>1</number>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Outline</enum>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="box_mapped_headpose">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Game data</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_14">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>0</number>
- </property>
- <item row="1" column="3">
- <widget class="QLCDNumber" name="pose_pitch">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QLCDNumber" name="pose_yaw">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLCDNumber" name="pose_z">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="lblx">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>X</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="lblY_2">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Y</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLCDNumber" name="pose_x">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QLabel" name="lblRotY_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Pitch</string>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QLabel" name="lblRotZ_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Roll</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QLabel" name="lblRotX_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Yaw</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="lblZ_2">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="text">
- <string>Z</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLCDNumber" name="pose_y">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QLCDNumber" name="pose_roll">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="smallDecimalPoint">
- <bool>true</bool>
- </property>
- <property name="digitCount">
- <number>4</number>
- </property>
- <property name="segmentStyle">
- <enum>QLCDNumber::Flat</enum>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="bottom_controls">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QGridLayout" name="gridLayout_2">
- <property name="leftMargin">
- <number>6</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <item row="0" column="1">
- <widget class="QFrame" name="groupWindows">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>4</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="lineWidth">
- <number>0</number>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <property name="spacing">
- <number>3</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QFrame" name="groupProfile">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QToolButton" name="profile_button">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="focusPolicy">
- <enum>Qt::StrongFocus</enum>
- </property>
- <property name="text">
- <string>Profile</string>
- </property>
- <property name="popupMode">
- <enum>QToolButton::InstantPopup</enum>
- </property>
- <property name="toolButtonStyle">
- <enum>Qt::ToolButtonTextBesideIcon</enum>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- <property name="arrowType">
- <enum>Qt::DownArrow</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="iconcomboProfile">
- <property name="focusPolicy">
- <enum>Qt::StrongFocus</enum>
- </property>
- <property name="maxVisibleItems">
- <number>20</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="btnShortcuts">
- <property name="text">
- <string>Options</string>
- </property>
- <property name="icon">
- <iconset resource="opentrack-res.qrc">
- <normaloff>:/images/tools.png</normaloff>:/images/tools.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>80</width>
- <height>24</height>
- </size>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="btnEditCurves">
- <property name="text">
- <string>Mapping</string>
- </property>
- <property name="icon">
- <iconset resource="opentrack-res.qrc">
- <normaloff>:/images/curves.png</normaloff>:/images/curves.png</iconset>
- </property>
- <property name="iconSize">
- <size>
- <width>80</width>
- <height>24</height>
- </size>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupStartStop">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>3</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Tracking</string>
- </property>
- <property name="flat">
- <bool>true</bool>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_4">
- <property name="spacing">
- <number>8</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>8</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>9</number>
- </property>
- <item>
- <widget class="QToolButton" name="btnStartTracker">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Start</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QToolButton" name="btnStopTracker">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="text">
- <string>Stop</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QFrame" name="frame_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>4</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <property name="spacing">
- <number>2</number>
- </property>
- <property name="leftMargin">
- <number>3</number>
- </property>
- <property name="topMargin">
- <number>2</number>
- </property>
- <property name="rightMargin">
- <number>3</number>
- </property>
- <property name="bottomMargin">
- <number>8</number>
- </property>
- <item>
- <widget class="QGroupBox" name="groupTrackerSource">
- <property name="title">
- <string>Input</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <property name="leftMargin">
- <number>4</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>4</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <property name="horizontalSpacing">
- <number>3</number>
- </property>
- <property name="verticalSpacing">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QComboBox" name="iconcomboTrackerSource">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::TabFocus</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QToolButton" name="btnShowEngineControls">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::ClickFocus</enum>
- </property>
- <property name="text">
- <string>🔨</string>
- </property>
- <property name="flat" stdset="0">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupGameProtocol">
- <property name="title">
- <string>Output</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_4">
- <property name="leftMargin">
- <number>4</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>4</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <property name="horizontalSpacing">
- <number>3</number>
- </property>
- <property name="verticalSpacing">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QComboBox" name="iconcomboProtocol">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::TabFocus</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QToolButton" name="btnShowServerControls">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::ClickFocus</enum>
- </property>
- <property name="text">
- <string>🔨</string>
- </property>
- <property name="flat" stdset="0">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupFilter">
- <property name="title">
- <string>Filter</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_3">
- <property name="leftMargin">
- <number>4</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>4</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <property name="horizontalSpacing">
- <number>3</number>
- </property>
- <property name="verticalSpacing">
- <number>0</number>
- </property>
- <item row="0" column="0">
- <widget class="QComboBox" name="iconcomboFilter">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::TabFocus</enum>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QToolButton" name="btnShowFilterControls">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="focusPolicy">
- <enum>Qt::ClickFocus</enum>
- </property>
- <property name="text">
- <string>🔨</string>
- </property>
- <property name="flat" stdset="0">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </widget>
- <customwidgets>
- <customwidget>
- <class>pose_widget</class>
- <extends>QWidget</extends>
- <header>pose-widget/pose-widget.hpp</header>
- </customwidget>
- </customwidgets>
- <tabstops>
- <tabstop>btnStartTracker</tabstop>
- <tabstop>btnStopTracker</tabstop>
- <tabstop>profile_button</tabstop>
- <tabstop>iconcomboProfile</tabstop>
- <tabstop>btnShortcuts</tabstop>
- <tabstop>btnEditCurves</tabstop>
- </tabstops>
- <resources>
- <include location="opentrack-res.qrc"/>
- </resources>
- <connections/>
-</ui>
diff --git a/gui/main.cpp b/gui/main.cpp
deleted file mode 100644
index cf6951c2..00000000
--- a/gui/main.cpp
+++ /dev/null
@@ -1,188 +0,0 @@
-#ifdef _WIN32
-# include "opentrack-library-path.h"
-# include <stdlib.h>
-# include <vector>
-# include <cstring>
-# include <QCoreApplication>
-# include <QFile>
-# include <QString>
-#else
-# include <unistd.h>
-#endif
-
-#include "migration/migration.hpp"
-#include "main-window.hpp"
-#include "options/options.hpp"
-using namespace options;
-#include "opentrack-library-path.h"
-#include <QApplication>
-#include <QCommandLineParser>
-#include <QStyleFactory>
-#include <QStringList>
-#include <QLocale>
-#include <QTranslator>
-#include <QDebug>
-#include <memory>
-#include <cstring>
-
-void set_qt_style()
-{
-#if defined(_WIN32) || defined(__APPLE__)
- // our layouts on OSX make some control wrongly sized -sh 20160908
- {
- const QStringList preferred { "fusion", "windowsvista", "macintosh" };
- for (const auto& style_name : preferred)
- {
- QStyle* s = QStyleFactory::create(style_name);
- if (s)
- {
- QApplication::setStyle(s);
- break;
- }
- }
- }
-#endif
-}
-
-#ifdef _WIN32
-
-void add_win32_path()
-{
- // see https://software.intel.com/en-us/articles/limitation-to-the-length-of-the-system-path-variable
- static char env_path[4096] { '\0', };
- {
- QString lib_path = OPENTRACK_BASE_PATH;
- lib_path.replace("/", "\\");
- const QByteArray lib_path_ = QFile::encodeName(lib_path);
-
- QString mod_path = OPENTRACK_BASE_PATH + QString(OPENTRACK_LIBRARY_PATH);
- mod_path.replace("/", "\\");
- const QByteArray mod_path_ = QFile::encodeName(mod_path);
-
- std::vector<const char*> contents
- {
- "PATH=",
- lib_path_.constData(),
- ";",
- mod_path_.constData(),
- ";",
- getenv("PATH"),
- };
-
- bool ok = true;
-
- for (const char* ptr : contents)
- {
- if (ptr == nullptr)
- continue;
-
- strcat_s(env_path, sizeof(env_path), ptr);
-
- if (ptr[0] == '\0' || env_path[0] == '\0')
- {
- qDebug() << "bad path element, debug info:"
- << (ptr == nullptr ? "<null>" : ptr)
- << (ptr != nullptr && ptr[0] == '\0')
- << (env_path[0] == '\0');
- ok = false;
- break;
- }
- }
-
- if (ok)
- {
- const int error = _putenv(env_path);
-
- if (error)
- qDebug() << "can't _putenv win32 path";
- }
- else
- qDebug() << "can't set win32 path";
- }
-}
-
-#endif
-
-int
-#ifdef _MSC_VER
-WINAPI
-#endif
-main(int argc, char** argv)
-{
-#if QT_VERSION >= 0x050600 // flag introduced in QT 5.6. It is non-essential so might as well allow compilation on older systems.
- QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
-#endif
- QApplication::setAttribute(Qt::AA_X11InitThreads, true);
-
- QTranslator t;
- QApplication app(argc, argv);
-
-#if !defined(__linux) && !defined _WIN32
- // workaround QTBUG-38598
- QCoreApplication::addLibraryPath(".");
-#endif
-
- set_qt_style();
- MainWindow::set_working_directory();
-
-#ifdef _WIN32
- add_win32_path();
-#endif
-
- // QLocale::setDefault(QLocale("ru_RU")); // force i18n for testing
-
- if (!QSettings(OPENTRACK_ORG).value("disable-translation", false).toBool())
- {
- (void) t.load(QLocale(), "", "", QCoreApplication::applicationDirPath() + "/" + OPENTRACK_I18N_PATH, ".qm");
- (void) QCoreApplication::installTranslator(&t);
- }
-
- do
- {
- mem<MainWindow> w = std::make_shared<MainWindow>();
-
- if (!w->isEnabled())
- break;
-
- if (!w->start_in_tray())
- {
- w->setVisible(true);
- w->show();
- }
- else
- w->setVisible(false);
-
- app.setQuitOnLastWindowClosed(false);
- app.exec();
-
- app.exit(0);
-
- qDebug() << "exit: window";
- }
- while (false);
-
- // msvc crashes in some destructor
-#if defined(_MSC_VER)
- qDebug() << "exit: terminating";
- TerminateProcess(GetCurrentProcess(), 0);
-#else
- // we have some atexit issues when not leaking bundles
- _exit(0);
-#endif
- qDebug() << "exit: main()";
-
- return 0;
-}
-
-#if defined(Q_CREATOR_RUN)
-# pragma clang diagnostic ignored "-Wmain"
-#endif
-
-#ifdef _MSC_VER
-int WINAPI
-WinMain (struct HINSTANCE__*, struct HINSTANCE__*, char*, int)
-{
- return main (__argc, __argv);
-}
-
-#endif
diff --git a/gui/mapping-dialog.cpp b/gui/mapping-dialog.cpp
new file mode 100644
index 00000000..cdbf532e
--- /dev/null
+++ b/gui/mapping-dialog.cpp
@@ -0,0 +1,238 @@
+/* Copyright (c) 2014-2015, 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 "mapping-dialog.hpp"
+#include "logic/main-settings.hpp"
+#include "spline/spline-widget.hpp"
+
+#include <QtEvents>
+
+using namespace options;
+
+mapping_dialog::mapping_dialog(Mappings& m) : m(m), widgets{}
+{
+ ui.setupUi(this);
+
+ QWidget* pages[] = {
+ ui.tabWidgetPage1,
+ ui.tabWidgetPage2,
+ ui.tabWidgetPage3,
+ ui.tabWidgetPage4,
+ ui.tabWidgetPage5,
+ ui.tabWidgetPage6,
+ };
+
+ {
+ QColor bg = palette().window().color();
+
+ QString tmp;
+ tmp.reserve(32);
+
+ tmp += QStringLiteral(".QWidget { background-color: rgb(%1, %2, %3); } ")
+ .arg(bg.red()).arg(bg.green()).arg(bg.blue());
+
+ for (QWidget* w : pages)
+ w->setStyleSheet(tmp);
+ }
+
+ load();
+
+ connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
+ connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
+
+ tie_setting(s.a_yaw.altp, ui.rx_altp);
+ tie_setting(s.a_pitch.altp, ui.ry_altp);
+ tie_setting(s.a_roll.altp, ui.rz_altp);
+ tie_setting(s.a_x.altp, ui.tx_altp);
+ tie_setting(s.a_y.altp, ui.ty_altp);
+ tie_setting(s.a_z.altp, ui.tz_altp);
+
+ tie_setting(s.a_yaw.clamp_x_, ui.max_yaw_rotation);
+ tie_setting(s.a_pitch.clamp_x_, ui.max_pitch_rotation);
+ tie_setting(s.a_roll.clamp_x_, ui.max_roll_rotation);
+ tie_setting(s.a_x.clamp_x_, ui.max_x_translation);
+ tie_setting(s.a_y.clamp_x_, ui.max_y_translation);
+ tie_setting(s.a_z.clamp_x_, ui.max_z_translation);
+
+ tie_setting(s.a_x.clamp_y_, ui.max_x_out);
+ tie_setting(s.a_y.clamp_y_, ui.max_y_out);
+ tie_setting(s.a_z.clamp_y_, ui.max_z_out);
+
+ tie_setting(s.a_pitch.clamp_y_, ui.max_pitch_output);
+}
+
+void mapping_dialog::load()
+{
+ struct {
+ spline_widget* qfc;
+ Axis axis;
+ QCheckBox* checkbox;
+ bool altp;
+ } qfcs[] =
+ {
+ { ui.rxconfig, Yaw, nullptr, false, },
+ { ui.ryconfig, Pitch, nullptr, false, },
+ { ui.rzconfig, Roll, nullptr, false, },
+ { ui.txconfig, TX, nullptr, false, },
+ { ui.tyconfig, TY, nullptr, false, },
+ { ui.tzconfig, TZ, nullptr, false, },
+ { ui.rxconfig_alt, Yaw, ui.rx_altp, true, },
+ { ui.ryconfig_alt, Pitch, ui.ry_altp, true, },
+ { ui.rzconfig_alt, Roll, ui.rz_altp, true, },
+ { ui.txconfig_alt, TX, ui.tx_altp, true, },
+ { ui.tyconfig_alt, TY, ui.ty_altp, true, },
+ { ui.tzconfig_alt, TZ, ui.tz_altp, true, },
+ { nullptr, Yaw, nullptr, false }
+ };
+
+ using a = axis_opts::max_clamp;
+
+ ui.max_pitch_output->setItemData(0, int(a::o_r180));
+ ui.max_pitch_output->setItemData(1, int(a::o_r90));
+
+ for (QComboBox* x : { ui.max_yaw_rotation, ui.max_pitch_rotation, ui.max_roll_rotation })
+ for (a y : { a::r180, a::r90, a::r60, a::r45, a::r30, a::r25, a::r20, a::r15, a::r10 })
+ x->addItem(tr("%1°").arg(y), y);
+
+ for (QComboBox* x : { ui.max_x_translation, ui.max_y_translation, ui.max_z_translation })
+ for (a y : { a::t30, a::t20, a::t15, a::t10, a::t75, a::t100, a::t150, a::t300, a::t600 })
+ x->addItem(tr("%1 cm").arg(int(y)), y);
+
+ for (QComboBox* x : { ui.max_x_out, ui.max_y_out, ui.max_z_out })
+ for (a y : { a::o_t75, a::o_t100, a::o_t150, a::o_t300, a::o_t600 })
+ x->addItem(tr("%1 cm").arg(abs(int(y))), y);
+
+ for (int i = 0; qfcs[i].qfc; i++)
+ {
+ const bool altp = qfcs[i].altp;
+
+ Map& axis = m(qfcs[i].axis);
+ spline& conf = altp ? axis.spline_alt : axis.spline_main;
+ spline_widget& qfc = *qfcs[i].qfc;
+
+ if (altp)
+ {
+ connect(&axis.opts.altp,
+ value_::value_changed<bool>(),
+ this, [&](bool f) { qfc.setEnabled(f); });
+ qfc.setEnabled(axis.opts.altp);
+ }
+
+ auto update_xstep = [&qfc](int clamp_x) {
+ int value;
+
+ if (clamp_x <= a::r30)
+ value = 1;
+ else if (clamp_x <= a::r45)
+ value = 5;
+ else if (clamp_x <= a::t150)
+ value = 10;
+ else if (clamp_x <= a::t300)
+ value = 25;
+ else
+ value = 50;
+
+ qfc.set_x_step(value);
+ };
+
+ auto update_ystep = [&qfc](int clamp_y) {
+ int value;
+ switch (clamp_y)
+ {
+ default:
+ case a::o_r180:
+ value = 20; break;
+ case a::o_r90:
+ value = 10; break;
+ case a::o_t75:
+ value = 5; break;
+ case a::o_t100:
+ case a::o_t150:
+ value = 10; break;
+ case a::o_t300:
+ value = 50; break;
+ case a::o_t600:
+ value = 100; break;
+ }
+ qfc.set_y_step(value);
+ };
+
+ qfc.set_snap(.5, 1);
+
+ connect(&axis.opts.clamp_x_, value_::value_changed<int>(), &qfc, update_xstep);
+ connect(&axis.opts.clamp_y_, value_::value_changed<int>(), &qfc, update_ystep);
+
+ // force signal to avoid duplicating the slot's logic
+ qfc.set_config(&conf);
+
+ update_xstep(axis.opts.clamp_x_);
+ update_ystep(axis.opts.clamp_y_);
+
+ widgets[i % 6][altp ? 1 : 0] = &qfc;
+ }
+}
+
+void mapping_dialog::closeEvent(QCloseEvent*)
+{
+ invalidate_dialog();
+}
+
+void mapping_dialog::refresh_tab()
+{
+ if (!isVisible())
+ return;
+
+ const int idx = ui.tabWidget->currentIndex();
+
+ if (likely(idx >= 0 && idx < 6))
+ {
+ widgets[idx][0]->repaint();
+ widgets[idx][1]->repaint();
+ }
+ else
+ qDebug() << "map-widget: bad index" << idx;
+}
+
+void mapping_dialog::save_dialog()
+{
+ s.b_map->save();
+
+ for (int i = 0; i < 6; i++)
+ {
+ m.forall([&](Map& s)
+ {
+ s.spline_main.save();
+ s.spline_alt.save();
+ s.opts.b_mapping_window->save();
+ });
+ }
+}
+
+void mapping_dialog::invalidate_dialog()
+{
+ s.b_map->reload();
+
+ m.forall([](Map& s)
+ {
+ s.spline_main.reload();
+ s.spline_alt.reload();
+ s.opts.b_mapping_window->reload();
+ });
+}
+
+void mapping_dialog::doOK()
+{
+ save_dialog();
+ close();
+}
+
+void mapping_dialog::doCancel()
+{
+ invalidate_dialog();
+ close();
+}
diff --git a/gui/mapping-dialog.hpp b/gui/mapping-dialog.hpp
new file mode 100644
index 00000000..3758e7c7
--- /dev/null
+++ b/gui/mapping-dialog.hpp
@@ -0,0 +1,37 @@
+#pragma once
+
+#include "export.hpp"
+
+#include "logic/mappings.hpp"
+#include "gui/ui_mapping-dialog.h"
+#include "spline/spline-widget.hpp"
+
+#include <QWidget>
+#include <QDialog>
+#include <QtEvents>
+
+class OTR_GUI_EXPORT mapping_dialog final : public QDialog
+{
+ Q_OBJECT
+public:
+ mapping_dialog(Mappings& m);
+ void refresh_tab();
+ inline bool embeddable() noexcept { return false; }
+private:
+ Ui::mapping_dialog ui;
+ Mappings& m;
+ main_settings s;
+
+ spline_widget* widgets[6][2];
+
+ void closeEvent(QCloseEvent*) override;
+
+ void load();
+
+ void save_dialog();
+ void invalidate_dialog();
+
+private slots:
+ void doOK();
+ void doCancel();
+};
diff --git a/gui/mapping-window.ui b/gui/mapping-dialog.ui
index 4ef77cb8..545b5ae5 100644
--- a/gui/mapping-window.ui
+++ b/gui/mapping-dialog.ui
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>mapping_window</class>
- <widget class="QWidget" name="mapping_window">
+ <class>mapping_dialog</class>
+ <widget class="QWidget" name="mapping_dialog">
<property name="geometry">
<rect>
<x>0</x>
@@ -27,7 +27,7 @@
</property>
<property name="windowIcon">
<iconset>
- <normaloff>images/facetracknoir.png</normaloff>images/facetracknoir.png</iconset>
+ <normaloff>images/opentrack.png</normaloff>images/opentrack.png</iconset>
</property>
<property name="layoutDirection">
<enum>Qt::LeftToRight</enum>
@@ -46,6 +46,12 @@
<string>Yaw</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="leftMargin">
+ <number>12</number>
+ </property>
+ <property name="rightMargin">
+ <number>12</number>
+ </property>
<item>
<widget class="QFrame" name="frame">
<property name="sizePolicy">
@@ -67,7 +73,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>Max rotation</string>
+ <string>Max input</string>
</property>
</widget>
</item>
@@ -93,13 +99,6 @@
<blue>0</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
<item>
@@ -118,13 +117,6 @@
<blue>0</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>255</red>
- <green>255</green>
- <blue>255</blue>
- </color>
- </property>
</widget>
</item>
</layout>
@@ -134,6 +126,12 @@
<string>Pitch</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_3">
+ <property name="leftMargin">
+ <number>12</number>
+ </property>
+ <property name="rightMargin">
+ <number>12</number>
+ </property>
<item>
<widget class="QFrame" name="frame_2">
<property name="sizePolicy">
@@ -155,7 +153,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>Max rotation</string>
+ <string>Max input</string>
</property>
</widget>
</item>
@@ -169,6 +167,27 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>Max output</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="max_pitch_output">
+ <item>
+ <property name="text">
+ <string>180°</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>90°</string>
+ </property>
+ </item>
+ </widget>
+ </item>
</layout>
</widget>
</item>
@@ -181,13 +200,6 @@
<blue>0</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
<item>
@@ -206,13 +218,6 @@
<blue>0</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
</layout>
@@ -222,6 +227,12 @@
<string>Roll</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
+ <property name="leftMargin">
+ <number>12</number>
+ </property>
+ <property name="rightMargin">
+ <number>12</number>
+ </property>
<item>
<widget class="QFrame" name="frame_3">
<property name="sizePolicy">
@@ -243,7 +254,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>Max rotation</string>
+ <string>Max input</string>
</property>
</widget>
</item>
@@ -269,13 +280,6 @@
<blue>255</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
<item>
@@ -294,13 +298,6 @@
<blue>255</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
</layout>
@@ -314,6 +311,12 @@
<string>X</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_5">
+ <property name="leftMargin">
+ <number>12</number>
+ </property>
+ <property name="rightMargin">
+ <number>12</number>
+ </property>
<item>
<widget class="QFrame" name="frame444">
<property name="sizePolicy">
@@ -335,7 +338,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>Max translation</string>
+ <string>Max input</string>
</property>
</widget>
</item>
@@ -349,6 +352,29 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QLabel" name="label4out">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Max output</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="max_x_out">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
@@ -361,13 +387,6 @@
<blue>255</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
<item>
@@ -386,13 +405,6 @@
<blue>255</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
</layout>
@@ -402,6 +414,12 @@
<string>Y</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_6">
+ <property name="leftMargin">
+ <number>12</number>
+ </property>
+ <property name="rightMargin">
+ <number>12</number>
+ </property>
<item>
<widget class="QFrame" name="frame555">
<property name="sizePolicy">
@@ -423,7 +441,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>Max translation</string>
+ <string>Max input</string>
</property>
</widget>
</item>
@@ -437,6 +455,29 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QLabel" name="label5out">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Max output</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="max_y_out">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
@@ -449,13 +490,6 @@
<blue>0</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
<item>
@@ -474,13 +508,6 @@
<blue>0</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
</layout>
@@ -490,6 +517,12 @@
<string>Z</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_7">
+ <property name="leftMargin">
+ <number>12</number>
+ </property>
+ <property name="rightMargin">
+ <number>12</number>
+ </property>
<item>
<widget class="QFrame" name="frame666">
<property name="sizePolicy">
@@ -511,7 +544,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>Max translation</string>
+ <string>Max input</string>
</property>
</widget>
</item>
@@ -525,6 +558,29 @@
</property>
</widget>
</item>
+ <item>
+ <widget class="QLabel" name="label6out">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Max output</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QComboBox" name="max_z_out">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
@@ -537,13 +593,6 @@
<blue>255</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
<item>
@@ -562,13 +611,6 @@
<blue>255</blue>
</color>
</property>
- <property name="colorBackground" stdset="0">
- <color>
- <red>240</red>
- <green>240</green>
- <blue>240</blue>
- </color>
- </property>
</widget>
</item>
</layout>
diff --git a/gui/mapping-window.cpp b/gui/mapping-window.cpp
deleted file mode 100644
index 71282d84..00000000
--- a/gui/mapping-window.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-/* Copyright (c) 2014-2015, 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 "mapping-window.hpp"
-#include "logic/main-settings.hpp"
-#include "spline/spline-widget.hpp"
-
-MapWidget::MapWidget(Mappings& m) : m(m)
-{
- ui.setupUi(this);
-
- load();
-
- connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
- connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
-
- tie_setting(s.a_yaw.altp, ui.rx_altp);
- tie_setting(s.a_pitch.altp, ui.ry_altp);
- tie_setting(s.a_roll.altp, ui.rz_altp);
- tie_setting(s.a_x.altp, ui.tx_altp);
- tie_setting(s.a_y.altp, ui.ty_altp);
- tie_setting(s.a_z.altp, ui.tz_altp);
-
- tie_setting(s.a_yaw.clamp, ui.max_yaw_rotation);
- tie_setting(s.a_pitch.clamp, ui.max_pitch_rotation);
- tie_setting(s.a_roll.clamp, ui.max_roll_rotation);
- tie_setting(s.a_x.clamp, ui.max_x_translation);
- tie_setting(s.a_y.clamp, ui.max_y_translation);
- tie_setting(s.a_z.clamp, ui.max_z_translation);
-}
-
-void MapWidget::load()
-{
- struct {
- spline_widget* qfc;
- Axis axis;
- QCheckBox* checkbox;
- bool altp;
- } qfcs[] =
- {
- { ui.rxconfig, Yaw, nullptr, false, },
- { ui.ryconfig, Pitch, nullptr, false, },
- { ui.rzconfig, Roll, nullptr, false, },
- { ui.txconfig, TX, nullptr, false, },
- { ui.tyconfig, TY, nullptr, false, },
- { ui.tzconfig, TZ, nullptr, false, },
- { ui.rxconfig_alt, Yaw, ui.rx_altp, true, },
- { ui.ryconfig_alt, Pitch, ui.ry_altp, true, },
- { ui.rzconfig_alt, Roll, ui.rz_altp, true, },
- { ui.txconfig_alt, TX, ui.tx_altp, true, },
- { ui.tyconfig_alt, TY, ui.ty_altp, true, },
- { ui.tzconfig_alt, TZ, ui.tz_altp, true, },
- { nullptr, Yaw, nullptr, false }
- };
-
- using a = axis_opts::max_clamp;
-
- for (QComboBox* x : { ui.max_yaw_rotation, ui.max_pitch_rotation, ui.max_roll_rotation })
- for (a y : { a::r180, a::r90, a::r60, a::r45, a::r30, a::r25, a::r20, a::r15, a::r10 })
- x->addItem(QString::number(y) + "°", y);
-
- for (QComboBox* x : { ui.max_x_translation, ui.max_y_translation, ui.max_z_translation })
- for (a y : { a::t30, a::t20, a::t15, a::t10, a::t100 })
- x->addItem(QStringLiteral("%1 cm").arg(int(y)), y);
-
- for (int i = 0; qfcs[i].qfc; i++)
- {
- const bool altp = qfcs[i].altp;
-
- Map& axis = m(qfcs[i].axis);
- spline& conf = altp ? axis.spline_alt : axis.spline_main;
- spline_widget& qfc = *qfcs[i].qfc;
-
- if (altp)
- {
- connect(&axis.opts.altp,
- static_cast<void(base_value::*)(bool) const>(&base_value::valueChanged),
- this,
- [&](bool f) -> void {qfc.setEnabled(f); qfc.force_redraw();});
- qfc.setEnabled(axis.opts.altp);
- qfc.force_redraw();
- }
-
- connect(&axis.opts.clamp, static_cast<void(base_value::*)(int) const>(&base_value::valueChanged),
- &qfc, [i, &conf, &qfc](int value) {
- conf.set_max_input(value);
- qfc.reload_spline();
- qfc.set_x_step(value + 1e-2 >= 90 ? 10 : 5);
-
- if (i >= 3)
- qfc.set_snap(1, 2.5);
- else
- {
- const double x_snap = std::max(.5, conf.max_input() / 100.);
- qfc.set_snap(x_snap, 1);
- }
- });
- // force signal to avoid duplicating the slot's logic
- qfcs[i].qfc->setConfig(&conf);
- axis.opts.clamp.valueChanged(axis.opts.clamp);
- }
-
-}
-
-void MapWidget::closeEvent(QCloseEvent*)
-{
- invalidate_dialog();
-}
-
-void MapWidget::save_dialog()
-{
- mem<QSettings> settings_ = group::ini_file();
- QSettings& settings = *settings_;
-
- s.b_map->save_deferred(settings);
-
- for (int i = 0; i < 6; i++)
- {
- m.forall([&](Map& s)
- {
- s.spline_main.save(settings);
- s.spline_alt.save(settings);
- s.opts.b_mapping_window->save_deferred(settings);
- });
- }
-}
-
-void MapWidget::invalidate_dialog()
-{
- s.b_map->reload();
-
- m.forall([](Map& s)
- {
- s.spline_main.reload();
- s.spline_alt.reload();
- s.opts.b_mapping_window->reload();
- });
-}
-
-void MapWidget::doOK()
-{
- save_dialog();
- close();
-}
-
-void MapWidget::doCancel()
-{
- invalidate_dialog();
- close();
-}
diff --git a/gui/mapping-window.hpp b/gui/mapping-window.hpp
deleted file mode 100644
index 9403bfb5..00000000
--- a/gui/mapping-window.hpp
+++ /dev/null
@@ -1,32 +0,0 @@
-#pragma once
-
-#include "logic/mappings.hpp"
-#include "ui_mapping-window.h"
-
-#include <QWidget>
-#include <QDialog>
-#include <QShowEvent>
-#include <QCloseEvent>
-#include <QCheckBox>
-
-class MapWidget final : public QDialog
-{
- Q_OBJECT
-public:
- MapWidget(Mappings& m);
-private:
- Ui::mapping_window ui;
- Mappings& m;
- main_settings s;
-
- void closeEvent(QCloseEvent*) override;
-
- void load();
-
- void save_dialog();
- void invalidate_dialog();
-
-private slots:
- void doOK();
- void doCancel();
-};
diff --git a/gui/new_config.ui b/gui/new_config.ui
deleted file mode 100644
index 27dce0f8..00000000
--- a/gui/new_config.ui
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>UI_new_config</class>
- <widget class="QDialog" name="UI_new_config">
- <property name="windowModality">
- <enum>Qt::ApplicationModal</enum>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>269</width>
- <height>67</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Config filename</string>
- </property>
- <property name="windowIcon">
- <iconset>
- <normaloff>images/facetracknoir.png</normaloff>images/facetracknoir.png</iconset>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>New file name:</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLineEdit" name="lineEdit"/>
- </item>
- <item row="1" column="1">
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="standardButtons">
- <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/gui/new_file_dialog.h b/gui/new_file_dialog.h
deleted file mode 100644
index cd5ca528..00000000
--- a/gui/new_file_dialog.h
+++ /dev/null
@@ -1,51 +0,0 @@
-#pragma once
-
-#include "ui_new_config.h"
-#include "options/options.hpp"
-#include <QFile>
-#include <QRegExp>
-#include <QString>
-#include <QMessageBox>
-
-class new_file_dialog : public QDialog
-{
- Q_OBJECT
-public:
- new_file_dialog(QWidget* parent = 0) : QDialog(parent), ok(false)
- {
- ui.setupUi(this);
- connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(ok_clicked()));
- connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(cancel_clicked()));
- setFixedSize(size());
- }
- bool is_ok(QString& name_)
- {
- name_ = name;
- return ok;
- }
-private:
- Ui::UI_new_config ui;
- bool ok;
- QString name;
-private slots:
- void cancel_clicked() { close(); }
- void ok_clicked()
- {
- QString text = ui.lineEdit->text();
- text = text.replace('/', "");
- text = text.replace('\\', "");
- if (text != "" && !text.endsWith(".ini"))
- text += ".ini";
- if (text == "" || text == ".ini" || QFile(options::group::ini_directory() + "/" + text).exists())
- {
- QMessageBox::warning(this,
- tr("File exists"),
- tr("This file already exists. Pick another name."),
- QMessageBox::Ok, QMessageBox::NoButton);
- return;
- }
- ok = true;
- close();
- name = text;
- }
-};
diff --git a/gui/opentrack-res.qrc b/gui/opentrack-res.qrc
index 1a3728cd..b4d7b4a5 100644
--- a/gui/opentrack-res.qrc
+++ b/gui/opentrack-res.qrc
@@ -3,7 +3,7 @@
<file>images/tools.png</file>
<file>images/settings16.png</file>
<file>images/curves.png</file>
- <file>images/facetracknoir.png</file>
+ <file>images/opentrack.png</file>
<file>images/no-feed.png</file>
<file>images/filter-16.png</file>
<file>images/tracking-not-started.png</file>
diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp
index 51da498a..76c3313a 100644
--- a/gui/options-dialog.cpp
+++ b/gui/options-dialog.cpp
@@ -8,15 +8,21 @@
#include "options-dialog.hpp"
#include "keyboard.h"
-#include "opentrack-library-path.h"
+#include "compat/library-path.hpp"
+
+#include <utility>
+
#include <QPushButton>
#include <QLayout>
#include <QDialog>
#include <QFileDialog>
-QString OptionsDialog::kopts_to_string(const key_opts& kopts)
+using namespace options;
+using namespace options::globals;
+
+QString options_dialog::kopts_to_string(const key_opts& kopts)
{
- if (static_cast<QString>(kopts.guid) != "")
+ if (!kopts.guid->isEmpty())
{
const int btn = kopts.button & ~Qt::KeyboardModifierMask;
const int mods = kopts.button & Qt::KeyboardModifierMask;
@@ -24,42 +30,70 @@ QString OptionsDialog::kopts_to_string(const key_opts& kopts)
if (mods & Qt::ControlModifier) mm += "Control+";
if (mods & Qt::AltModifier) mm += "Alt+";
if (mods & Qt::ShiftModifier) mm += "Shift+";
- return mm + tr("Joy button %1").arg(QString::number(btn));
+ const auto& str = kopts.guid == QStringLiteral("mouse")
+ ? tr("Mouse %1")
+ : tr("Joy button %1");
+ return mm + str.arg(QString::number(btn));
}
- if (static_cast<QString>(kopts.keycode) == "")
+ if (kopts.keycode->isEmpty())
return tr("None");
return kopts.keycode;
}
-void OptionsDialog::set_disable_translation_state(bool value)
+void options_dialog::set_disable_translation_state(bool value)
{
- QSettings(OPENTRACK_ORG).setValue("disable-translation", value);
+ with_global_settings_object([&](QSettings& s)
+ {
+ s.setValue("disable-translation", value);
+ mark_global_ini_modified();
+ });
}
-OptionsDialog::OptionsDialog(std::function<void(bool)> pause_keybindings) :
- pause_keybindings(pause_keybindings)
+options_dialog::options_dialog(std::unique_ptr<ITrackerDialog>& tracker_dialog_,
+ std::unique_ptr<IProtocolDialog>& proto_dialog_,
+ std::unique_ptr<IFilterDialog>& filter_dialog_,
+ std::function<void(bool)> pause_keybindings) :
+ pause_keybindings(std::move(pause_keybindings))
{
ui.setupUi(this);
- connect(ui.buttonBox, SIGNAL(accepted()), this, SLOT(doOK()));
- connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel()));
+ connect(ui.buttonBox, &QDialogButtonBox::accepted, this, &options_dialog::doOK);
+ connect(ui.buttonBox, &QDialogButtonBox::rejected, this, &options_dialog::close);
tie_setting(main.tray_enabled, ui.trayp);
tie_setting(main.tray_start, ui.tray_start);
tie_setting(main.center_at_startup, ui.center_at_startup);
- tie_setting(main.tcomp_p, ui.tcomp_enable);
+ const centering_state centering_modes[] = {
+ center_disabled,
+ center_point,
+ center_vr360,
+ center_roll_compensated,
+ };
+ for (int k = 0; k < 4; k++)
+ ui.cbox_centering->setItemData(k, centering_modes[k]);
+ tie_setting(main.centering_mode, ui.cbox_centering);
+
+ const reltrans_state reltrans_modes[] = {
+ reltrans_disabled,
+ reltrans_enabled,
+ reltrans_non_center,
+ };
+
+ for (int k = 0; k < 3; k++)
+ ui.reltrans_mode->setItemData(k, reltrans_modes[k]);
+
+ tie_setting(main.reltrans_mode, ui.reltrans_mode);
- tie_setting(main.tcomp_disable_tx, ui.tcomp_tx_disable);
- tie_setting(main.tcomp_disable_ty, ui.tcomp_ty_disable);
- tie_setting(main.tcomp_disable_tz, ui.tcomp_tz_disable);
+ tie_setting(main.reltrans_disable_tx, ui.tcomp_tx_disable);
+ tie_setting(main.reltrans_disable_ty, ui.tcomp_ty_disable);
+ tie_setting(main.reltrans_disable_tz, ui.tcomp_tz_disable);
- tie_setting(main.tcomp_disable_src_yaw, ui.tcomp_src_yaw_disable);
- tie_setting(main.tcomp_disable_src_pitch, ui.tcomp_src_pitch_disable);
- tie_setting(main.tcomp_disable_src_roll, ui.tcomp_src_roll_disable);
+ tie_setting(main.reltrans_disable_src_yaw, ui.tcomp_src_yaw_disable);
+ tie_setting(main.reltrans_disable_src_pitch, ui.tcomp_src_pitch_disable);
+ tie_setting(main.reltrans_disable_src_roll, ui.tcomp_src_roll_disable);
- tie_setting(main.neck_y, ui.neck_y);
tie_setting(main.neck_z, ui.neck_z);
tie_setting(main.a_x.zero, ui.pos_tx);
@@ -69,12 +103,19 @@ OptionsDialog::OptionsDialog(std::function<void(bool)> pause_keybindings) :
tie_setting(main.a_pitch.zero, ui.pos_ry);
tie_setting(main.a_roll.zero, ui.pos_rz);
- tie_setting(main.a_yaw.invert, ui.invert_yaw);
- tie_setting(main.a_pitch.invert, ui.invert_pitch);
- tie_setting(main.a_roll.invert, ui.invert_roll);
- tie_setting(main.a_x.invert, ui.invert_x);
- tie_setting(main.a_y.invert, ui.invert_y);
- tie_setting(main.a_z.invert, ui.invert_z);
+ tie_setting(main.a_yaw.invert_pre, ui.invert_yaw_pre);
+ tie_setting(main.a_pitch.invert_pre, ui.invert_pitch_pre);
+ tie_setting(main.a_roll.invert_pre, ui.invert_roll_pre);
+ tie_setting(main.a_x.invert_pre, ui.invert_x_pre);
+ tie_setting(main.a_y.invert_pre, ui.invert_y_pre);
+ tie_setting(main.a_z.invert_pre, ui.invert_z_pre);
+
+ tie_setting(main.a_yaw.invert_post, ui.invert_yaw_post);
+ tie_setting(main.a_pitch.invert_post, ui.invert_pitch_post);
+ tie_setting(main.a_roll.invert_post, ui.invert_roll_post);
+ tie_setting(main.a_x.invert_post, ui.invert_x_post);
+ tie_setting(main.a_y.invert_post, ui.invert_y_post);
+ tie_setting(main.a_z.invert_post, ui.invert_z_post);
tie_setting(main.a_yaw.src, ui.src_yaw);
tie_setting(main.a_pitch.src, ui.src_pitch);
@@ -83,18 +124,16 @@ OptionsDialog::OptionsDialog(std::function<void(bool)> pause_keybindings) :
tie_setting(main.a_y.src, ui.src_y);
tie_setting(main.a_z.src, ui.src_z);
- tie_setting(main.camera_yaw, ui.camera_yaw);
- tie_setting(main.camera_pitch, ui.camera_pitch);
- tie_setting(main.camera_roll, ui.camera_roll);
- tie_setting(main.use_camera_offset_from_centering, ui.use_center_as_translation_camera_offset);
-
- tie_setting(main.center_method, ui.center_method);
+ //tie_setting(main.center_method, ui.center_method);
tie_setting(main.tracklogging_enabled, ui.tracklogging_enabled);
tie_setting(main.neck_enable, ui.neck_enable);
- ui.disable_translation->setChecked(QSettings(OPENTRACK_ORG).value("disable-translation", false).toBool());
+ const bool is_translation_disabled = with_global_settings_object([] (QSettings& s) {
+ return s.value("disable-translation", false).toBool();
+ });
+ ui.disable_translation->setChecked(is_translation_disabled);
struct tmp
{
@@ -136,52 +175,63 @@ OptionsDialog::OptionsDialog(std::function<void(bool)> pause_keybindings) :
tmp val = val_;
val.label->setText(kopts_to_string(val.opt));
connect(&val.opt.keycode,
- static_cast<void (base_value::*)(const QString&) const>(&base_value::valueChanged),
+ static_cast<void (value_::*)(const QString&) const>(&value_::valueChanged),
val.label,
- [=](const QString&) -> void { val.label->setText(kopts_to_string(val.opt)); });
+ [=](const QString&) { val.label->setText(kopts_to_string(val.opt)); });
{
- connect(val.button, &QPushButton::clicked, this, [=]() -> void { bind_key(val.opt, val.label); });
+ connect(val.button, &QPushButton::clicked, this, [=, this] { bind_key(val.opt, val.label); });
}
}
-}
-void OptionsDialog::closeEvent(QCloseEvent *)
-{
- done(int(result()));
+ auto add_module_tab = [this] (auto& place, auto&& dlg, const QString& label) {
+ if (dlg && dlg->embeddable())
+ {
+ using BaseDialog = plugin_api::detail::BaseDialog;
+
+ dlg->set_buttons_visible(false);
+ place = dlg.release();
+ ui.tabWidget->addTab(place, label);
+ QObject::connect(place, &BaseDialog::closing, this, &QDialog::close);
+ }
+ };
+
+ add_module_tab(tracker_dialog, tracker_dialog_, tr("Tracker"));
+ add_module_tab(proto_dialog, proto_dialog_, tr("Output"));
+ add_module_tab(filter_dialog, filter_dialog_, tr("Filter"));
}
-void OptionsDialog::bind_key(key_opts& kopts, QLabel* label)
+void options_dialog::bind_key(key_opts& kopts, QLabel* label)
{
kopts.button = -1;
- kopts.guid = "";
- kopts.keycode = "";
- auto k = new KeyboardListener;
+ kopts.guid = {};
+ kopts.keycode = {};
+ auto k = new keyboard_listener;
k->setWindowModality(Qt::ApplicationModal);
k->deleteLater();
connect(k,
- &KeyboardListener::key_pressed,
+ &keyboard_listener::key_pressed,
this,
[&](const QKeySequence& s)
{
kopts.keycode = s.toString(QKeySequence::PortableText);
- kopts.guid = "";
+ kopts.guid = {};
kopts.button = -1;
k->close();
});
- connect(k, &KeyboardListener::joystick_button_pressed,
+ connect(k, &keyboard_listener::joystick_button_pressed,
this,
[&](const QString& guid, int idx, bool held)
{
if (!held)
{
kopts.guid = guid;
- kopts.keycode = "";
+ kopts.keycode = {};
kopts.button = idx;
k->close();
}
});
- connect(main.b.get(), &options::detail::bundle::reloading, k, &QDialog::close);
+ connect(&*main.b, &options::detail::bundle::reloading, k, &QDialog::close);
pause_keybindings(true);
k->exec();
pause_keybindings(false);
@@ -193,8 +243,8 @@ void OptionsDialog::bind_key(key_opts& kopts, QLabel* label)
);
if (is_crap)
{
- kopts.keycode = QStringLiteral("");
- kopts.guid = QStringLiteral("");
+ kopts.keycode = {};
+ kopts.guid = {};
kopts.button = -1;
label->setText(tr("None"));
}
@@ -202,40 +252,152 @@ void OptionsDialog::bind_key(key_opts& kopts, QLabel* label)
label->setText(kopts_to_string(kopts));
}
-void OptionsDialog::doOK()
+void options_dialog::switch_to_tracker_tab()
+{
+ if (tracker_dialog)
+ ui.tabWidget->setCurrentWidget(tracker_dialog);
+ else
+ eval_once(qDebug() << "options: asked for tracker tab widget with old-style widget dialog!");
+}
+
+void options_dialog::switch_to_proto_tab()
+{
+ if (proto_dialog)
+ ui.tabWidget->setCurrentWidget(proto_dialog);
+ else
+ eval_once(qDebug() << "options: asked for proto tab widget with old-style widget dialog!");
+}
+
+void options_dialog::switch_to_filter_tab()
+{
+ if (filter_dialog)
+ ui.tabWidget->setCurrentWidget(filter_dialog);
+ else
+ eval_once(qDebug() << "options: asked for filter tab widget with old-style widget dialog!");
+}
+
+void options_dialog::tracker_module_changed()
+{
+ if (tracker_dialog)
+ {
+ unregister_tracker();
+ reload();
+ delete tracker_dialog;
+ tracker_dialog = nullptr;
+ }
+}
+
+void options_dialog::proto_module_changed()
+{
+ if (proto_dialog)
+ {
+ unregister_protocol();
+ reload();
+ delete proto_dialog;
+ proto_dialog = nullptr;
+ }
+}
+
+void options_dialog::filter_module_changed()
+{
+ if (filter_dialog)
+ {
+ unregister_filter();
+ reload();
+ delete filter_dialog;
+ filter_dialog = nullptr;
+ }
+}
+
+void options_dialog::register_tracker(ITracker* t)
+{
+ if (tracker_dialog)
+ tracker_dialog->register_tracker(t);
+}
+
+void options_dialog::unregister_tracker()
+{
+ if (tracker_dialog)
+ tracker_dialog->unregister_tracker();
+}
+
+void options_dialog::register_protocol(IProtocol* p)
{
- if (isHidden()) // close() can return true twice in a row it seems
- return;
- hide();
- if (!close()) // dialog was closed already
- return;
+ if (proto_dialog)
+ proto_dialog->register_protocol(p);
+}
+
+void options_dialog::unregister_protocol()
+{
+ if (proto_dialog)
+ proto_dialog->unregister_protocol();
+}
+
+void options_dialog::register_filter(IFilter* f)
+{
+ if (filter_dialog)
+ filter_dialog->register_filter(f);
+}
+
+void options_dialog::unregister_filter()
+{
+ if (filter_dialog)
+ filter_dialog->unregister_filter();
+}
+using module_list = std::initializer_list<plugin_api::detail::BaseDialog*>;
+
+void options_dialog::save()
+{
main.b->save();
ui.game_detector->save();
set_disable_translation_state(ui.disable_translation->isChecked());
- emit closing();
+
+ for (auto* dlg : module_list{ tracker_dialog, proto_dialog, filter_dialog })
+ if (dlg)
+ dlg->save();
}
-void OptionsDialog::doCancel()
+void options_dialog::reload()
{
- if (isHidden()) // close() can return true twice in a row it seems
- return;
- hide();
- if (!close()) // dialog was closed already
- return;
+ ui.game_detector->revert();
main.b->reload();
- ui.game_detector->revert();
- emit closing();
+ for (auto* dlg : module_list{ tracker_dialog, proto_dialog, filter_dialog })
+ if (dlg)
+ dlg->reload();
+}
+
+void options_dialog::doOK()
+{
+ if (isVisible())
+ {
+ save();
+ close();
+ }
}
-void OptionsDialog::done(int res)
+void options_dialog::doCancel()
{
if (isVisible())
{
- if (res == QDialog::Accepted)
- doOK();
- else
- doCancel();
+ reload();
+ close();
}
}
+
+void options_dialog::closeEvent(QCloseEvent *)
+{
+ reload();
+ emit closing();
+}
+
+options_dialog::~options_dialog()
+{
+ if (tracker_dialog)
+ tracker_dialog->unregister_tracker();
+ if (proto_dialog)
+ proto_dialog->unregister_protocol();
+ if (filter_dialog)
+ filter_dialog->unregister_filter();
+}
diff --git a/gui/options-dialog.hpp b/gui/options-dialog.hpp
index dab919ed..2e5586a5 100644
--- a/gui/options-dialog.hpp
+++ b/gui/options-dialog.hpp
@@ -1,29 +1,57 @@
#pragma once
-#include "ui_options-dialog.h"
+#include "export.hpp"
+
+#include "gui/ui_options-dialog.h"
#include "logic/shortcuts.h"
+
+#include <functional>
+
#include <QObject>
#include <QDialog>
#include <QWidget>
-#include <functional>
-class OptionsDialog : public QDialog
+class OTR_GUI_EXPORT options_dialog final : public QDialog
{
Q_OBJECT
signals:
void closing();
public:
- OptionsDialog(std::function<void(bool)> pause_keybindings);
+ options_dialog(std::unique_ptr<ITrackerDialog>& tracker_dialog_,
+ std::unique_ptr<IProtocolDialog>& proto_dialog_,
+ std::unique_ptr<IFilterDialog>& filter_dialog_,
+ std::function<void(bool)> pause_keybindings);
+ ~options_dialog() override;
+ inline bool embeddable() noexcept { return false; }
+ void switch_to_tracker_tab();
+ void switch_to_proto_tab();
+ void switch_to_filter_tab();
+ void tracker_module_changed();
+ void proto_module_changed();
+ void filter_module_changed();
+ void register_tracker(ITracker* t);
+ void unregister_tracker();
+ void register_protocol(IProtocol* p);
+ void unregister_protocol();
+ void register_filter(IFilter* f);
+ void unregister_filter();
+ void save();
+ void reload();
private:
+ void closeEvent(QCloseEvent*) override;
+ static QString kopts_to_string(const key_opts& opts);
+
main_settings main;
std::function<void(bool)> pause_keybindings;
Ui::options_dialog ui;
- void closeEvent(QCloseEvent *) override;
- static QString kopts_to_string(const key_opts& opts);
+
+ ITrackerDialog* tracker_dialog = nullptr;
+ IProtocolDialog* proto_dialog = nullptr;
+ IFilterDialog* filter_dialog = nullptr;
+
private slots:
void doOK();
void doCancel();
- void done(int res) override;
void bind_key(key_opts &kopts, QLabel* label);
void set_disable_translation_state(bool value);
};
diff --git a/gui/options-dialog.ui b/gui/options-dialog.ui
index f6c04893..9e2c0042 100644
--- a/gui/options-dialog.ui
+++ b/gui/options-dialog.ui
@@ -6,37 +6,25 @@
<rect>
<x>0</x>
<y>0</y>
- <width>588</width>
- <height>552</height>
+ <width>529</width>
+ <height>533</height>
</rect>
</property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
<property name="windowTitle">
<string>Options</string>
</property>
<property name="windowIcon">
<iconset>
- <normaloff>images/facetracknoir.png</normaloff>images/facetracknoir.png</iconset>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="autoFillBackground">
- <bool>false</bool>
+ <normaloff>images/opentrack.png</normaloff>images/opentrack.png</iconset>
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
- <property name="bottomMargin">
- <number>6</number>
+ <property name="topMargin">
+ <number>5</number>
</property>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -48,851 +36,824 @@
<bool>false</bool>
</property>
<widget class="QWidget" name="tab">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
<attribute name="title">
<string>Shortcuts</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
- <property name="leftMargin">
- <number>6</number>
- </property>
- <property name="rightMargin">
- <number>6</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QGroupBox" name="groupBox_8">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <item alignment="Qt::AlignTop">
+ <widget class="QGroupBox" name="groupBox">
<property name="title">
<string>Global shortcuts</string>
</property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_8">
- <property name="spacing">
- <number>3</number>
- </property>
+ <layout class="QGridLayout" name="gridLayout_8">
<property name="leftMargin">
- <number>6</number>
+ <number>16</number>
</property>
- <item>
- <widget class="QLabel" name="label_23">
+ <item row="1" column="1">
+ <widget class="QLabel" name="toggle_text">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="_textLabel2_3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="cursor">
+ <cursorShape>WhatsThisCursor</cursorShape>
+ </property>
+ <property name="toolTip">
+ <string>Use current tracker pose as looking perfectly forward.</string>
+ </property>
<property name="text">
- <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Center&lt;/span&gt; - use current pose as looking perfectly forward.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Toggle&lt;/span&gt; - keep looking at same spot until next toggle keypress.&lt;br/&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Zero&lt;/span&gt; - keep looking forward until next zero keypress.&lt;br/&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ <string>Center</string>
</property>
<property name="wordWrap">
- <bool>true</bool>
+ <bool>false</bool>
</property>
</widget>
</item>
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="styleSheet">
- <string notr="true">QGroupBox { border: 0; }</string>
+ <item row="7" column="4">
+ <widget class="QPushButton" name="bind_toggle_tracking_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="3">
+ <widget class="QLabel" name="restart_tracking_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="4">
+ <widget class="QPushButton" name="bind_restart_tracking_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="_textLabel2_7">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="cursor">
+ <cursorShape>WhatsThisCursor</cursorShape>
+ </property>
+ <property name="text">
+ <string>Start tracking</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="2">
+ <widget class="QPushButton" name="bind_stop">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="1">
+ <widget class="QLabel" name="toggle_tracking_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="center_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0">
+ <widget class="QLabel" name="_textLabel2_8">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="cursor">
+ <cursorShape>WhatsThisCursor</cursorShape>
+ </property>
+ <property name="text">
+ <string>Stop tracking</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QLabel" name="zero_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="_textLabel2_6">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="cursor">
+ <cursorShape>WhatsThisCursor</cursorShape>
+ </property>
+ <property name="toolTip">
+ <string>Keep looking forward until next zero keypress.</string>
+ </property>
+ <property name="text">
+ <string>Zero</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="_textLabel2_5">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="cursor">
+ <cursorShape>WhatsThisCursor</cursorShape>
+ </property>
+ <property name="toolTip">
+ <string>Freeze the position returned by the tracker while this mode is active.</string>
+ </property>
+ <property name="text">
+ <string>Toggle</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="_label_28">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="cursor">
+ <cursorShape>WhatsThisCursor</cursorShape>
+ </property>
+ <property name="text">
+ <string>Zero while held</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QPushButton" name="bind_center">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QLabel" name="toggle_held_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QLabel" name="zero_held_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="2">
+ <widget class="QPushButton" name="bind_toggle_held">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="2">
+ <widget class="QPushButton" name="bind_zero_held">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="0">
+ <widget class="QLabel" name="_textLabel2_10">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="cursor">
+ <cursorShape>WhatsThisCursor</cursorShape>
+ </property>
+ <property name="text">
+ <string>Restart tracking</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="1">
+ <widget class="QLabel" name="restart_tracking_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="_label_27">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="cursor">
+ <cursorShape>WhatsThisCursor</cursorShape>
+ </property>
+ <property name="text">
+ <string>Toggle while held</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="2">
+ <widget class="QPushButton" name="bind_restart_tracking">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="2">
+ <widget class="QPushButton" name="bind_toggle_tracking">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="0">
+ <widget class="QLabel" name="_textLabel2_9">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="cursor">
+ <cursorShape>WhatsThisCursor</cursorShape>
+ </property>
+ <property name="text">
+ <string>Toggle tracking</string>
+ </property>
+ <property name="wordWrap">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2">
+ <widget class="QPushButton" name="bind_start">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="2">
+ <widget class="QPushButton" name="bind_toggle">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QLabel" name="start_tracking_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1">
+ <widget class="QLabel" name="stop_tracking_text">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="3">
+ <widget class="QLabel" name="toggle_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="4">
+ <widget class="QPushButton" name="bind_toggle_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QLabel" name="center_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="4">
+ <widget class="QPushButton" name="bind_center_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="4">
+ <widget class="QPushButton" name="bind_toggle_held_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QPushButton" name="bind_zero">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="3">
+ <widget class="QLabel" name="toggle_held_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="4">
+ <widget class="QPushButton" name="bind_zero_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="3">
+ <widget class="QLabel" name="zero_held_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="3">
+ <widget class="QLabel" name="start_tracking_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QLabel" name="zero_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="4">
+ <widget class="QPushButton" name="bind_zero_held_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="3">
+ <widget class="QLabel" name="stop_tracking_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="3">
+ <widget class="QLabel" name="toggle_tracking_text_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>100</width>
+ <height>0</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="4">
+ <widget class="QPushButton" name="bind_stop_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="4">
+ <widget class="QPushButton" name="bind_start_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Bind</string>
</property>
- <layout class="QGridLayout" name="gridLayout_8">
- <property name="leftMargin">
- <number>9</number>
- </property>
- <property name="rightMargin">
- <number>2</number>
- </property>
- <property name="horizontalSpacing">
- <number>20</number>
- </property>
- <item row="1" column="1">
- <widget class="QLabel" name="toggle_text">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="_textLabel2_3">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Center</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="7" column="4">
- <widget class="QPushButton" name="bind_toggle_tracking_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="8" column="3">
- <widget class="QLabel" name="restart_tracking_text_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="8" column="4">
- <widget class="QPushButton" name="bind_restart_tracking_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="_textLabel2_7">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Start tracking</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="6" column="2">
- <widget class="QPushButton" name="bind_stop">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="7" column="1">
- <widget class="QLabel" name="toggle_tracking_text">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="center_text">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="_textLabel2_8">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Stop tracking</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QLabel" name="zero_text">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="_textLabel2_6">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Zero</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="_textLabel2_5">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Toggle</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="_label_28">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Zero while held</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QPushButton" name="bind_center">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="toggle_held_text">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QLabel" name="zero_held_text">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="2">
- <widget class="QPushButton" name="bind_toggle_held">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="4" column="2">
- <widget class="QPushButton" name="bind_zero_held">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="8" column="0">
- <widget class="QLabel" name="_textLabel2_10">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Restart tracking</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="8" column="1">
- <widget class="QLabel" name="restart_tracking_text">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="_label_27">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Toggle while held</string>
- </property>
- </widget>
- </item>
- <item row="8" column="2">
- <widget class="QPushButton" name="bind_restart_tracking">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="7" column="2">
- <widget class="QPushButton" name="bind_toggle_tracking">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="7" column="0">
- <widget class="QLabel" name="_textLabel2_9">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Toggle tracking</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item row="5" column="2">
- <widget class="QPushButton" name="bind_start">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="1" column="2">
- <widget class="QPushButton" name="bind_toggle">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QLabel" name="start_tracking_text">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="QLabel" name="stop_tracking_text">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="3">
- <widget class="QLabel" name="toggle_text_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="1" column="4">
- <widget class="QPushButton" name="bind_toggle_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="0" column="3">
- <widget class="QLabel" name="center_text_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="4">
- <widget class="QPushButton" name="bind_center_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="2" column="4">
- <widget class="QPushButton" name="bind_toggle_held_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="3" column="2">
- <widget class="QPushButton" name="bind_zero">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="2" column="3">
- <widget class="QLabel" name="toggle_held_text_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="3" column="4">
- <widget class="QPushButton" name="bind_zero_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="4" column="3">
- <widget class="QLabel" name="zero_held_text_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="5" column="3">
- <widget class="QLabel" name="start_tracking_text_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="3" column="3">
- <widget class="QLabel" name="zero_text_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="4" column="4">
- <widget class="QPushButton" name="bind_zero_held_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>80</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="6" column="3">
- <widget class="QLabel" name="stop_tracking_text_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="7" column="3">
- <widget class="QLabel" name="toggle_tracking_text_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>100</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="6" column="4">
- <widget class="QPushButton" name="bind_stop_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- <item row="5" column="4">
- <widget class="QPushButton" name="bind_start_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Bind</string>
- </property>
- </widget>
- </item>
- </layout>
</widget>
</item>
</layout>
</widget>
</item>
<item>
- <widget class="QCheckBox" name="center_at_startup">
+ <widget class="QFrame" name="frame_5">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text">
- <string>Center at startup</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="frame_3">
<property name="frameShape">
- <enum>QFrame::NoFrame</enum>
+ <enum>QFrame::StyledPanel</enum>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
+ <property name="frameShadow">
+ <enum>QFrame::Sunken</enum>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="1" column="0">
<widget class="QCheckBox" name="disable_translation">
<property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Disable user interface localization</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label_18">
+ <property name="text">
+ <string>Centering method</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="center_at_startup">
+ <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
- <string>Never translate the application interface</string>
+ <string>Center at startup</string>
</property>
</widget>
</item>
- <item>
+ <item row="1" column="1">
<widget class="QLabel" name="label_29">
<property name="text">
<string/>
@@ -902,13 +863,46 @@
</property>
</widget>
</item>
+ <item row="0" column="2">
+ <widget class="QComboBox" name="cbox_centering">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>4</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="currentIndex">
+ <number>3</number>
+ </property>
+ <item>
+ <property name="text">
+ <string>Disabled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Point</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Wireless VR 360</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Roll compensated</string>
+ </property>
+ </item>
+ </widget>
+ </item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_11">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -920,14 +914,8 @@
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>2</number>
- </property>
<property name="bottomMargin">
- <number>6</number>
+ <number>9</number>
</property>
<item>
<widget class="QCheckBox" name="trayp">
@@ -958,21 +946,28 @@
</layout>
</widget>
</item>
+ <item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>1</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</widget>
- <widget class="QWidget" name="tab_3">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <widget class="QWidget" name="tab_4">
<attribute name="title">
- <string>Camera</string>
+ <string>Output</string>
</attribute>
- <layout class="QVBoxLayout" name="verticalLayout_2">
+ <layout class="QVBoxLayout" name="verticalLayout_4">
<item>
- <widget class="QGroupBox" name="groupBox_5">
+ <widget class="QGroupBox" name="groupBox_2">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
<horstretch>0</horstretch>
@@ -980,138 +975,621 @@
</sizepolicy>
</property>
<property name="title">
- <string>Camera angle</string>
+ <string>Axis assignment</string>
</property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- <layout class="QGridLayout" name="gridLayout_6">
+ <layout class="QGridLayout" name="gridLayout_5">
+ <property name="horizontalSpacing">
+ <number>12</number>
+ </property>
+ <property name="verticalSpacing">
+ <number>9</number>
+ </property>
<item row="4" column="0">
- <widget class="QCheckBox" name="use_center_as_translation_camera_offset">
+ <widget class="QLabel" name="label_8">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>254</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<property name="text">
- <string>Use camera center as translation offset</string>
+ <string>Pitch</string>
</property>
</widget>
</item>
+ <item row="7" column="1">
+ <widget class="QComboBox" name="src_y">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <item>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Disabled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Relative translation only</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QLabel" name="label_13">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>254</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Source</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="2">
+ <widget class="QLabel" name="label_14">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>254</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Pre-invert</string>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="0">
+ <widget class="QLabel" name="label_10">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>254</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="2">
+ <widget class="QCheckBox" name="invert_yaw_pre">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="2">
+ <widget class="QCheckBox" name="invert_roll_pre">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QComboBox" name="src_yaw">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <item>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Disabled</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="6" column="2">
+ <widget class="QCheckBox" name="invert_x_pre">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="3">
+ <widget class="QCheckBox" name="invert_yaw_post">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QComboBox" name="src_pitch">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <item>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Disabled</string>
+ </property>
+ </item>
+ </widget>
+ </item>
<item row="5" column="0">
- <widget class="QLabel" name="label_17">
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
+ <widget class="QLabel" name="label_9">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>254</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
<property name="text">
- <string>Specify an angle to rotate position tracking. It lets the tracker avoid moving on the X and Y axes when zooming, since camera isn't mounted perfectly in front of the model, but above or below.</string>
+ <string>Roll</string>
</property>
- <property name="alignment">
- <set>Qt::AlignJustify|Qt::AlignVCenter</set>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_15">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>254</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="wordWrap">
- <bool>true</bool>
+ <property name="text">
+ <string>Destination</string>
</property>
- <property name="margin">
- <number>2</number>
+ </widget>
+ </item>
+ <item row="4" column="2">
+ <widget class="QCheckBox" name="invert_pitch_pre">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <property name="openExternalLinks">
- <bool>true</bool>
+ <property name="text">
+ <string/>
</property>
</widget>
</item>
- <item row="6" column="0" alignment="Qt::AlignLeft">
- <widget class="QGroupBox" name="groupBox_3">
- <property name="styleSheet">
- <string notr="true">QGroupBox
-{
- border: 0;
-}</string>
+ <item row="6" column="1">
+ <widget class="QComboBox" name="src_x">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
</property>
- <layout class="QGridLayout" name="gridLayout_7">
- <property name="topMargin">
- <number>2</number>
+ <item>
+ <property name="text">
+ <string>X</string>
</property>
- <property name="bottomMargin">
- <number>2</number>
+ </item>
+ <item>
+ <property name="text">
+ <string>Y</string>
</property>
- <item row="2" column="0">
- <widget class="QLabel" name="label_21">
- <property name="text">
- <string>Roll</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QSpinBox" name="camera_roll">
- <property name="minimumSize">
- <size>
- <width>80</width>
- <height>0</height>
- </size>
- </property>
- <property name="minimum">
- <number>-180</number>
- </property>
- <property name="maximum">
- <number>180</number>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QSpinBox" name="camera_yaw">
- <property name="minimumSize">
- <size>
- <width>80</width>
- <height>0</height>
- </size>
- </property>
- <property name="minimum">
- <number>-180</number>
- </property>
- <property name="maximum">
- <number>180</number>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_19">
- <property name="text">
- <string>Pitch</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QSpinBox" name="camera_pitch">
- <property name="minimumSize">
- <size>
- <width>80</width>
- <height>0</height>
- </size>
- </property>
- <property name="minimum">
- <number>-180</number>
- </property>
- <property name="maximum">
- <number>180</number>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_18">
- <property name="text">
- <string>Yaw</string>
- </property>
- </widget>
- </item>
- </layout>
+ </item>
+ <item>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Disabled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Relative translation only</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="7" column="0">
+ <widget class="QLabel" name="label_11">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>254</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QComboBox" name="src_roll">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <item>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Disabled</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_7">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>254</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="3">
+ <widget class="QLabel" name="label_19">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>254</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Post-invert</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="0">
+ <widget class="QLabel" name="label_12">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>254</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="2">
+ <widget class="QCheckBox" name="invert_z_pre">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="1">
+ <widget class="QComboBox" name="src_z">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <item>
+ <property name="text">
+ <string>X</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Y</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Z</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Yaw</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Pitch</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Roll</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Disabled</string>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Relative translation only</string>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item row="7" column="2">
+ <widget class="QCheckBox" name="invert_y_pre">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="3">
+ <widget class="QCheckBox" name="invert_pitch_post">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="3">
+ <widget class="QCheckBox" name="invert_roll_post">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="3">
+ <widget class="QCheckBox" name="invert_x_post">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="3">
+ <widget class="QCheckBox" name="invert_y_post">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="3">
+ <widget class="QCheckBox" name="invert_z_post">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
+ <horstretch>255</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
</widget>
</item>
</layout>
+ <zorder>label_15</zorder>
+ <zorder>label_13</zorder>
+ <zorder>label_14</zorder>
+ <zorder>src_yaw</zorder>
+ <zorder>invert_yaw_pre</zorder>
+ <zorder>label_7</zorder>
+ <zorder>src_pitch</zorder>
+ <zorder>label_8</zorder>
+ <zorder>invert_pitch_pre</zorder>
+ <zorder>label_9</zorder>
+ <zorder>src_roll</zorder>
+ <zorder>invert_roll_pre</zorder>
+ <zorder>label_10</zorder>
+ <zorder>src_x</zorder>
+ <zorder>invert_x_pre</zorder>
+ <zorder>label_11</zorder>
+ <zorder>src_y</zorder>
+ <zorder>invert_y_pre</zorder>
+ <zorder>label_12</zorder>
+ <zorder>src_z</zorder>
+ <zorder>invert_z_pre</zorder>
+ <zorder>label_19</zorder>
+ <zorder>invert_yaw_post</zorder>
+ <zorder>invert_pitch_post</zorder>
+ <zorder>invert_roll_post</zorder>
+ <zorder>invert_x_post</zorder>
+ <zorder>invert_y_post</zorder>
+ <zorder>invert_z_post</zorder>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_6">
<property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -1126,7 +1604,7 @@
<item>
<widget class="QLabel" name="label_22">
<property name="text">
- <string>Alter the centered position sent to games.</string>
+ <string>Alter the centered position sent to games. Useful if the default position is too much downward or upward.</string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -1202,9 +1680,15 @@
</item>
<item row="0" column="2">
<widget class="QLabel" name="label_4">
+ <property name="layoutDirection">
+ <enum>Qt::LeftToRight</enum>
+ </property>
<property name="text">
<string>X</string>
</property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
</widget>
</item>
<item row="0" column="3">
@@ -1234,6 +1718,9 @@
<property name="text">
<string>Pitch</string>
</property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
</widget>
</item>
<item row="1" column="2">
@@ -1241,6 +1728,9 @@
<property name="text">
<string>Y</string>
</property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
</widget>
</item>
<item row="1" column="1">
@@ -1270,6 +1760,9 @@
<property name="text">
<string>Z</string>
</property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
</widget>
</item>
<item row="2" column="0">
@@ -1277,6 +1770,9 @@
<property name="text">
<string>Roll</string>
</property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
</widget>
</item>
<item row="1" column="3">
@@ -1306,6 +1802,9 @@
<property name="text">
<string>Yaw</string>
</property>
+ <property name="alignment">
+ <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
+ </property>
</widget>
</item>
<item row="0" column="1">
@@ -1337,88 +1836,34 @@
</widget>
</item>
<item>
- <widget class="QGroupBox" name="groupBox_9">
+ <widget class="QGroupBox" name="groupBox_10">
<property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="title">
- <string>Centering method</string>
+ <property name="minimumSize">
+ <size>
+ <width>0</width>
+ <height>50</height>
+ </size>
</property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
+ <property name="title">
+ <string>CSV Data Logging</string>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_10">
+ <layout class="QVBoxLayout" name="verticalLayout_11">
<item>
- <widget class="QLabel" name="label_25">
+ <widget class="QCheckBox" name="tracklogging_enabled">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>4</horstretch>
- <verstretch>0</verstretch>
+ <horstretch>0</horstretch>
+ <verstretch>1</verstretch>
</sizepolicy>
</property>
<property name="text">
- <string>Try changing this if centering doesn't perform correctly for your input device.</string>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="frame">
- <property name="frameShape">
- <enum>QFrame::NoFrame</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
+ <string>Enable - You will be asked for a filename whenever tracking starts</string>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <property name="spacing">
- <number>0</number>
- </property>
- <property name="leftMargin">
- <number>1</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>1</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QLabel" name="label_26">
- <property name="text">
- <string>Method</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="center_method">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <item>
- <property name="text">
- <string>Relative (inertial device)</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Absolute (camera device)</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
</widget>
</item>
</layout>
@@ -1429,708 +1874,106 @@
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeType">
- <enum>QSizePolicy::MinimumExpanding</enum>
- </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>0</height>
+ <height>1</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
- <widget class="QWidget" name="tab_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
+ <widget class="QWidget" name="tab_2">
<attribute name="title">
- <string>Output</string>
+ <string>Relative translation</string>
</attribute>
- <layout class="QVBoxLayout" name="verticalLayout_4">
+ <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QGroupBox" name="groupBox_4">
+ <widget class="QGroupBox" name="groupBox_">
<property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="font">
- <font>
- <kerning>true</kerning>
- </font>
+ <property name="styleSheet">
+ <string notr="true"/>
</property>
<property name="title">
- <string>Output remap</string>
+ <string>Relative translation</string>
</property>
<property name="alignment">
- <set>Qt::AlignHCenter|Qt::AlignTop</set>
- </property>
- <property name="flat">
- <bool>false</bool>
- </property>
- <property name="checkable">
- <bool>false</bool>
+ <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
- <layout class="QGridLayout" name="gridLayout_4" rowstretch="0,0" columnstretch="0">
- <property name="sizeConstraint">
- <enum>QLayout::SetMinAndMaxSize</enum>
- </property>
- <property name="topMargin">
- <number>4</number>
- </property>
- <property name="horizontalSpacing">
- <number>0</number>
- </property>
- <property name="verticalSpacing">
- <number>6</number>
- </property>
- <item row="1" column="0">
- <widget class="QGroupBox" name="groupBox_2">
+ <layout class="QVBoxLayout" name="verticalLayout_7">
+ <item>
+ <widget class="QLabel" name="label_16">
<property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
+ <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="styleSheet">
- <string notr="true">QGroupBox
-{
- border: 0;
-}</string>
+ <property name="text">
+ <string>With relative mode on, translation is applied after rotation. For example, rotating +180 degrees yaw and moving backwards results in moving forward as a result of that rotation.</string>
</property>
- <layout class="QGridLayout" name="gridLayout_5">
- <property name="horizontalSpacing">
- <number>12</number>
- </property>
- <property name="verticalSpacing">
- <number>9</number>
- </property>
- <item row="7" column="2">
- <widget class="QCheckBox" name="invert_y">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="label_9">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>254</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Roll</string>
- </property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="label_10">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>254</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>X</string>
- </property>
- </widget>
- </item>
- <item row="0" column="2">
- <widget class="QLabel" name="label_14">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>254</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Invert</string>
- </property>
- </widget>
- </item>
- <item row="6" column="1">
- <widget class="QComboBox" name="src_x">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <item>
- <property name="text">
- <string>X</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Y</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Z</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Yaw</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Pitch</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Roll</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Disabled</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_8">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>254</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Pitch</string>
- </property>
- </widget>
- </item>
- <item row="7" column="1">
- <widget class="QComboBox" name="src_y">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <item>
- <property name="text">
- <string>X</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Y</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Z</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Yaw</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Pitch</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Roll</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Disabled</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QComboBox" name="src_yaw">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <item>
- <property name="text">
- <string>X</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Y</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Z</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Yaw</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Pitch</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Roll</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Disabled</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="5" column="2">
- <widget class="QCheckBox" name="invert_roll">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="7" column="0">
- <widget class="QLabel" name="label_11">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>254</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Y</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_15">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>254</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Destination</string>
- </property>
- </widget>
- </item>
- <item row="4" column="2">
- <widget class="QCheckBox" name="invert_pitch">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_7">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>254</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Yaw</string>
- </property>
- </widget>
- </item>
- <item row="6" column="2">
- <widget class="QCheckBox" name="invert_x">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="label_13">
+ <property name="alignment">
+ <set>Qt::AlignJustify|Qt::AlignVCenter</set>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ <property name="margin">
+ <number>2</number>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QWidget" name="widget" native="true">
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="label_17">
<property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>254</horstretch>
+ <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <horstretch>10</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
- <string>Source</string>
+ <string>Mode</string>
</property>
</widget>
</item>
- <item row="4" column="1">
- <widget class="QComboBox" name="src_pitch">
+ <item>
+ <widget class="QComboBox" name="reltrans_mode">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <item>
- <property name="text">
- <string>X</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Y</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Z</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Yaw</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Pitch</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Roll</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Disabled</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="3" column="2">
- <widget class="QCheckBox" name="invert_yaw">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
+ <horstretch>4</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QComboBox" name="src_roll">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <property name="currentIndex">
+ <number>0</number>
</property>
<item>
<property name="text">
- <string>X</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Y</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Z</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Yaw</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Pitch</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Roll</string>
- </property>
- </item>
- <item>
- <property name="text">
<string>Disabled</string>
</property>
</item>
- </widget>
- </item>
- <item row="8" column="0">
- <widget class="QLabel" name="label_12">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>254</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Z</string>
- </property>
- </widget>
- </item>
- <item row="8" column="1">
- <widget class="QComboBox" name="src_z">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <item>
- <property name="text">
- <string>X</string>
- </property>
- </item>
<item>
<property name="text">
- <string>Y</string>
+ <string>Enabled</string>
</property>
</item>
<item>
<property name="text">
- <string>Z</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Yaw</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Pitch</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Roll</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Disabled</string>
+ <string>Enabled when not aiming</string>
</property>
</item>
</widget>
</item>
- <item row="8" column="2">
- <widget class="QCheckBox" name="invert_z">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>255</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string/>
- </property>
- </widget>
- </item>
</layout>
- <zorder>label_15</zorder>
- <zorder>label_13</zorder>
- <zorder>label_14</zorder>
- <zorder>src_yaw</zorder>
- <zorder>invert_yaw</zorder>
- <zorder>label_7</zorder>
- <zorder>src_pitch</zorder>
- <zorder>label_8</zorder>
- <zorder>invert_pitch</zorder>
- <zorder>label_9</zorder>
- <zorder>src_roll</zorder>
- <zorder>invert_roll</zorder>
- <zorder>label_10</zorder>
- <zorder>src_x</zorder>
- <zorder>invert_x</zorder>
- <zorder>label_11</zorder>
- <zorder>src_y</zorder>
- <zorder>invert_y</zorder>
- <zorder>label_12</zorder>
- <zorder>src_z</zorder>
- <zorder>invert_z</zorder>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_20">
- <property name="text">
- <string>Assign input axis to output axis.</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignJustify|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::MinimumExpanding</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>0</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_10">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>50</height>
- </size>
- </property>
- <property name="title">
- <string>CSV Data Logging</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_11">
- <property name="bottomMargin">
- <number>11</number>
- </property>
- <item>
- <widget class="QCheckBox" name="tracklogging_enabled">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>1</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Enable - You will be asked for a filename whenever tracking starts</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="tab_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <attribute name="title">
- <string>Relative translation</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout_14">
- <item>
- <widget class="QGroupBox" name="groupBox_">
- <property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="title">
- <string>Relative translation</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_7">
- <item>
- <widget class="QLabel" name="label_16">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>With relative mode on, translation is applied after rotation. For example, rotating +180 degrees yaw and moving backwards results in moving forward as a result of that rotation.</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignJustify|Qt::AlignVCenter</set>
- </property>
- <property name="wordWrap">
- <bool>true</bool>
- </property>
- <property name="margin">
- <number>2</number>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="tcomp_enable">
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string>Enable</string>
- </property>
</widget>
</item>
<item>
@@ -2164,7 +2007,7 @@
<number>0</number>
</property>
<item row="2" column="0">
- <widget class="QCheckBox" name="tcomp_tx_disable">
+ <widget class="QCheckBox" name="tcomp_ty_disable">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>3</horstretch>
@@ -2175,12 +2018,12 @@
<string notr="true"/>
</property>
<property name="text">
- <string>Disable for X</string>
+ <string>Disable for Y</string>
</property>
</widget>
</item>
- <item row="3" column="0">
- <widget class="QCheckBox" name="tcomp_ty_disable">
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="tcomp_tx_disable">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>3</horstretch>
@@ -2191,40 +2034,40 @@
<string notr="true"/>
</property>
<property name="text">
- <string>Disable for Y</string>
+ <string>Disable for X</string>
</property>
</widget>
</item>
- <item row="4" column="0">
- <widget class="QCheckBox" name="tcomp_tz_disable">
+ <item row="3" column="1">
+ <widget class="QCheckBox" name="tcomp_src_roll_disable">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>3</horstretch>
+ <horstretch>2</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
<property name="text">
- <string>Disable for Z (for zoom on Z axis)</string>
+ <string>Disable effect by roll</string>
</property>
</widget>
</item>
- <item row="2" column="1">
- <widget class="QCheckBox" name="tcomp_src_yaw_disable">
+ <item row="3" column="0">
+ <widget class="QCheckBox" name="tcomp_tz_disable">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
- <horstretch>2</horstretch>
+ <horstretch>3</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
<property name="text">
- <string>Disable effect by yaw</string>
+ <string>Disable for Z (for zoom on Z axis)</string>
</property>
</widget>
</item>
- <item row="3" column="1">
+ <item row="2" column="1">
<widget class="QCheckBox" name="tcomp_src_pitch_disable">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
@@ -2237,8 +2080,8 @@
</property>
</widget>
</item>
- <item row="4" column="1">
- <widget class="QCheckBox" name="tcomp_src_roll_disable">
+ <item row="1" column="1">
+ <widget class="QCheckBox" name="tcomp_src_yaw_disable">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>2</horstretch>
@@ -2246,7 +2089,7 @@
</sizepolicy>
</property>
<property name="text">
- <string>Disable effect by roll</string>
+ <string>Disable effect by yaw</string>
</property>
</widget>
</item>
@@ -2259,7 +2102,7 @@
<item>
<widget class="QGroupBox" name="groupBox_12">
<property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum">
+ <sizepolicy hsizetype="Minimum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -2308,42 +2151,23 @@
<property name="spacing">
<number>0</number>
</property>
- <item row="1" column="0">
- <widget class="QLabel" name="label_31">
+ <item row="0" column="0">
+ <widget class="QCheckBox" name="neck_enable">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>15</horstretch>
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
+ <property name="styleSheet">
+ <string notr="true"/>
+ </property>
<property name="text">
- <string>Height from center of rotation</string>
+ <string>Enable</string>
</property>
</widget>
</item>
<item row="1" column="1">
- <widget class="QSpinBox" name="neck_y">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Maximum">
- <horstretch>4</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- <property name="suffix">
- <string> cm</string>
- </property>
- <property name="minimum">
- <number>-100</number>
- </property>
- <property name="maximum">
- <number>100</number>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
<widget class="QSpinBox" name="neck_z">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
@@ -2365,7 +2189,7 @@
</property>
</widget>
</item>
- <item row="2" column="0">
+ <item row="1" column="0">
<widget class="QLabel" name="label_32">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
@@ -2378,22 +2202,6 @@
</property>
</widget>
</item>
- <item row="0" column="0">
- <widget class="QCheckBox" name="neck_enable">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="styleSheet">
- <string notr="true"/>
- </property>
- <property name="text">
- <string>Enable</string>
- </property>
- </widget>
- </item>
</layout>
</widget>
</item>
@@ -2401,17 +2209,14 @@
</widget>
</item>
<item>
- <spacer name="verticalSpacer_2">
+ <spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
- <property name="sizeType">
- <enum>QSizePolicy::MinimumExpanding</enum>
- </property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
- <height>0</height>
+ <height>40</height>
</size>
</property>
</spacer>
@@ -2419,12 +2224,6 @@
</layout>
</widget>
<widget class="QWidget" name="tab_5">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
<attribute name="title">
<string>Game detection</string>
</attribute>
@@ -2490,7 +2289,7 @@
<customwidget>
<class>process_detector</class>
<extends>QWidget</extends>
- <header>process_detector.h</header>
+ <header>gui/process_detector.h</header>
</customwidget>
</customwidgets>
<tabstops>
@@ -2504,32 +2303,54 @@
<tabstop>bind_stop</tabstop>
<tabstop>bind_toggle_tracking</tabstop>
<tabstop>bind_restart_tracking</tabstop>
+ <tabstop>bind_center_2</tabstop>
+ <tabstop>bind_toggle_2</tabstop>
+ <tabstop>bind_toggle_held_2</tabstop>
+ <tabstop>bind_zero_2</tabstop>
+ <tabstop>bind_zero_held_2</tabstop>
+ <tabstop>bind_start_2</tabstop>
+ <tabstop>bind_stop_2</tabstop>
+ <tabstop>bind_toggle_tracking_2</tabstop>
+ <tabstop>bind_restart_tracking_2</tabstop>
+ <tabstop>center_at_startup</tabstop>
+ <tabstop>cbox_centering</tabstop>
+ <tabstop>disable_translation</tabstop>
<tabstop>trayp</tabstop>
<tabstop>tray_start</tabstop>
- <tabstop>use_center_as_translation_camera_offset</tabstop>
- <tabstop>camera_yaw</tabstop>
- <tabstop>camera_pitch</tabstop>
- <tabstop>camera_roll</tabstop>
- <tabstop>pos_rx</tabstop>
- <tabstop>pos_ry</tabstop>
- <tabstop>pos_rz</tabstop>
- <tabstop>pos_tx</tabstop>
- <tabstop>pos_ty</tabstop>
- <tabstop>pos_tz</tabstop>
- <tabstop>center_method</tabstop>
<tabstop>src_yaw</tabstop>
- <tabstop>invert_yaw</tabstop>
+ <tabstop>invert_yaw_pre</tabstop>
+ <tabstop>invert_yaw_post</tabstop>
<tabstop>src_pitch</tabstop>
- <tabstop>invert_pitch</tabstop>
+ <tabstop>invert_pitch_pre</tabstop>
+ <tabstop>invert_pitch_post</tabstop>
<tabstop>src_roll</tabstop>
- <tabstop>invert_roll</tabstop>
+ <tabstop>invert_roll_pre</tabstop>
+ <tabstop>invert_roll_post</tabstop>
<tabstop>src_x</tabstop>
- <tabstop>invert_x</tabstop>
+ <tabstop>invert_x_pre</tabstop>
+ <tabstop>invert_x_post</tabstop>
<tabstop>src_y</tabstop>
- <tabstop>invert_y</tabstop>
+ <tabstop>invert_y_pre</tabstop>
+ <tabstop>invert_y_post</tabstop>
<tabstop>src_z</tabstop>
- <tabstop>invert_z</tabstop>
+ <tabstop>invert_z_pre</tabstop>
+ <tabstop>invert_z_post</tabstop>
+ <tabstop>pos_rx</tabstop>
+ <tabstop>pos_ry</tabstop>
+ <tabstop>pos_rz</tabstop>
+ <tabstop>pos_tx</tabstop>
+ <tabstop>pos_ty</tabstop>
+ <tabstop>pos_tz</tabstop>
<tabstop>tracklogging_enabled</tabstop>
+ <tabstop>reltrans_mode</tabstop>
+ <tabstop>tcomp_tx_disable</tabstop>
+ <tabstop>tcomp_ty_disable</tabstop>
+ <tabstop>tcomp_tz_disable</tabstop>
+ <tabstop>tcomp_src_yaw_disable</tabstop>
+ <tabstop>tcomp_src_pitch_disable</tabstop>
+ <tabstop>tcomp_src_roll_disable</tabstop>
+ <tabstop>neck_enable</tabstop>
+ <tabstop>neck_z</tabstop>
</tabstops>
<resources>
<include location="opentrack-res.qrc"/>
diff --git a/gui/process_detector.cpp b/gui/process_detector.cpp
index e45c0215..74e8caac 100644
--- a/gui/process_detector.cpp
+++ b/gui/process_detector.cpp
@@ -7,8 +7,10 @@
*/
#include "process_detector.h"
-#include "main-window.hpp"
+#include "options/options.hpp"
#include "compat/process-list.hpp"
+#include "compat/base-path.hpp"
+
#include <QList>
#include <QFileDialog>
#include <QComboBox>
@@ -16,41 +18,71 @@
#include <QHash>
#include <QPushButton>
#include <QSettings>
+#include <QtEvents>
+
+static constexpr auto RECORD_SEPARATOR = QChar(char(0x1e)); // RS ^]
+static constexpr auto UNIT_SEPARATOR = QChar(char(0x1f)); // US ^_
+
+using namespace options;
+using namespace options::globals;
-void settings::set_game_list(const QString &game_list)
+void proc_detector_settings::set_game_list(const QString &game_list)
{
- QSettings settings(OPENTRACK_ORG);
- settings.setValue("executable-list", game_list);
+ with_global_settings_object([&](QSettings& settings) {
+ settings.setValue("executable-list", game_list);
+ mark_global_ini_modified();
+ });
}
-QString settings::get_game_list()
+QString proc_detector_settings::get_game_list()
{
- QSettings settings(OPENTRACK_ORG);
- return settings.value("executable-list").toString();
+ return with_global_settings_object([&](QSettings& settings) {
+ return settings.value("executable-list").toString();
+ });
}
-bool settings::is_enabled()
+bool proc_detector_settings::is_enabled()
{
- QSettings settings(OPENTRACK_ORG);
- return settings.value("executable-detector-enabled", false).toBool();
+ return with_global_settings_object([&](QSettings& settings) {
+ return settings.value("executable-detector-enabled", false).toBool();
+ });
}
-void settings::set_is_enabled(bool enabled)
+void proc_detector_settings::set_is_enabled(bool enabled)
{
- QSettings settings(OPENTRACK_ORG);
- settings.setValue("executable-detector-enabled", enabled);
+ with_global_settings_object([&](QSettings& settings) {
+ settings.setValue("executable-detector-enabled", enabled);
+ mark_global_ini_modified();
+ });
}
-QHash<QString, QString> settings::split_process_names()
+#ifdef __GNUG__
+# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+#endif
+
+QHash<QString, QString> proc_detector_settings::split_process_names()
{
- QHash<QString, QString> ret;
QString str = get_game_list();
- QStringList pairs = str.split('|');
- for (auto pair : pairs)
+ constexpr auto split_flag =
+#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
+ Qt::SkipEmptyParts;
+#else
+ QString::SkipEmptyParts;
+#endif
+ QStringList pairs = str.split(RECORD_SEPARATOR, split_flag);
+ QHash<QString, QString> ret;
+ ret.reserve(pairs.size() * 2);
+ for (auto const& pair : pairs)
{
- QList<QString> tmp = pair.split(':');
+ QStringList tmp = pair.split(UNIT_SEPARATOR);
if (tmp.count() != 2)
continue;
+ if (tmp[0].contains(UNIT_SEPARATOR) || tmp[0].contains(RECORD_SEPARATOR))
+ continue;
+ if (tmp[1].contains(UNIT_SEPARATOR) || tmp[1].contains(RECORD_SEPARATOR))
+ continue;
+ if (tmp[0].isEmpty() || tmp[1].isEmpty())
+ continue;
ret[tmp[0]] = tmp[1];
}
return ret;
@@ -58,29 +90,27 @@ QHash<QString, QString> settings::split_process_names()
void BrowseButton::browse()
{
- QFileDialog dialog(this);
- dialog.setFileMode(QFileDialog::ExistingFile);
- QString dir_path = QFileInfo(group::ini_pathname()).absolutePath();
- QString filename = dialog.getOpenFileName(
- this,
- tr("Set executable name"),
- dir_path,
- tr("Executable (*.exe);;All Files (*)"));
- MainWindow::set_working_directory();
+ QString dir_path = QFileInfo(ini_pathname()).absolutePath();
+ QString filename = QFileDialog::getOpenFileName(
+ this,
+ tr("Set executable name"),
+ dir_path,
+ tr("Executable (*.exe);;All Files (*)"));
+ QDir::setCurrent(OPENTRACK_BASE_PATH);
filename = QFileInfo(filename).fileName();
if (!filename.isNull())
twi->setText(filename);
}
-int process_detector::add_row(QString exe_name, QString profile)
+int process_detector::add_row(QString const& exe_name, QString const& profile)
{
int i = ui.tableWidget->rowCount();
ui.tableWidget->insertRow(i);
QComboBox* cb = new QComboBox();
cb->setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Maximum);
- cb->addItem("");
- cb->addItems(group::ini_list());
+ cb->addItems(ini_list());
+ cb->setCurrentText(ini_filename());
ui.tableWidget->setCellWidget(i, 1, cb);
QTableWidgetItem* twi = new QTableWidgetItem(exe_name);
@@ -89,7 +119,7 @@ int process_detector::add_row(QString exe_name, QString profile)
{
BrowseButton* b = new BrowseButton(twi);
b->setText("...");
- QObject::connect(b, SIGNAL(clicked()), b, SLOT(browse()));
+ QObject::connect(b, &BrowseButton::clicked, b, &BrowseButton::browse);
ui.tableWidget->setCellWidget(i, 2, b);
}
@@ -98,13 +128,14 @@ int process_detector::add_row(QString exe_name, QString profile)
return i;
}
-void process_detector::add_items()
+void process_detector::load_rows()
{
+ for (int k = ui.tableWidget->size().height() - 1; k >= 0; k--)
+ ui.tableWidget->removeRow(k);
auto names = s.split_process_names();
- ui.tableWidget->clearContents();
auto keys = names.keys();
std::sort(keys.begin(), keys.end());
- for (auto n : keys)
+ for (auto const& n : keys)
add_row(n, names[n]);
}
@@ -114,13 +145,10 @@ process_detector::process_detector(QWidget* parent) : QWidget(parent)
connect(ui.add, SIGNAL(clicked()), this, SLOT(add()));
connect(ui.remove, SIGNAL(clicked()), this, SLOT(remove()));
- add_items();
+ load_rows();
QResizeEvent e(ui.tableWidget->size(), ui.tableWidget->size());
ui.tableWidget->resizeEvent(&e);
-
- settings s;
-
ui.enabled->setChecked(s.is_enabled());
}
@@ -131,8 +159,11 @@ void process_detector::save()
for (int i = 0; i < ui.tableWidget->rowCount(); i++)
{
auto exe = ui.tableWidget->item(i, 0)->text();
- auto profile = reinterpret_cast<QComboBox*>(ui.tableWidget->cellWidget(i, 1))->currentText();
- str += "|" + exe + ":" + profile;
+ auto widget = qobject_cast<QComboBox*>(ui.tableWidget->cellWidget(i, 1));
+ if (!widget)
+ continue;
+ auto profile = widget->currentText();
+ str += RECORD_SEPARATOR + exe + UNIT_SEPARATOR + profile;
}
s.set_game_list(str);
@@ -141,6 +172,8 @@ void process_detector::save()
void process_detector::revert()
{
+ load_rows();
+ ui.enabled->setChecked(s.is_enabled());
}
void process_detector::add()
@@ -157,14 +190,14 @@ void process_detector::remove()
bool process_detector_worker::should_stop()
{
- if (last_exe_name == "")
+ if (last_exe_name == QString())
return false;
- settings s;
+ proc_detector_settings s;
if (!s.is_enabled())
{
- last_exe_name = "";
+ last_exe_name = QString{};
return false;
}
@@ -173,17 +206,17 @@ bool process_detector_worker::should_stop()
if (exe_list.contains(last_exe_name))
return false;
- last_exe_name = "";
+ last_exe_name = QString{};
return true;
}
-bool process_detector_worker::config_to_start(QString& str)
+bool process_detector_worker::profile_to_start(QString& str)
{
- settings s;
+ proc_detector_settings s;
if (!s.is_enabled())
{
- last_exe_name = "";
+ last_exe_name = QString{};
return false;
}
@@ -192,20 +225,18 @@ bool process_detector_worker::config_to_start(QString& str)
// assuming manual stop by user button click.
// don't automatically start again while the same process is running.
- if (last_exe_name != "" && exe_list.contains(last_exe_name))
+ if (!last_exe_name.isEmpty() && exe_list.contains(last_exe_name))
return false;
// it's gone, we can start automatically again
- last_exe_name = "";
+ last_exe_name = QString();
- for (auto& name : exe_list)
- {
+ for (auto&& name : exe_list)
if (filenames.contains(name))
{
- last_exe_name = name;
str = filenames[name];
- return str != "";
+ last_exe_name = name;
+ return str != QString{};
}
- }
return false;
}
diff --git a/gui/process_detector.h b/gui/process_detector.h
index 475ebde0..b57d859a 100644
--- a/gui/process_detector.h
+++ b/gui/process_detector.h
@@ -8,33 +8,35 @@
#pragma once
-#include <QObject>
-#include <QWidget>
-#include <QTableWidget>
-#include <QResizeEvent>
+#include "export.hpp"
-#include "ui_process_widget.h"
+#include "gui/ui_process_widget.h"
#include "process-detector-fancy-table.hpp"
#include "options/options.hpp"
-struct settings
+#include <QObject>
+#include <QString>
+#include <QWidget>
+#include <QTableWidget>
+
+struct OTR_GUI_EXPORT proc_detector_settings
{
- QHash<QString, QString> split_process_names();
- QString get_game_list();
- void set_game_list(const QString& game_list);
- bool is_enabled();
- void set_is_enabled(bool enabled);
+ static QHash<QString, QString> split_process_names();
+ static QString get_game_list();
+ static void set_game_list(const QString& game_list);
+ static bool is_enabled();
+ static void set_is_enabled(bool enabled);
};
-class process_detector final : public QWidget
+class OTR_GUI_EXPORT process_detector final : public QWidget
{
Q_OBJECT
Ui_process_detector ui;
- settings s;
+ proc_detector_settings s;
- int add_row(QString exe_name = "...", QString profile = "");
- void add_items();
+ int add_row(const QString& exe_name = "...", const QString& profile = "");
+ void load_rows();
public:
process_detector(QWidget* parent = nullptr);
public slots:
@@ -56,13 +58,13 @@ public slots:
void browse();
};
-class process_detector_worker : QObject
+class OTR_GUI_EXPORT process_detector_worker : QObject
{
Q_OBJECT
- settings s;
QString last_exe_name;
+ proc_detector_settings s;
public:
- bool config_to_start(QString& s);
+ [[nodiscard]] bool profile_to_start(QString& str);
bool should_stop();
};
diff --git a/gui/process_widget.ui b/gui/process_widget.ui
index 1415a1e4..005b0d9b 100644
--- a/gui/process_widget.ui
+++ b/gui/process_widget.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>366</width>
- <height>325</height>
+ <height>380</height>
</rect>
</property>
<property name="windowTitle">
@@ -15,9 +15,16 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
+ <widget class="QCheckBox" name="enabled">
+ <property name="text">
+ <string>Start profiles from game executable names in this list</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<widget class="FancyTable" name="tableWidget">
<property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -76,12 +83,15 @@
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="topMargin">
- <number>5</number>
+ <number>4</number>
+ </property>
+ <property name="bottomMargin">
+ <number>4</number>
</property>
<item>
<widget class="QPushButton" name="add">
<property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -101,7 +111,7 @@
<item>
<widget class="QPushButton" name="remove">
<property name="sizePolicy">
- <sizepolicy hsizetype="Maximum" vsizetype="Fixed">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -121,27 +131,19 @@
</layout>
</widget>
</item>
- <item>
- <widget class="QCheckBox" name="enabled">
- <property name="text">
- <string>Start profiles from game executable names in this list</string>
- </property>
- </widget>
- </item>
</layout>
</widget>
<customwidgets>
<customwidget>
<class>FancyTable</class>
<extends>QTableWidget</extends>
- <header>process-detector-fancy-table.hpp</header>
+ <header>gui/process-detector-fancy-table.hpp</header>
</customwidget>
</customwidgets>
<tabstops>
- <tabstop>tableWidget</tabstop>
+ <tabstop>enabled</tabstop>
<tabstop>add</tabstop>
<tabstop>remove</tabstop>
- <tabstop>enabled</tabstop>
</tabstops>
<resources/>
<connections/>