diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-11-23 10:42:31 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-11-23 10:42:31 +0100 |
commit | 804034f05ead001b3871decd4ddc04de38b5f5c8 (patch) | |
tree | 2eebdbb1b7ad2eb405f43e035395b90d9a4b346e /filter-accela | |
parent | e565e1ad05dd4e68314f16eb71eb819217c68739 (diff) |
filter/accela: simplify debug dialog creation
Diffstat (limited to 'filter-accela')
-rw-r--r-- | filter-accela/ftnoir_filter_accela_dialog.cpp | 47 |
1 files changed, 25 insertions, 22 deletions
diff --git a/filter-accela/ftnoir_filter_accela_dialog.cpp b/filter-accela/ftnoir_filter_accela_dialog.cpp index 79db1ffa..f0ee8391 100644 --- a/filter-accela/ftnoir_filter_accela_dialog.cpp +++ b/filter-accela/ftnoir_filter_accela_dialog.cpp @@ -41,33 +41,36 @@ dialog_accela::dialog_accela() update_trans_dz_display(s.trans_deadzone); update_rot_nl_slider(s.rot_nonlinearity); - { //#define SPLINE_ROT_DEBUG //#define SPLINE_TRANS_DEBUG -#if defined(SPLINE_ROT_DEBUG) || defined(SPLINE_TRANS_DEBUG) - spline rot, trans; - s.make_splines(rot, trans); - QDialog d; - - spline_widget r(&d); - r.set_preview_only(true); - r.setEnabled(false); - r.setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); - -#if defined(SPLINE_TRANS_DEBUG) -# if defined(SPLINE_ROT_DEBUG) -# error "rot xor trans" -# endif - r.setConfig(&trans); -#else - - r.setConfig(&rot); + +#if defined SPLINE_ROT_DEBUG || defined SPLINE_TRANS_DEBUG + { + spline rot, trans; + s.make_splines(rot, trans); + QDialog dr, dt; + spline_widget r(&dr); + spline_widget t(&dt); + dr.setWindowTitle("Accela rotation gain"); r.set_preview_only(true); r.setEnabled(false); + r.setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); r.setConfig(&rot); + dt.setWindowTitle("Accela translation gain"); t.set_preview_only(true); t.setEnabled(false); + r.setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); t.setConfig(&trans); + r.setFixedSize(1024, 600); t.setFixedSize(1024, 600); + +#ifdef SPLINE_ROT_DEBUG + dr.show(); #endif - r.setFixedSize(1024, 600); - d.show(); - d.exec(); + +#ifdef SPLINE_TRANS_DEBUG + dt.show(); #endif + + if (dr.isVisible()) + dr.exec(); + if (dt.isVisible()) + dt.exec(); } +#endif } void dialog_accela::doOK() |