void CorrelParamsFrame::OnMaxIterTctrlKillFocus(wxFocusEvent& ev) { wxString val = max_iter_tctrl->GetValue(); val.Trim(false); val.Trim(true); long t; bool is_valid = val.ToLong(&t); if (is_valid) { if (t < CorrelParams::min_iter_cnst) { wxString s; s << CorrelParams::min_iter_cnst; max_iter_tctrl->ChangeValue(s); } else if (t > CorrelParams::max_iter_cnst) { wxString s; s << CorrelParams::max_iter_cnst; max_iter_tctrl->ChangeValue(s); } } else { wxString s; s << CorrelParams::def_iter_cnst; max_iter_tctrl->ChangeValue(s); } wxCommandEvent evt; OnApplyBtn(evt); evt.Skip(); }
void CorrelParamsFrame::OnThreshTctrlKillFocus(wxFocusEvent& ev) { wxString val = thresh_tctrl->GetValue(); val.Trim(false); val.Trim(true); double t; bool is_valid = val.ToDouble(&t); if (is_valid) { if (t < GetThreshMin()) { wxString s; s << GetThreshMin(); thresh_tctrl->ChangeValue(s); } else if (t > GetThreshMax()) { wxString s; s << GetThreshMax(); thresh_tctrl->ChangeValue(s); } } else { UpdateThreshTctrlVal(); } wxCommandEvent evt; OnApplyBtn(evt); evt.Skip(); }
void LowessParamFrame::OnDeltaFactorTextChange(wxCommandEvent& event) { if (((wxKeyEvent&)event).GetKeyCode() == WXK_RETURN) { wxCommandEvent ev; OnApplyBtn(ev); } }
void CorrelParamsFrame::OnThreshSlider(wxCommandEvent& ev) { if (!thresh_tctrl || !thresh_slider) return; UpdateThreshTctrlVal(); if (thresh_cbx && thresh_cbx->GetValue()) UpdateEstPairs(); OnApplyBtn(ev); ev.Skip(); }
void CorrelParamsFrame::OnBinsSpinEvent(wxSpinEvent& ev) { int val = ev.GetValue(); if (val != num_bins) { OnApplyBtn(ev); } val = num_bins; ev.Skip(); }
void CorrelParamsFrame::OnThreshCheckBox(wxCommandEvent& ev) { if (!thresh_tctrl || !thresh_slider || !thresh_cbx) return; bool checked = thresh_cbx->GetValue(); thresh_tctrl->Enable(checked); thresh_slider->Enable(checked); UpdateEstPairs(); OnApplyBtn(ev); ev.Skip(); }
void LowessParamFrame::OnResetDefaultsBtn(wxCommandEvent& ev) { wxLogMessage("In LowessParamFrame::OnResetDefaultsBtn"); f = Lowess::default_f; iter = Lowess::default_iter; delta_factor = Lowess::default_delta_factor; f_text->ChangeValue(wxString::Format("%f", GetF())); iter_text->ChangeValue(wxString::Format("%d", GetIter())); delta_factor_text->ChangeValue(wxString::Format("%f", GetDeltaFactor())); OnApplyBtn(ev); }
void CorrelParamsFrame::OnTime1(wxCommandEvent& event) { v1_time = var_time_choice->GetSelection(); wxString cur_var = var_choice->GetStringSelection(); if (name_to_nm.find(cur_var)!=name_to_nm.end()) { cur_var = name_to_nm[cur_var]; } { TableInterface* table_int = project->GetTableInt(); if (table_int->IsColTimeVariant(cur_var) == false) { v1_time = 0; } } UpdateVarChoiceFromTable(cur_var); OnApplyBtn(event); }
void CorrelParamsFrame::OnThreshTextCtrl(wxCommandEvent& ev) { if (!thresh_tctrl || !thresh_slider) return; wxString val = thresh_tctrl->GetValue(); val.Trim(false); val.Trim(true); double t; bool is_valid = val.ToDouble(&t); if (is_valid) { if (t <= GetThreshMin()) { thresh_slider->SetValue(0); } else if (t >= GetThreshMax()) { thresh_slider->SetValue(sldr_tcks); } else { double s = ((t-GetThreshMin())/(GetThreshMax()-GetThreshMin()) * ((double) sldr_tcks)); thresh_slider->SetValue((int) s); } } else { UpdateThreshTctrlVal(); } OnApplyBtn(ev); ev.Skip(); }
void CorrelParamsFrame::OnDistanceChoiceSelected(wxCommandEvent& ev) { UpdateThreshTctrlVal(); OnApplyBtn(ev); ev.Skip(); }
void CorrelParamsFrame::OnBinsTextCtrl(wxCommandEvent& ev) { OnApplyBtn(ev); ev.Skip(); }
void CorrelParamsFrame::OnVarChoiceSelected(wxCommandEvent& ev) { OnApplyBtn(ev); ev.Skip(); }
void CorrelParamsFrame::OnBinsSpinEvent(wxSpinEvent& ev) { OnApplyBtn(ev); ev.Skip(); }