From 146540da2d1427a4172eb422cff94d89f03ce891 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 13 Jun 2014 09:01:04 +0200 Subject: Ding! Issue: #34 --- facetracknoir/facetracknoir.cpp | 7 +- facetracknoir/ftnoir_keyboardshortcuts.ui | 125 ++++++++++++++++-------------- facetracknoir/main-settings.hpp | 5 +- facetracknoir/shortcuts.cpp | 2 + 4 files changed, 76 insertions(+), 63 deletions(-) (limited to 'facetracknoir') diff --git a/facetracknoir/facetracknoir.cpp b/facetracknoir/facetracknoir.cpp index 98c8c2c2..893e79cd 100644 --- a/facetracknoir/facetracknoir.cpp +++ b/facetracknoir/facetracknoir.cpp @@ -679,7 +679,8 @@ void FaceTrackNoIR::bindKeyboardShortcuts() void FaceTrackNoIR::shortcutRecentered() { - QApplication::beep(); + if (s.dingp) + QApplication::beep(); qDebug() << "Center"; if (tracker) @@ -688,7 +689,9 @@ void FaceTrackNoIR::shortcutRecentered() void FaceTrackNoIR::shortcutToggled() { - QApplication::beep(); + if (s.dingp) + QApplication::beep(); + qDebug() << "Toggle"; if (tracker) tracker->enabled = !tracker->enabled; diff --git a/facetracknoir/ftnoir_keyboardshortcuts.ui b/facetracknoir/ftnoir_keyboardshortcuts.ui index 94d11734..5bdc3334 100644 --- a/facetracknoir/ftnoir_keyboardshortcuts.ui +++ b/facetracknoir/ftnoir_keyboardshortcuts.ui @@ -7,7 +7,7 @@ 0 0 371 - 131 + 125 @@ -30,27 +30,37 @@ false - - - - - 0 - 0 - + + + + + 50 + 16777215 + - Keyboard + Shift - - Qt::AlignCenter + + + + + + + 90 + 0 + - - false + + Select Number + + + QComboBox::InsertAlphabetically - - + + 0 @@ -58,15 +68,15 @@ - Center + Toggle false - - + + 50 @@ -74,7 +84,7 @@ - Shift + Alt @@ -91,19 +101,6 @@ - - - - - 50 - 16777215 - - - - Alt - - - @@ -120,8 +117,8 @@ - - + + 0 @@ -129,23 +126,20 @@ - Toggle + Keyboard + + + Qt::AlignCenter false - - - - - 50 - 16777215 - - - - Shift + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok @@ -162,6 +156,22 @@ + + + + + 0 + 0 + + + + Center + + + false + + + @@ -175,26 +185,23 @@ - - - + + + - 90 - 0 + 50 + 16777215 - - Select Number - - - QComboBox::InsertAlphabetically + + Shift - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + Ding! diff --git a/facetracknoir/main-settings.hpp b/facetracknoir/main-settings.hpp index c9b5ff66..8e93bd24 100644 --- a/facetracknoir/main-settings.hpp +++ b/facetracknoir/main-settings.hpp @@ -35,7 +35,7 @@ struct main_settings { key_opts toggle_key; value tracker_dll, tracker2_dll, filter_dll, protocol_dll; axis_opts a_x, a_y, a_z, a_yaw, a_pitch, a_roll; - value tcomp_p, tcomp_tz; + value tcomp_p, tcomp_tz, dingp; main_settings(pbundle b) : b(b), center_key(b, "center"), @@ -51,6 +51,7 @@ struct main_settings { a_pitch(b, "pitch"), a_roll(b, "roll"), tcomp_p(b, "compensate-translation", true), - tcomp_tz(b, "compensate-translation-disable-z-axis", false) + tcomp_tz(b, "compensate-translation-disable-z-axis", false), + dingp(b, "ding", true) {} }; diff --git a/facetracknoir/shortcuts.cpp b/facetracknoir/shortcuts.cpp index a905be57..601bbcc6 100644 --- a/facetracknoir/shortcuts.cpp +++ b/facetracknoir/shortcuts.cpp @@ -29,6 +29,8 @@ KeyboardShortcutDialog::KeyboardShortcutDialog( FaceTrackNoIR *ftnoir, QWidget * tie_setting(mainApp->s.toggle_key.alt, ui.chkToggleAlt); tie_setting(mainApp->s.toggle_key.shift, ui.chkToggleShift); tie_setting(mainApp->s.toggle_key.ctrl, ui.chkToggleCtrl); + + tie_setting(mainApp->s.dingp, ui.ding); } // -- cgit v1.2.3