From 829b046649d3de6a37dd0983f3e3beb8f033e19e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Mon, 26 Sep 2016 15:54:58 +0200 Subject: gui: remove several user-visible settings - dynamic pose is now enable iff current model is cap - dynamic pose timeout is now always 500 ms - fov is now always 75 --- gui/options-dialog.cpp | 28 ++--- gui/settings.ui | 321 ++++++++++++++++++++++++------------------------- gui/wizard.cpp | 3 +- gui/wizard.h | 2 +- 4 files changed, 168 insertions(+), 186 deletions(-) (limited to 'gui') diff --git a/gui/options-dialog.cpp b/gui/options-dialog.cpp index d57b9f35..cc85319c 100755 --- a/gui/options-dialog.cpp +++ b/gui/options-dialog.cpp @@ -45,9 +45,9 @@ OptionsDialog::OptionsDialog(main_settings& main, connect(ui.buttonBox, SIGNAL(rejected()), this, SLOT(doCancel())); tie_setting(main.tray_enabled, ui.trayp); - + tie_setting(main.center_at_startup, ui.center_at_startup); - + tie_setting(pt.camera_mode, ui.camera_mode); tie_setting(pt.threshold, ui.threshold_slider); @@ -58,36 +58,32 @@ OptionsDialog::OptionsDialog(main_settings& main, tie_setting(pt.t_MH_x, ui.tx_spin); tie_setting(pt.t_MH_y, ui.ty_spin); tie_setting(pt.t_MH_z, ui.tz_spin); - - tie_setting(pt.fov, ui.camera_fov); - + tie_setting(pt.model_used, ui.model_used); - + connect(ui.ewma_slider, SIGNAL(valueChanged(int)), this, SLOT(update_ewma_display(int))); connect(ui.rotation_slider, SIGNAL(valueChanged(int)), this, SLOT(update_rot_display(int))); connect(ui.rot_dz_slider, SIGNAL(valueChanged(int)), this, SLOT(update_rot_dz_display(int))); connect(ui.translation_slider, SIGNAL(valueChanged(int)), this, SLOT(update_trans_display(int))); connect(ui.trans_dz_slider, SIGNAL(valueChanged(int)), this, SLOT(update_trans_dz_display(int))); - + tie_setting(acc.rot_threshold, ui.rotation_slider); tie_setting(acc.trans_threshold, ui.translation_slider); tie_setting(acc.ewma, ui.ewma_slider); tie_setting(acc.rot_deadzone, ui.rot_dz_slider); tie_setting(acc.trans_deadzone, ui.trans_dz_slider); - + update_rot_display(ui.rotation_slider->value()); update_trans_display(ui.translation_slider->value()); update_ewma_display(ui.ewma_slider->value()); update_rot_dz_display(ui.rot_dz_slider->value()); update_trans_dz_display(ui.trans_dz_slider->value()); - - tie_setting(pt.dynamic_pose, ui.dynamic_pose); - tie_setting(pt.init_phase_timeout, ui.init_phase_timeout); + tie_setting(pt.auto_threshold, ui.auto_threshold); - + connect(&timer,SIGNAL(timeout()), this,SLOT(poll_tracker_info())); connect( ui.tcalib_button,SIGNAL(toggled(bool)), this,SLOT(startstop_trans_calib(bool)) ); - + timer.start(100); tie_setting(main.tcomp_p, ui.tcomp_enable); @@ -106,7 +102,7 @@ OptionsDialog::OptionsDialog(main_settings& main, tie_setting(main.a_x.src, ui.src_x); tie_setting(main.a_y.src, ui.src_y); tie_setting(main.a_z.src, ui.src_z); - + tie_setting(main.camera_yaw, ui.camera_yaw); tie_setting(main.camera_pitch, ui.camera_pitch); tie_setting(main.camera_roll, ui.camera_roll); @@ -121,7 +117,7 @@ OptionsDialog::OptionsDialog(main_settings& main, ui.center_text->setText(kopts_to_string(main.key_center)); ui.toggle_text->setText(kopts_to_string(main.key_toggle)); ui.zero_text->setText(kopts_to_string(main.key_zero)); - + ui.start_tracking_text->setText(kopts_to_string(main.key_start_tracking)); ui.stop_tracking_text->setText(kopts_to_string(main.key_stop_tracking)); ui.toggle_tracking_text->setText(kopts_to_string(main.key_toggle_tracking)); @@ -190,7 +186,7 @@ void OptionsDialog::startstop_trans_calib(bool start) ui.tcalib_button->setChecked(false); return; } - + if (start) { qDebug()<<"TrackerDialog:: Starting translation calibration"; diff --git a/gui/settings.ui b/gui/settings.ui index 59c98e96..3f4ca1c6 100755 --- a/gui/settings.ui +++ b/gui/settings.ui @@ -245,29 +245,34 @@ Camera - + Device - - - - Dynamic pose resolution + + + + + 16 + 0 + - - - - - + Mode + + + 10 + 0 + + 640x480, 75 Hz @@ -290,54 +295,6 @@ - - - - Mode - - - - - - - - 56° - - - - - 75° - - - - - - - - Field of view - - - - - - - Dynamic pose timeout - - - - - - - ms - - - 1 - - - 10000 - - - @@ -519,6 +476,115 @@ + + + + Camera offset + + + + + + <html><head/><body><p>Specify an angle for off-center camera as a basis for which direction is which, avoiding axis interconnect. Also see <a href="https://github.com/opentrack/opentrack/wiki/choosing-camera-offset"><span style=" text-decoration: underline; color:#0000ff;">description on wiki</span></a>.</p></body></html> + + + Qt::AlignJustify|Qt::AlignVCenter + + + true + + + 2 + + + true + + + + + + + QGroupBox +{ + border: 0; +} + + + + + + Roll + + + + + + + + 80 + 0 + + + + -180 + + + 180 + + + + + + + + 80 + 0 + + + + -180 + + + 180 + + + + + + + Pitch + + + + + + + + 80 + 0 + + + + -180 + + + 180 + + + + + + + Yaw + + + + + + + + + @@ -559,6 +625,12 @@ + + + 0 + 0 + + QComboBox::AdjustToMinimumContentsLength @@ -732,115 +804,6 @@ - - - - Camera offset - - - - - - <html><head/><body><p>Specify an angle for off-center camera as a basis for which direction is which, avoiding axis interconnect. Also see <a href="https://github.com/opentrack/opentrack/wiki/choosing-camera-offset"><span style=" text-decoration: underline; color:#0000ff;">description on wiki</span></a>.</p></body></html> - - - Qt::AlignJustify|Qt::AlignVCenter - - - true - - - 2 - - - true - - - - - - - QGroupBox -{ - border: 0; -} - - - - - - Roll - - - - - - - - 80 - 0 - - - - -180 - - - 180 - - - - - - - - 80 - 0 - - - - -180 - - - 180 - - - - - - - Pitch - - - - - - - - 80 - 0 - - - - -180 - - - 180 - - - - - - - Yaw - - - - - - - - - @@ -1747,8 +1710,27 @@ tabWidget + bind_center + bind_toggle + bind_zero + bind_start + bind_stop + bind_toggle_tracking center_at_startup trayp + camera_mode + auto_threshold + threshold_slider + mindiam_spin + maxdiam_spin + camera_yaw + camera_pitch + camera_roll + model_used + tx_spin + ty_spin + tz_spin + tcalib_button tcomp_enable tcomp_rz src_yaw @@ -1763,6 +1745,11 @@ invert_y src_z invert_z + ewma_slider + rotation_slider + rot_dz_slider + translation_slider + trans_dz_slider diff --git a/gui/wizard.cpp b/gui/wizard.cpp index 7e394858..4075e695 100644 --- a/gui/wizard.cpp +++ b/gui/wizard.cpp @@ -3,7 +3,7 @@ #include "tracker-pt/ftnoir_tracker_pt_settings.h" #include "filter-accela/ftnoir_filter_accela.h" -Wizard::Wizard() : QWizard(nullptr) +Wizard::Wizard(QWidget* parent) : QWizard(parent) { ui.setupUi(this); connect(this, SIGNAL(accepted()), this, SLOT(set_data())); @@ -66,7 +66,6 @@ void Wizard::set_data() pt.threshold = 31; pt.min_point_size = 1.5; pt.max_point_size = 50; - pt.fov = 1; pt.camera_mode = 0; pt.model_used = m; pt.b->save(); diff --git a/gui/wizard.h b/gui/wizard.h index 9d359172..bb518788 100644 --- a/gui/wizard.h +++ b/gui/wizard.h @@ -12,7 +12,7 @@ class Wizard : public QWizard Q_OBJECT Ui_wizard ui; public: - Wizard(); + Wizard(QWidget* parent = nullptr); enum Model { Cap = 0, ClipRight = 1, ClipLeft = 2 }; enum { ClipRightX = 135, ClipLeftX = -135 }; -- cgit v1.2.3