diff options
Diffstat (limited to 'tracker-pt/ftnoir_tracker_pt_dialog.cpp')
-rw-r--r-- | tracker-pt/ftnoir_tracker_pt_dialog.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tracker-pt/ftnoir_tracker_pt_dialog.cpp b/tracker-pt/ftnoir_tracker_pt_dialog.cpp index 160eb831..f3025a0c 100644 --- a/tracker-pt/ftnoir_tracker_pt_dialog.cpp +++ b/tracker-pt/ftnoir_tracker_pt_dialog.cpp @@ -110,6 +110,10 @@ TrackerDialog_PT::TrackerDialog_PT(const QString& module_name) : tie_setting(s.blob_color, ui.blob_color); + tie_setting(s.chroma_key_overexposed, ui.chroma_key_overexposed); + connect(ui.blob_color, &QComboBox::currentTextChanged, this, &TrackerDialog_PT::chroma_key_overexp_enable); + chroma_key_overexp_enable(""); + tie_setting(s.threshold_slider, ui.threshold_value_display, [this](const slider_value& val) { return threshold_display_text(int(val)); }); @@ -248,6 +252,18 @@ void TrackerDialog_PT::show_camera_settings() (void)video::show_dialog(s.camera_name); } +void TrackerDialog_PT::chroma_key_overexp_enable(const QString&) +{ + QVariant data = ui.blob_color->currentData(); + if (!data.isValid()) + ui.chroma_key_overexposed->setEnabled(false); + else + { + pt_color_type blob_color = pt_color_type(data.toInt()); + ui.chroma_key_overexposed->setEnabled(blob_color >= pt_color_red_chromakey && blob_color <= pt_color_magenta_chromakey); + } +} + void TrackerDialog_PT::trans_calib_step() { QMutexLocker l(&calibrator_mutex); |