MCPcopy Create free account
hub / github.com/GeoDaCenter/geoda / InitVariableCombobox

Method InitVariableCombobox

Explore/DistancePlotView.cpp:515–543  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

513}
514
515void DistancePlotDlg::InitVariableCombobox(wxListBox* var_box)
516{
517 var_box->Clear();
518 wxArrayString var_items;
519
520 std::vector<int> col_id_map;
521 TableInterface* table_int = project->GetTableInt();
522 table_int->FillNumericColIdMap(col_id_map);
523 for (int i=0, iend=col_id_map.size(); i<iend; i++) {
524 int id = col_id_map[i];
525 wxString name = table_int->GetColName(id);
526 if (table_int->IsColTimeVariant(id)) {
527 for (int t=0; t<table_int->GetColTimeSteps(id); t++) {
528 wxString nm = name;
529 nm << " (" << table_int->GetTimeString(t) << ")";
530 name_to_nm[nm] = name;
531 name_to_tm_id[nm] = t;
532 var_items.Add(nm);
533 }
534 } else {
535 name_to_nm[name] = name;
536 name_to_tm_id[name] = 0;
537 var_items.Add(name);
538 }
539 }
540 if (!var_items.IsEmpty()) {
541 var_box->InsertItems(var_items,0);
542 }
543}
544
545void DistancePlotDlg::GetSelectedVariables(wxListBox* var_box,
546 std::vector<std::vector<double> >& data,

Callers

nothing calls this directly

Calls 10

FillNumericColIdMapMethod · 0.80
GetColTimeStepsMethod · 0.80
AddMethod · 0.80
ClearMethod · 0.45
GetTableIntMethod · 0.45
sizeMethod · 0.45
GetColNameMethod · 0.45
IsColTimeVariantMethod · 0.45
GetTimeStringMethod · 0.45
IsEmptyMethod · 0.45

Tested by

no test coverage detected