diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/CMakeLists.txt | 7 | ||||
-rw-r--r-- | gui/correlation-calibrator.ui | 2 | ||||
-rw-r--r-- | gui/images/english.png | bin | 283 -> 259 bytes | |||
-rw-r--r-- | gui/images/settings16.png | bin | 711 -> 1136 bytes | |||
-rw-r--r-- | gui/init.cpp | 115 | ||||
-rw-r--r-- | gui/init.hpp | 2 | ||||
-rw-r--r-- | gui/lang/de_DE.ts | 428 | ||||
-rw-r--r-- | gui/lang/nl_NL.ts | 70 | ||||
-rw-r--r-- | gui/lang/ru_RU.ts | 77 | ||||
-rw-r--r-- | gui/lang/stub.ts | 76 | ||||
-rw-r--r-- | gui/lang/zh_CN.ts | 76 | ||||
-rw-r--r-- | gui/mapping-dialog.cpp | 23 | ||||
-rw-r--r-- | gui/mapping-dialog.hpp | 1 | ||||
-rw-r--r-- | gui/mapping-dialog.ui | 69 | ||||
-rw-r--r-- | gui/options-dialog.cpp (renamed from gui/settings.cpp) | 223 | ||||
-rw-r--r-- | gui/options-dialog.hpp | 57 | ||||
-rw-r--r-- | gui/options-dialog.ui | 2364 | ||||
-rw-r--r-- | gui/process_detector.cpp | 13 | ||||
-rw-r--r-- | gui/process_widget.ui | 13 | ||||
-rw-r--r-- | gui/settings-dialog.ui | 2202 | ||||
-rw-r--r-- | gui/settings.hpp | 33 |
21 files changed, 3449 insertions, 2402 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index db2f0b9e..8c57221a 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -11,7 +11,12 @@ target_link_libraries(${self} if(APPLE) target_link_libraries(${self} proc) elseif(LINUX) - otr_pkgconfig(${self} libprocps) + 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(NOT APPLE AND NOT WIN32) diff --git a/gui/correlation-calibrator.ui b/gui/correlation-calibrator.ui index d351d5da..02fdf1d2 100644 --- a/gui/correlation-calibrator.ui +++ b/gui/correlation-calibrator.ui @@ -40,7 +40,7 @@ Press "clear calibration" to remove any calibration data pertaining to <enum>Qt::ScrollBarAlwaysOff</enum> </property> <property name="sizeAdjustPolicy"> - <enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum> + <enum>QAbstractScrollArea::AdjustToContents</enum> </property> <property name="autoScroll"> <bool>true</bool> diff --git a/gui/images/english.png b/gui/images/english.png Binary files differindex 187aabf9..87d9f7d7 100644 --- a/gui/images/english.png +++ b/gui/images/english.png diff --git a/gui/images/settings16.png b/gui/images/settings16.png Binary files differindex 3b31623b..fa2e4a11 100644 --- a/gui/images/settings16.png +++ b/gui/images/settings16.png diff --git a/gui/init.cpp b/gui/init.cpp index 3aae5772..b666b4a9 100644 --- a/gui/init.cpp +++ b/gui/init.cpp @@ -21,7 +21,6 @@ using namespace options; #include <QStyleFactory> #include <QLocale> #include <QTranslator> -#include <QApplication> #include <QDir> #include <QFile> #include <QFileDialog> @@ -51,8 +50,10 @@ static void set_fp_mask() #endif #ifdef __APPLE__ +#if defined __i386__ || defined __x86_64__ fesetenv(FE_DFL_DISABLE_SSE_DENORMS_ENV); #endif +#endif #ifdef _WIN32 # ifdef __clang__ @@ -159,53 +160,91 @@ static void qdebug_to_console(QtMsgType loglevel, const QMessageLogContext& ctx, #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://software.intel.com/en-us/articles/limitation-to-the-length-of-the-system-path-variable - static char env_path[4096] { '\0', }; + // 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("/", "\\"); - const QByteArray lib_path_ = QFile::encodeName(lib_path); - QString mod_path = OPENTRACK_BASE_PATH + OPENTRACK_LIBRARY_PATH; mod_path.replace("/", "\\"); - const QByteArray mod_path_ = QFile::encodeName(mod_path); - - const char* contents[] { - "PATH=", - lib_path_.constData(), - ";", - mod_path_.constData(), - ";", - getenv("PATH"), - }; - bool ok = true; + const QString orig_path = qgetenv("PATH"); - for (const char* ptr : contents) - { - if (ptr) - strcat_s(env_path, sizeof(env_path), ptr); + QString env_path; env_path.reserve(4096); - if (!ptr || ptr[0] == '\0' || env_path[0] == '\0') - { - qDebug() << "bad path element" - << (ptr == nullptr ? "<null>" : ptr); - ok = false; - break; - } - } +#if 0 + qDebug() << "orig" << orig_path; + qDebug() << "libpath" << lib_path; + qDebug() << "modpath" << mod_path; +#endif - if (ok) + if (lib_path.isEmpty()) + qDebug() << "env: empty lib_path!"; + else { - const int error = _putenv(env_path); - - if (error) - qDebug() << "can't _putenv win32 path"; + 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 - qDebug() << "can't set win32 path"; + 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(); } } @@ -263,17 +302,18 @@ int otr_main(int argc, char** argv, std::function<std::unique_ptr<QWidget>()> co #endif QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -#if QT_VERSION >= QT_VERSION_CHECK(5, 6, 0) QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); -#endif QApplication app(argc, argv); #ifdef _WIN32 - add_win32_path(); 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); @@ -314,4 +354,3 @@ int otr_main(int argc, char** argv, std::function<std::unique_ptr<QWidget>()> co return ret; } - diff --git a/gui/init.hpp b/gui/init.hpp index 4274f437..28ff55c7 100644 --- a/gui/init.hpp +++ b/gui/init.hpp @@ -8,8 +8,6 @@ OTR_GUI_EXPORT int otr_main(int argc, char** argv, std::function<std::unique_ptr<QWidget>()> const& make_main_window); -// XXX TODO need split MainWindow into mixins each implementing part of the functionality - template<typename F> auto run_application(int argc, char** argv, F&& fun) { 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 "calibrate" in given row to calibrate that axis. Follow instructions in the next window. +Press "clear calibration" 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 60b84189..1b9d8fe9 100644 --- a/gui/lang/nl_NL.ts +++ b/gui/lang/nl_NL.ts @@ -141,10 +141,6 @@ Press "clear calibration" to remove any calibration data pertaining to <translation>Algehele sneltoetsen</translation> </message> <message> - <source><html><head/><body><p><span style=" font-weight:600;">Center</span> - use current pose as looking perfectly forward.<br/><span style=" font-weight:600;">Toggle</span> - keep looking at same spot until next toggle keypress.<br/><span style=" font-weight:600;">Zero</span> - keep looking forward until next zero keypress.<br/></p></body></html></source> - <translation><html><head/><body><p><span style=" font-weight:600;">Centreren</span> - gebruik de huidige kijkrichting als ijkpunt voor het centreren.<br/><span style=" font-weight:600;">Wisselen</span> - kijkrichting blijft op dezelfde plek staan, totdat de ingestelde knop opnieuw wordt ingedrukt.<br/><span style=" font-weight:600;">Zero</span> - Kijkrichting blijft recht vooruit, totdat er op de ingestelde toets gedrukt wordt.<br/></p></body></html></translation> - </message> - <message> <source>Bind</source> <translation>Koppelen</translation> </message> @@ -285,27 +281,15 @@ Press "clear calibration" to remove any calibration data pertaining to <translation>Effect uitschakelen bij rol</translation> </message> <message> - <source>Output remap</source> - <translation>Uitvoer aanpassen</translation> - </message> - <message> - <source>Assign input axis to output axis.</source> - <translation>Ingangs-as toewijzen aan uitgangs-as.</translation> - </message> - <message> <source>X</source> <translation>X</translation> </message> <message> - <source>Invert</source> - <translation>Omkeren</translation> - </message> - <message> <source>Y</source> <translation>Y</translation> </message> <message> - <source>Never translate the application interface</source> + <source>Disable user interface localization</source> <translation>De applicatie nooit vertaald weergeven</translation> </message> <message> @@ -360,6 +344,58 @@ Press "clear calibration" to remove any calibration data pertaining to <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> diff --git a/gui/lang/ru_RU.ts b/gui/lang/ru_RU.ts index d40b4775..5b3fcc03 100644 --- a/gui/lang/ru_RU.ts +++ b/gui/lang/ru_RU.ts @@ -141,11 +141,6 @@ Press "clear calibration" to remove any calibration data pertaining to <translation>Глобальные горячие клавиши</translation> </message> <message> - <source><html><head/><body><p><span style=" font-weight:600;">Center</span> - use current pose as looking perfectly forward.<br/><span style=" font-weight:600;">Toggle</span> - keep looking at same spot until next toggle keypress.<br/><span style=" font-weight:600;">Zero</span> - keep looking forward until next zero keypress.<br/></p></body></html></source> - <translatorcomment>использовать текущую позу как позу вперед</translatorcomment> - <translation><html><head/><body><p><span style=" font-weight:600;">Центрирование</span> - использовать текущую позу в качестве центра.<br/><span style=" font-weight:600;">Фиксация обзора</span> - фиксация обзора до следующего нажатия клавиши.<br/><span style=" font-weight:600;">Центр</span> - фиксирует взгляд в нулевой точке до следующего нажатия клавиши.<br/></p></body></html></translation> - </message> - <message> <source>Bind</source> <translation>Назначить</translation> </message> @@ -190,10 +185,6 @@ Press "clear calibration" to remove any calibration data pertaining to <translation>Центрирование при запуске</translation> </message> <message> - <source>Never translate the application interface</source> - <translation></translation> - </message> - <message> <source>Minimize to tray</source> <translation>Настройка трея</translation> </message> @@ -276,22 +267,10 @@ Press "clear calibration" to remove any calibration data pertaining to <translation>Смещение точки взгляда относительно оси вращения. Работает вместе с относительным сдвигом</translation> </message> <message> - <source>Output remap</source> - <translation>Переназначение осей</translation> - </message> - <message> - <source>Assign input axis to output axis.</source> - <translation>Сопоставление исходных и игровых осей.</translation> - </message> - <message> <source>X</source> <translation>X</translation> </message> <message> - <source>Invert</source> - <translation>Инвертировать</translation> - </message> - <message> <source>Y</source> <translation>Y</translation> </message> @@ -363,6 +342,62 @@ Press "clear calibration" to remove any calibration data pertaining to <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> diff --git a/gui/lang/stub.ts b/gui/lang/stub.ts index b383a0d8..ee96d3be 100644 --- a/gui/lang/stub.ts +++ b/gui/lang/stub.ts @@ -141,10 +141,6 @@ Press "clear calibration" to remove any calibration data pertaining to <translation type="unfinished"></translation> </message> <message> - <source><html><head/><body><p><span style=" font-weight:600;">Center</span> - use current pose as looking perfectly forward.<br/><span style=" font-weight:600;">Toggle</span> - keep looking at same spot until next toggle keypress.<br/><span style=" font-weight:600;">Zero</span> - keep looking forward until next zero keypress.<br/></p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>Bind</source> <translation type="unfinished"></translation> </message> @@ -189,10 +185,6 @@ Press "clear calibration" to remove any calibration data pertaining to <translation type="unfinished"></translation> </message> <message> - <source>Never translate the application interface</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Minimize to tray</source> <translation type="unfinished"></translation> </message> @@ -293,22 +285,10 @@ Press "clear calibration" to remove any calibration data pertaining to <translation type="unfinished"></translation> </message> <message> - <source>Output remap</source> - <translation type="unfinished"></translation> - </message> - <message> - <source>Assign input axis to output axis.</source> - <translation type="unfinished"></translation> - </message> - <message> <source>X</source> <translation type="unfinished"></translation> </message> <message> - <source>Invert</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Y</source> <translation type="unfinished"></translation> </message> @@ -360,6 +340,62 @@ Press "clear calibration" to remove any calibration data pertaining to <source>None</source> <translation type="unfinished"></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>Disable user interface localization</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> diff --git a/gui/lang/zh_CN.ts b/gui/lang/zh_CN.ts index fa2d512c..4914f7e1 100644 --- a/gui/lang/zh_CN.ts +++ b/gui/lang/zh_CN.ts @@ -142,10 +142,6 @@ Press "clear calibration" to remove any calibration data pertaining to <translation>全局快捷键</translation> </message> <message> - <source><html><head/><body><p><span style=" font-weight:600;">Center</span> - use current pose as looking perfectly forward.<br/><span style=" font-weight:600;">Toggle</span> - keep looking at same spot until next toggle keypress.<br/><span style=" font-weight:600;">Zero</span> - keep looking forward until next zero keypress.<br/></p></body></html></source> - <translation><html><head/><body><p><span style=" font-weight:600;">回中位置</span> - 以现在的姿势为最完美向前看.<br/><span style=" font-weight:600;">盯着看</span> - 盯着固定位置直到再次按键.<br/><span style=" font-weight:600;">归零位置</span> - 保持向前看直到再次按键.<br/></p></body></html></translation> - </message> - <message> <source>Center</source> <translation>回中位置</translation> </message> @@ -187,10 +183,10 @@ Press "clear calibration" to remove any calibration data pertaining to </message> <message> <source>Center at startup</source> - <translation>启动时自动回中</translation> + <translation>启动时回中</translation> </message> <message> - <source>Never translate the application interface</source> + <source>Disable user interface localization</source> <translation>关闭翻译界面</translation> </message> <message> @@ -210,10 +206,6 @@ Press "clear calibration" to remove any calibration data pertaining to <translation>输出</translation> </message> <message> - <source>Output remap</source> - <translation>输出重新映射</translation> - </message> - <message> <source>X</source> <translation></translation> </message> @@ -250,24 +242,16 @@ Press "clear calibration" to remove any calibration data pertaining to <translation>源头</translation> </message> <message> - <source>Invert</source> - <translation>反向</translation> - </message> - <message> <source>Destination</source> <translation>目标</translation> </message> <message> - <source>Assign input axis to output axis.</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> + <translation>改变发送到游戏的回中位置. 对于默认位置有明显偏移的很有用.</translation> </message> <message> <source>°</source> @@ -275,7 +259,7 @@ Press "clear calibration" to remove any calibration data pertaining to </message> <message> <source> cm</source> - <translation> 厘米</translation> + <translation></translation> </message> <message> <source>CSV Data Logging</source> @@ -361,6 +345,58 @@ Press "clear calibration" to remove any calibration data pertaining to <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> diff --git a/gui/mapping-dialog.cpp b/gui/mapping-dialog.cpp index af35c999..cdbf532e 100644 --- a/gui/mapping-dialog.cpp +++ b/gui/mapping-dialog.cpp @@ -59,6 +59,10 @@ mapping_dialog::mapping_dialog(Mappings& m) : m(m), widgets{} 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); } @@ -96,9 +100,13 @@ void mapping_dialog::load() 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::t100 }) + 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; @@ -122,8 +130,12 @@ void mapping_dialog::load() value = 1; else if (clamp_x <= a::r45) value = 5; - else + else if (clamp_x <= a::t150) value = 10; + else if (clamp_x <= a::t300) + value = 25; + else + value = 50; qfc.set_x_step(value); }; @@ -139,6 +151,13 @@ void mapping_dialog::load() 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); }; diff --git a/gui/mapping-dialog.hpp b/gui/mapping-dialog.hpp index 09170c62..3758e7c7 100644 --- a/gui/mapping-dialog.hpp +++ b/gui/mapping-dialog.hpp @@ -16,6 +16,7 @@ class OTR_GUI_EXPORT mapping_dialog final : public QDialog public: mapping_dialog(Mappings& m); void refresh_tab(); + inline bool embeddable() noexcept { return false; } private: Ui::mapping_dialog ui; Mappings& m; diff --git a/gui/mapping-dialog.ui b/gui/mapping-dialog.ui index 8d72533d..545b5ae5 100644 --- a/gui/mapping-dialog.ui +++ b/gui/mapping-dialog.ui @@ -352,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> @@ -432,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> @@ -512,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> diff --git a/gui/settings.cpp b/gui/options-dialog.cpp index 3851f0c2..76c3313a 100644 --- a/gui/settings.cpp +++ b/gui/options-dialog.cpp @@ -6,7 +6,7 @@ * notice appear in all copies. */ -#include "settings.hpp" +#include "options-dialog.hpp" #include "keyboard.h" #include "compat/library-path.hpp" @@ -30,7 +30,10 @@ QString options_dialog::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 (kopts.keycode->isEmpty()) return tr("None"); @@ -46,27 +49,40 @@ void options_dialog::set_disable_translation_state(bool value) }); } -options_dialog::options_dialog(std::function<void(bool)> 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); + 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 (unsigned k = 0; k < 3; k++) - ui.reltrans_mode->setItemData(k, int(reltrans_modes[k])); + for (int k = 0; k < 3; k++) + ui.reltrans_mode->setItemData(k, reltrans_modes[k]); tie_setting(main.reltrans_mode, ui.reltrans_mode); @@ -87,12 +103,19 @@ options_dialog::options_dialog(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); @@ -156,14 +179,25 @@ options_dialog::options_dialog(std::function<void(bool)> pause_keybindings) : val.label, [=](const QString&) { val.label->setText(kopts_to_string(val.opt)); }); { - connect(val.button, &QPushButton::clicked, this, [=] { bind_key(val.opt, val.label); }); + connect(val.button, &QPushButton::clicked, this, [=, this] { bind_key(val.opt, val.label); }); } } -} -void options_dialog::closeEvent(QCloseEvent *) -{ - done(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 options_dialog::bind_key(key_opts& kopts, QLabel* label) @@ -197,7 +231,7 @@ void options_dialog::bind_key(key_opts& kopts, QLabel* label) 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); @@ -218,41 +252,152 @@ void options_dialog::bind_key(key_opts& kopts, QLabel* label) label->setText(kopts_to_string(kopts)); } -void options_dialog::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 (isHidden()) // close() can return true twice in a row it seems - return; - hide(); - if (!close()) // dialog was closed already - return; + 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 (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 options_dialog::doCancel() +void options_dialog::reload() { ui.game_detector->revert(); - if (isHidden()) // close() can return true twice in a row it seems - return; - hide(); - if (!close()) // dialog was closed already - return; - main.b->reload(); - emit closing(); + for (auto* dlg : module_list{ tracker_dialog, proto_dialog, filter_dialog }) + if (dlg) + dlg->reload(); } -void options_dialog::done(int res) +void options_dialog::doOK() { if (isVisible()) { - if (res == QDialog::Accepted) - doOK(); - else - doCancel(); + save(); + close(); } } + +void options_dialog::doCancel() +{ + if (isVisible()) + { + 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 new file mode 100644 index 00000000..2e5586a5 --- /dev/null +++ b/gui/options-dialog.hpp @@ -0,0 +1,57 @@ +#pragma once + +#include "export.hpp" + +#include "gui/ui_options-dialog.h" +#include "logic/shortcuts.h" + +#include <functional> + +#include <QObject> +#include <QDialog> +#include <QWidget> + +class OTR_GUI_EXPORT options_dialog final : public QDialog +{ + Q_OBJECT +signals: + void closing(); +public: + 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; + + ITrackerDialog* tracker_dialog = nullptr; + IProtocolDialog* proto_dialog = nullptr; + IFilterDialog* filter_dialog = nullptr; + +private slots: + void doOK(); + void doCancel(); + 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 new file mode 100644 index 00000000..9e2c0042 --- /dev/null +++ b/gui/options-dialog.ui @@ -0,0 +1,2364 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>options_dialog</class> + <widget class="QWidget" name="options_dialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>529</width> + <height>533</height> + </rect> + </property> + <property name="windowTitle"> + <string>Options</string> + </property> + <property name="windowIcon"> + <iconset> + <normaloff>images/opentrack.png</normaloff>images/opentrack.png</iconset> + </property> + <layout class="QVBoxLayout" name="verticalLayout_5"> + <property name="topMargin"> + <number>5</number> + </property> + <item> + <widget class="QTabWidget" name="tabWidget"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="currentIndex"> + <number>0</number> + </property> + <property name="usesScrollButtons"> + <bool>false</bool> + </property> + <widget class="QWidget" name="tab"> + <attribute name="title"> + <string>Shortcuts</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout"> + <item alignment="Qt::AlignTop"> + <widget class="QGroupBox" name="groupBox"> + <property name="title"> + <string>Global shortcuts</string> + </property> + <layout class="QGridLayout" name="gridLayout_8"> + <property name="leftMargin"> + <number>16</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="cursor"> + <cursorShape>WhatsThisCursor</cursorShape> + </property> + <property name="toolTip"> + <string>Use current tracker pose as looking perfectly forward.</string> + </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="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> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_5"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <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>Center at startup</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QLabel" name="label_29"> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="opentrack-res.qrc">:/images/english.png</pixmap> + </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="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Minimize to tray</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <property name="bottomMargin"> + <number>9</number> + </property> + <item> + <widget class="QCheckBox" name="trayp"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Enable tray</string> + </property> + </widget> + </item> + <item> + <widget class="QCheckBox" name="tray_start"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Minimize to tray on startup when enabled</string> + </property> + </widget> + </item> + </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_4"> + <attribute name="title"> + <string>Output</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout_4"> + <item> + <widget class="QGroupBox" name="groupBox_2"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Axis assignment</string> + </property> + <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="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> + <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_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="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_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="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> + <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="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Custom center pose</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + <layout class="QVBoxLayout" name="verticalLayout_6"> + <item> + <widget class="QLabel" name="label_22"> + <property name="text"> + <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> + </property> + <property name="margin"> + <number>2</number> + </property> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox_7"> + <property name="styleSheet"> + <string notr="true">QGroupBox { + border: 0; +}</string> + </property> + <property name="title"> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="flat"> + <bool>false</bool> + </property> + <property name="checkable"> + <bool>false</bool> + </property> + <layout class="QGridLayout" name="gridLayout_3"> + <item row="2" column="1"> + <widget class="QDoubleSpinBox" name="pos_rz"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="suffix"> + <string>°</string> + </property> + <property name="decimals"> + <number>2</number> + </property> + <property name="minimum"> + <double>-180.000000000000000</double> + </property> + <property name="maximum"> + <double>180.000000000000000</double> + </property> + </widget> + </item> + <item row="2" column="3"> + <widget class="QDoubleSpinBox" name="pos_tz"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="suffix"> + <string> cm</string> + </property> + <property name="decimals"> + <number>3</number> + </property> + <property name="minimum"> + <double>-500.000000000000000</double> + </property> + <property name="maximum"> + <double>500.000000000000000</double> + </property> + </widget> + </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"> + <widget class="QDoubleSpinBox" name="pos_tx"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="suffix"> + <string> cm</string> + </property> + <property name="decimals"> + <number>3</number> + </property> + <property name="minimum"> + <double>-500.000000000000000</double> + </property> + <property name="maximum"> + <double>500.000000000000000</double> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label"> + <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"> + <widget class="QLabel" name="label_5"> + <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"> + <widget class="QDoubleSpinBox" name="pos_ry"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="suffix"> + <string>°</string> + </property> + <property name="decimals"> + <number>2</number> + </property> + <property name="minimum"> + <double>-180.000000000000000</double> + </property> + <property name="maximum"> + <double>180.000000000000000</double> + </property> + </widget> + </item> + <item row="2" column="2"> + <widget class="QLabel" name="label_6"> + <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"> + <widget class="QLabel" name="label_3"> + <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"> + <widget class="QDoubleSpinBox" name="pos_ty"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="suffix"> + <string> cm</string> + </property> + <property name="decimals"> + <number>3</number> + </property> + <property name="minimum"> + <double>-500.000000000000000</double> + </property> + <property name="maximum"> + <double>500.000000000000000</double> + </property> + </widget> + </item> + <item row="0" column="0"> + <widget class="QLabel" name="label_2"> + <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"> + <widget class="QDoubleSpinBox" name="pos_rx"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="suffix"> + <string>°</string> + </property> + <property name="decimals"> + <number>2</number> + </property> + <property name="minimum"> + <double>-180.000000000000000</double> + </property> + <property name="maximum"> + <double>180.000000000000000</double> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox_10"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" 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"> + <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> + <item> + <spacer name="verticalSpacer_3"> + <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_2"> + <attribute name="title"> + <string>Relative translation</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <item> + <widget class="QGroupBox" name="groupBox_"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <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="QWidget" name="widget" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <item> + <widget class="QLabel" name="label_17"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <horstretch>10</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Mode</string> + </property> + </widget> + </item> + <item> + <widget class="QComboBox" name="reltrans_mode"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> + <horstretch>4</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="currentIndex"> + <number>0</number> + </property> + <item> + <property name="text"> + <string>Disabled</string> + </property> + </item> + <item> + <property name="text"> + <string>Enabled</string> + </property> + </item> + <item> + <property name="text"> + <string>Enabled when not aiming</string> + </property> + </item> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_2"> + <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="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QGridLayout" name="gridLayout"> + <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="2" column="0"> + <widget class="QCheckBox" name="tcomp_ty_disable"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>3</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="text"> + <string>Disable for Y</string> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QCheckBox" name="tcomp_tx_disable"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>3</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <property name="text"> + <string>Disable for X</string> + </property> + </widget> + </item> + <item row="3" column="1"> + <widget class="QCheckBox" name="tcomp_src_roll_disable"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>2</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Disable effect by roll</string> + </property> + </widget> + </item> + <item row="3" column="0"> + <widget class="QCheckBox" name="tcomp_tz_disable"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>3</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> + </property> + </widget> + </item> + <item row="2" column="1"> + <widget class="QCheckBox" name="tcomp_src_pitch_disable"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>2</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Disable effect by pitch</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <widget class="QCheckBox" name="tcomp_src_yaw_disable"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>2</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Disable effect by yaw</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <widget class="QGroupBox" name="groupBox_12"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Neck displacement</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + <layout class="QVBoxLayout" name="verticalLayout_13"> + <property name="spacing"> + <number>7</number> + </property> + <item> + <widget class="QLabel" name="label_33"> + <property name="text"> + <string>Eyes will be offset from the pivot of rotation, assumed to be the neck. It also works with relative translation disabled.</string> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + <property name="margin"> + <number>0</number> + </property> + </widget> + </item> + <item> + <widget class="QFrame" name="frame_4"> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <layout class="QGridLayout" name="gridLayout_9"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>9</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="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> + <item row="1" column="1"> + <widget class="QSpinBox" name="neck_z"> + <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="1" column="0"> + <widget class="QLabel" name="label_32"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> + <horstretch>15</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Forward from center of rotation</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="verticalSpacer"> + <property name="orientation"> + <enum>Qt::Vertical</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>40</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + <widget class="QWidget" name="tab_5"> + <attribute name="title"> + <string>Game detection</string> + </attribute> + <layout class="QVBoxLayout" name="verticalLayout_9"> + <item> + <widget class="QGroupBox" name="groupBox_1"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="title"> + <string>Game detection</string> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> + </property> + <layout class="QVBoxLayout" name="verticalLayout_12"> + <item> + <widget class="QLabel" name="label_24"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text"> + <string>Start tracking automatically when a game starts with selected profile, and stop when the game exits.</string> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="process_detector" name="game_detector" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + <item> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + </layout> + </widget> + <customwidgets> + <customwidget> + <class>process_detector</class> + <extends>QWidget</extends> + <header>gui/process_detector.h</header> + </customwidget> + </customwidgets> + <tabstops> + <tabstop>tabWidget</tabstop> + <tabstop>bind_center</tabstop> + <tabstop>bind_toggle</tabstop> + <tabstop>bind_toggle_held</tabstop> + <tabstop>bind_zero</tabstop> + <tabstop>bind_zero_held</tabstop> + <tabstop>bind_start</tabstop> + <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>src_yaw</tabstop> + <tabstop>invert_yaw_pre</tabstop> + <tabstop>invert_yaw_post</tabstop> + <tabstop>src_pitch</tabstop> + <tabstop>invert_pitch_pre</tabstop> + <tabstop>invert_pitch_post</tabstop> + <tabstop>src_roll</tabstop> + <tabstop>invert_roll_pre</tabstop> + <tabstop>invert_roll_post</tabstop> + <tabstop>src_x</tabstop> + <tabstop>invert_x_pre</tabstop> + <tabstop>invert_x_post</tabstop> + <tabstop>src_y</tabstop> + <tabstop>invert_y_pre</tabstop> + <tabstop>invert_y_post</tabstop> + <tabstop>src_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"/> + </resources> + <connections/> + <slots> + <slot>startEngineClicked()</slot> + <slot>stopEngineClicked()</slot> + <slot>cameraSettingsClicked()</slot> + </slots> +</ui> diff --git a/gui/process_detector.cpp b/gui/process_detector.cpp index b8de227d..74e8caac 100644 --- a/gui/process_detector.cpp +++ b/gui/process_detector.cpp @@ -56,10 +56,20 @@ void proc_detector_settings::set_is_enabled(bool enabled) }); } +#ifdef __GNUG__ +# pragma GCC diagnostic ignored "-Wdeprecated-declarations" +#endif + QHash<QString, QString> proc_detector_settings::split_process_names() { QString str = get_game_list(); - QStringList pairs = str.split(RECORD_SEPARATOR, QString::SkipEmptyParts); + 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) @@ -163,6 +173,7 @@ void process_detector::save() void process_detector::revert() { load_rows(); + ui.enabled->setChecked(s.is_enabled()); } void process_detector::add() diff --git a/gui/process_widget.ui b/gui/process_widget.ui index 9e7b4973..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"> @@ -24,7 +24,7 @@ <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> @@ -83,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> @@ -108,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> diff --git a/gui/settings-dialog.ui b/gui/settings-dialog.ui deleted file mode 100644 index 6333692a..00000000 --- a/gui/settings-dialog.ui +++ /dev/null @@ -1,2202 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<ui version="4.0"> - <class>options_dialog</class> - <widget class="QWidget" name="options_dialog"> - <property name="geometry"> - <rect> - <x>0</x> - <y>0</y> - <width>548</width> - <height>599</height> - </rect> - </property> - <property name="windowTitle"> - <string>Options</string> - </property> - <property name="windowIcon"> - <iconset> - <normaloff>images/opentrack.png</normaloff>images/opentrack.png</iconset> - </property> - <layout class="QVBoxLayout" name="verticalLayout_5"> - <property name="topMargin"> - <number>5</number> - </property> - <item> - <widget class="QTabWidget" name="tabWidget"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Minimum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="currentIndex"> - <number>0</number> - </property> - <property name="usesScrollButtons"> - <bool>false</bool> - </property> - <widget class="QWidget" name="tab"> - <attribute name="title"> - <string>Shortcuts</string> - </attribute> - <layout class="QVBoxLayout" name="verticalLayout"> - <item> - <widget class="QGroupBox" name="groupBox_8"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <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"> - <item> - <widget class="QLabel" name="label_23"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string><html><head/><body><p><span style=" font-weight:600;">Center</span> - use current pose as looking perfectly forward.<br/><span style=" font-weight:600;">Toggle</span> - keep looking at same spot until next toggle keypress.<br/><span style=" font-weight:600;">Zero</span> - keep looking forward until next zero keypress.<br/></p></body></html></string> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QGroupBox" name="groupBox"> - <property name="styleSheet"> - <string notr="true">QGroupBox { border: 0; }</string> - </property> - <layout class="QGridLayout" name="gridLayout_8"> - <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="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="QFrame" name="frame_5"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Sunken</enum> - </property> - <layout class="QGridLayout" name="gridLayout_2"> - <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>Center at startup</string> - </property> - </widget> - </item> - <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>Never translate the application interface</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QLabel" name="label_29"> - <property name="text"> - <string/> - </property> - <property name="pixmap"> - <pixmap resource="opentrack-res.qrc">:/images/english.png</pixmap> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="groupBox_11"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Minimize to tray</string> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> - </property> - <layout class="QVBoxLayout" name="verticalLayout_3"> - <property name="bottomMargin"> - <number>9</number> - </property> - <item> - <widget class="QCheckBox" name="trayp"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Enable tray</string> - </property> - </widget> - </item> - <item> - <widget class="QCheckBox" name="tray_start"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Minimize to tray on startup when enabled</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - <widget class="QWidget" name="tab_4"> - <attribute name="title"> - <string>Output</string> - </attribute> - <layout class="QVBoxLayout" name="verticalLayout_4"> - <property name="topMargin"> - <number>0</number> - </property> - <item> - <widget class="QGroupBox" name="groupBox_4"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <kerning>true</kerning> - </font> - </property> - <property name="title"> - <string>Output remap</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> - </property> - <layout class="QGridLayout" name="gridLayout_4"> - <item row="1" column="0"> - <widget class="QGroupBox" name="groupBox_2"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true">QGroupBox -{ - border: 0; -}</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="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="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="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="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="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="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="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="2"> - <widget class="QCheckBox" name="invert_yaw"> - <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="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"> - <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="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="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> - <item> - <property name="text"> - <string>Relative translation only</string> - </property> - </item> - </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="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="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> - </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> - <widget class="QGroupBox" name="groupBox_6"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Custom center pose</string> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> - </property> - <layout class="QVBoxLayout" name="verticalLayout_6"> - <item> - <widget class="QLabel" name="label_22"> - <property name="text"> - <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> - </property> - <property name="margin"> - <number>2</number> - </property> - </widget> - </item> - <item> - <widget class="QGroupBox" name="groupBox_7"> - <property name="styleSheet"> - <string notr="true">QGroupBox { - border: 0; -}</string> - </property> - <property name="title"> - <string/> - </property> - <property name="alignment"> - <set>Qt::AlignCenter</set> - </property> - <property name="flat"> - <bool>false</bool> - </property> - <property name="checkable"> - <bool>false</bool> - </property> - <layout class="QGridLayout" name="gridLayout_3"> - <item row="2" column="1"> - <widget class="QDoubleSpinBox" name="pos_rz"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="suffix"> - <string>°</string> - </property> - <property name="decimals"> - <number>2</number> - </property> - <property name="minimum"> - <double>-180.000000000000000</double> - </property> - <property name="maximum"> - <double>180.000000000000000</double> - </property> - </widget> - </item> - <item row="2" column="3"> - <widget class="QDoubleSpinBox" name="pos_tz"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="suffix"> - <string> cm</string> - </property> - <property name="decimals"> - <number>3</number> - </property> - <property name="minimum"> - <double>-500.000000000000000</double> - </property> - <property name="maximum"> - <double>500.000000000000000</double> - </property> - </widget> - </item> - <item row="0" column="2"> - <widget class="QLabel" name="label_4"> - <property name="text"> - <string>X</string> - </property> - </widget> - </item> - <item row="0" column="3"> - <widget class="QDoubleSpinBox" name="pos_tx"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="suffix"> - <string> cm</string> - </property> - <property name="decimals"> - <number>3</number> - </property> - <property name="minimum"> - <double>-500.000000000000000</double> - </property> - <property name="maximum"> - <double>500.000000000000000</double> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QLabel" name="label"> - <property name="text"> - <string>Pitch</string> - </property> - </widget> - </item> - <item row="1" column="2"> - <widget class="QLabel" name="label_5"> - <property name="text"> - <string>Y</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QDoubleSpinBox" name="pos_ry"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="suffix"> - <string>°</string> - </property> - <property name="decimals"> - <number>2</number> - </property> - <property name="minimum"> - <double>-180.000000000000000</double> - </property> - <property name="maximum"> - <double>180.000000000000000</double> - </property> - </widget> - </item> - <item row="2" column="2"> - <widget class="QLabel" name="label_6"> - <property name="text"> - <string>Z</string> - </property> - </widget> - </item> - <item row="2" column="0"> - <widget class="QLabel" name="label_3"> - <property name="text"> - <string>Roll</string> - </property> - </widget> - </item> - <item row="1" column="3"> - <widget class="QDoubleSpinBox" name="pos_ty"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="suffix"> - <string> cm</string> - </property> - <property name="decimals"> - <number>3</number> - </property> - <property name="minimum"> - <double>-500.000000000000000</double> - </property> - <property name="maximum"> - <double>500.000000000000000</double> - </property> - </widget> - </item> - <item row="0" column="0"> - <widget class="QLabel" name="label_2"> - <property name="text"> - <string>Yaw</string> - </property> - </widget> - </item> - <item row="0" column="1"> - <widget class="QDoubleSpinBox" name="pos_rx"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="suffix"> - <string>°</string> - </property> - <property name="decimals"> - <number>2</number> - </property> - <property name="minimum"> - <double>-180.000000000000000</double> - </property> - <property name="maximum"> - <double>180.000000000000000</double> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="groupBox_10"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" 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"> - <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"> - <attribute name="title"> - <string>Relative translation</string> - </attribute> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <item> - <widget class="QGroupBox" name="groupBox_"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <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="QWidget" name="widget" native="true"> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QLabel" name="label_17"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> - <horstretch>10</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Mode</string> - </property> - </widget> - </item> - <item> - <widget class="QComboBox" name="reltrans_mode"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>4</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <item> - <property name="text"> - <string>Disabled</string> - </property> - </item> - <item> - <property name="text"> - <string>Enabled</string> - </property> - </item> - <item> - <property name="text"> - <string>Enabled when not aiming</string> - </property> - </item> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QFrame" name="frame_2"> - <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="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QGridLayout" name="gridLayout"> - <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="2" column="0"> - <widget class="QCheckBox" name="tcomp_ty_disable"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>3</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="text"> - <string>Disable for Y</string> - </property> - </widget> - </item> - <item row="1" column="0"> - <widget class="QCheckBox" name="tcomp_tx_disable"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>3</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <property name="text"> - <string>Disable for X</string> - </property> - </widget> - </item> - <item row="3" column="1"> - <widget class="QCheckBox" name="tcomp_src_roll_disable"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>2</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Disable effect by roll</string> - </property> - </widget> - </item> - <item row="3" column="0"> - <widget class="QCheckBox" name="tcomp_tz_disable"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>3</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> - </property> - </widget> - </item> - <item row="2" column="1"> - <widget class="QCheckBox" name="tcomp_src_pitch_disable"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>2</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Disable effect by pitch</string> - </property> - </widget> - </item> - <item row="1" column="1"> - <widget class="QCheckBox" name="tcomp_src_yaw_disable"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>2</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Disable effect by yaw</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <widget class="QGroupBox" name="groupBox_12"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Minimum" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Neck displacement</string> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> - </property> - <layout class="QVBoxLayout" name="verticalLayout_13"> - <property name="spacing"> - <number>7</number> - </property> - <item> - <widget class="QLabel" name="label_33"> - <property name="text"> - <string>Eyes will be offset from the pivot of rotation, assumed to be the neck. It also works with relative translation disabled.</string> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - <property name="margin"> - <number>0</number> - </property> - </widget> - </item> - <item> - <widget class="QFrame" name="frame_4"> - <property name="frameShape"> - <enum>QFrame::NoFrame</enum> - </property> - <layout class="QGridLayout" name="gridLayout_9"> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>9</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="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> - <item row="1" column="1"> - <widget class="QSpinBox" name="neck_z"> - <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="1" column="0"> - <widget class="QLabel" name="label_32"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>15</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Forward from center of rotation</string> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <spacer name="verticalSpacer"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>20</width> - <height>40</height> - </size> - </property> - </spacer> - </item> - </layout> - </widget> - <widget class="QWidget" name="tab_5"> - <attribute name="title"> - <string>Game detection</string> - </attribute> - <layout class="QVBoxLayout" name="verticalLayout_9"> - <item> - <widget class="QGroupBox" name="groupBox_1"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="title"> - <string>Game detection</string> - </property> - <property name="alignment"> - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set> - </property> - <layout class="QVBoxLayout" name="verticalLayout_12"> - <item> - <widget class="QLabel" name="label_24"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Maximum"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Start tracking automatically when a game starts with selected profile, and stop when the game exits.</string> - </property> - <property name="wordWrap"> - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="process_detector" name="game_detector" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </widget> - </item> - <item> - <widget class="QDialogButtonBox" name="buttonBox"> - <property name="standardButtons"> - <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> - </property> - </widget> - </item> - </layout> - </widget> - <customwidgets> - <customwidget> - <class>process_detector</class> - <extends>QWidget</extends> - <header>gui/process_detector.h</header> - </customwidget> - </customwidgets> - <tabstops> - <tabstop>tabWidget</tabstop> - <tabstop>bind_center</tabstop> - <tabstop>bind_toggle</tabstop> - <tabstop>bind_toggle_held</tabstop> - <tabstop>bind_zero</tabstop> - <tabstop>bind_zero_held</tabstop> - <tabstop>bind_start</tabstop> - <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>disable_translation</tabstop> - <tabstop>trayp</tabstop> - <tabstop>tray_start</tabstop> - <tabstop>src_yaw</tabstop> - <tabstop>invert_yaw</tabstop> - <tabstop>src_pitch</tabstop> - <tabstop>invert_pitch</tabstop> - <tabstop>src_roll</tabstop> - <tabstop>invert_roll</tabstop> - <tabstop>src_x</tabstop> - <tabstop>invert_x</tabstop> - <tabstop>src_y</tabstop> - <tabstop>invert_y</tabstop> - <tabstop>src_z</tabstop> - <tabstop>invert_z</tabstop> - <tabstop>tracklogging_enabled</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"/> - </resources> - <connections/> - <slots> - <slot>startEngineClicked()</slot> - <slot>stopEngineClicked()</slot> - <slot>cameraSettingsClicked()</slot> - </slots> -</ui> diff --git a/gui/settings.hpp b/gui/settings.hpp deleted file mode 100644 index 8ef5aa2d..00000000 --- a/gui/settings.hpp +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once - -#include "export.hpp" - -#include "gui/ui_settings-dialog.h" -#include "logic/shortcuts.h" - -#include <functional> - -#include <QObject> -#include <QDialog> -#include <QWidget> - -class OTR_GUI_EXPORT options_dialog : public QDialog -{ - Q_OBJECT -signals: - void closing(); -public: - explicit options_dialog(std::function<void(bool)> pause_keybindings); -private: - 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); -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); -}; |