void VariableSettingsDlg::OnTime4(wxCommandEvent& event) { if (!all_init) return; v4_time = time_lb4->GetSelection(); InitFieldChoices(); }
FieldNewCalcRateDlg::FieldNewCalcRateDlg(Project* project_s, wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) : all_init(false), project(project_s), table_int(project_s->GetTableInt()), w_man_int(project_s->GetWManInt()), is_space_time(project_s->GetTableInt()->IsTimeVariant()) { SetParent(parent); CreateControls(); Centre(); m_method->Append("Raw Rate"); m_method->Append("Excess Risk"); m_method->Append("Empirical Bayes"); m_method->Append("Spatial Rate"); m_method->Append("Spatial Empirical Bayes"); m_method->Append("EB Rate Standardization"); m_method->SetSelection(0); InitFieldChoices(); InitWeightsList(); all_init = true; }
void FieldNewCalcLagDlg::OnAddColumnClick( wxCommandEvent& event ) { DataViewerAddColDlg dlg(project, this); if (dlg.ShowModal() != wxID_OK) return; InitFieldChoices(); wxString sel_str = dlg.GetColName(); if (table_int->GetColTimeSteps(dlg.GetColId()) > 1) { sel_str << " (" << m_result_tm->GetStringSelection() << ")"; } m_result->SetSelection(m_result->FindString(sel_str)); OnLagResultUpdated(event); UpdateOtherPanels(); }
void FieldNewCalcUniDlg::OnAddColumnClick( wxCommandEvent& event ) { DataViewerAddColDlg dlg(grid_base, this); if (dlg.ShowModal() != wxID_OK) return; InitFieldChoices(); wxString sel_str = dlg.GetColName(); if (grid_base->col_data[dlg.GetColId()]->time_steps > 1) { sel_str << " (" << m_result_tm->GetStringSelection() << ")"; } m_result->SetSelection(m_result->FindString(sel_str)); OnUnaryResultUpdated(event); UpdateOtherPanels(); }
void VariableSettingsDlg::OnTime3(wxCommandEvent& event) { if (!all_init) return; v3_time = time_lb3->GetSelection(); if (num_var >= 4 && set_fourth_from_third_mode) { lb4->SetSelection(lb3_cur_sel); lb4_cur_sel = lb3_cur_sel; time_lb4->SetSelection(v3_time); v4_time = v3_time; } InitFieldChoices(); }
void VariableSettingsDlg::OnTime1(wxCommandEvent& event) { if (!all_init) return; v1_time = time_lb1->GetSelection(); if (num_var >= 2 && set_second_from_first_mode) { lb2->SetSelection(lb1_cur_sel); lb2_cur_sel = lb1_cur_sel; time_lb2->SetSelection(v1_time); v2_time = v1_time; } InitFieldChoices(); }
void FieldNewCalcLagDlg::OnOpenWeightClick( wxCommandEvent& event ) { SelectWeightDlg dlg(project, this); dlg.ShowModal(); m_weight->Clear(); for (int i=0; i<w_manager->GetNumWeights(); i++) { m_weight->Append(w_manager->GetWFilename(i)); } if (w_manager->GetCurrWeightInd() >=0 ) { m_weight->SetSelection(w_manager->GetCurrWeightInd()); } InitFieldChoices(); // Need to call this in case AddId was called. Display(); UpdateOtherPanels(); }
FieldNewCalcLagDlg::FieldNewCalcLagDlg(Project* project_s, wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) : all_init(false), project(project_s), table_int(project_s->GetTableInt()), w_manager(project_s->GetWManager()), is_space_time(project_s->GetTableInt()->IsTimeVariant()) { SetParent(parent); CreateControls(); Centre(); InitFieldChoices(); m_text->SetValue(wxEmptyString); if (w_manager->IsDefaultWeight()) { m_weight->SetSelection(w_manager->GetCurrWeightInd()); } all_init = true; Display(); }
void FieldNewCalcLagDlg::OnLagOperandTmUpdated( wxCommandEvent& event ) { InitFieldChoices(); Display(); }
void FieldNewCalcUniDlg::OnUnaryOperandTmUpdated( wxCommandEvent& event ) { InitFieldChoices(); Display(); }
void VariableSettingsDlg::Init(VarType var_type) { v_type = var_type; if (var_type == univariate) { num_var = 1; } else if (var_type == bivariate || var_type == rate_smoothed) { num_var = 2; } else if (var_type == trivariate) { num_var = 3; } else { // (var_type == quadvariate) num_var = 4; } if (num_var > 2) show_weights = false; int num_obs = project->GetNumRecords(); m_theme = 0; map_theme_ch = 0; weights_ch = 0; distance_ch = 0; lb1 = 0; lb2 = 0; lb3 = 0; lb4 = 0; time_lb1 = 0; time_lb2 = 0; time_lb3 = 0; time_lb4 = 0; CreateControls(); v1_time = 0; v2_time = 0; v3_time = 0; v4_time = 0; InitTimeChoices(); lb1_cur_sel = 0; lb2_cur_sel = 0; lb3_cur_sel = 0; lb4_cur_sel = 0; table_int->FillColIdMap(col_id_map); if (col_id_map.size() == 0) { wxString msg = _("No numeric variables found."); wxMessageDialog dlg (this, msg, _("Warning"), wxOK | wxICON_WARNING); dlg.ShowModal(); return; } InitFieldChoices(); if (map_theme_ch) { map_theme_ch->Clear(); map_theme_ch->Append(_("Quantile Map")); map_theme_ch->Append(_("Percentile Map")); map_theme_ch->Append(_("Box Map (Hinge=1.5)")); map_theme_ch->Append(_("Box Map (Hinge=3.0)")); map_theme_ch->Append(_("Standard Deviation Map")); map_theme_ch->Append(_("Natural Breaks")); map_theme_ch->Append(_("Equal Intervals")); map_theme_ch->SetSelection(0); } }
void FieldNewCalcRateDlg::OnRateOperand2TmUpdated( wxCommandEvent& event ) { InitFieldChoices(); }