From f2bb47e9261df4f060fcaec3c808ea6537a68eab Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Tue, 28 Oct 2014 09:06:16 +0100 Subject: hook up tray to build Issue: #64 --- opentrack/keyboard.ui | 335 +++++++++++++++++++++++--------------------- opentrack/main-settings.hpp | 2 +- opentrack/shortcuts.cpp | 2 + opentrack/shortcuts.h | 7 +- 4 files changed, 185 insertions(+), 161 deletions(-) (limited to 'opentrack') diff --git a/opentrack/keyboard.ui b/opentrack/keyboard.ui index f576d8fb..321992e2 100644 --- a/opentrack/keyboard.ui +++ b/opentrack/keyboard.ui @@ -7,7 +7,7 @@ 0 0 415 - 143 + 332 @@ -29,175 +29,194 @@ false - - - - - - 0 - 0 - - - - Toggle - - - false - - - - - - - - 0 - 0 - - - - Center - - - false - + + + + + QFrame::StyledPanel + + + QFrame::Plain + + + + + + + 0 + 0 + + + + Keyboard + + + Qt::AlignCenter + + + false + + + + + + + + 0 + 0 + + + + Center + + + false + + + + + + + + 50 + 16777215 + + + + Shift + + + + + + + + 50 + 16777215 + + + + Ctrl + + + + + + + + 50 + 16777215 + + + + Alt + + + + + + + + 90 + 0 + + + + Select Number + + + QComboBox::InsertAlphabetically + + + + + + + + 0 + 0 + + + + Toggle + + + false + + + + + + + + 50 + 16777215 + + + + Shift + + + + + + + + 50 + 16777215 + + + + Ctrl + + + + + + + + 50 + 16777215 + + + + Alt + + + + + + + + 90 + 0 + + + + Select Number + + + QComboBox::InsertAlphabetically + + + + - - - - - 50 - 16777215 - - + + - Shift + Start in tray, minimize to tray - - - - - 90 - 0 - - - - Select Number - - - QComboBox::InsertAlphabetically - - - - - - - - 50 - 16777215 - - - - Alt - - - - - - - - 50 - 16777215 - - - - Ctrl - - - - - - - - 0 - 0 - - - - Keyboard - - - Qt::AlignCenter - - - false - - - - - - - - 50 - 16777215 - - - - Alt - - - - + QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - - 50 - 16777215 - - - - Ctrl - - - - - - - - 50 - 16777215 - - - - Shift - - - - - - - - 90 - 0 - - - - Select Number - - - QComboBox::InsertAlphabetically - - - diff --git a/opentrack/main-settings.hpp b/opentrack/main-settings.hpp index 83ec8968..4f1eff31 100644 --- a/opentrack/main-settings.hpp +++ b/opentrack/main-settings.hpp @@ -42,6 +42,6 @@ struct main_settings { a_roll(b, "roll", Roll), tcomp_p(b, "compensate-translation", true), tcomp_tz(b, "compensate-translation-disable-z-axis", false), - tray_enabled(false, "use-system-tray", true) + tray_enabled(b, "use-system-tray", false) {} }; diff --git a/opentrack/shortcuts.cpp b/opentrack/shortcuts.cpp index 851c5826..75b86a29 100644 --- a/opentrack/shortcuts.cpp +++ b/opentrack/shortcuts.cpp @@ -21,6 +21,8 @@ KeyboardShortcutDialog::KeyboardShortcutDialog() tie_setting(s.toggle.alt, ui.chkToggleAlt); tie_setting(s.toggle.shift, ui.chkToggleShift); tie_setting(s.toggle.ctrl, ui.chkToggleCtrl); + + tie_setting(s.s_main.tray_enabled, ui.trayp); } void KeyboardShortcutDialog::doOK() { diff --git a/opentrack/shortcuts.h b/opentrack/shortcuts.h index 298907c7..523bc7b2 100644 --- a/opentrack/shortcuts.h +++ b/opentrack/shortcuts.h @@ -10,7 +10,8 @@ #include "qxt-mini/QxtGlobalShortcut" #include "opentrack/plugin-support.h" #include "opentrack/options.hpp" -#include "ui_ftnoir_keyboardshortcuts.h" +#include "opentrack/main-settings.hpp" +#include "ui_keyboard.h" using namespace options; @@ -95,10 +96,12 @@ struct Shortcuts { struct settings { pbundle b; key_opts center, toggle; + main_settings s_main; settings() : b(bundle("keyboard-shortcuts")), center(b, "center"), - toggle(b, "toggle") + toggle(b, "toggle"), + s_main(bundle("opentrack-ui")) {} } s; -- cgit v1.2.3