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

Method ChangeCatThemeType

Explore/ConditionalMapView.cpp:385–423  ·  view source on GitHub ↗

This method initializes data array according to values in var_info and col_ids. It calls CreateAndUpdateCategories which does all of the category classification. */

Source from the content-addressed store, hash-verified

383 and col_ids. It calls CreateAndUpdateCategories which does all of the
384 category classification. */
385void ConditionalMapCanvas::ChangeCatThemeType(CatClassification::CatClassifType new_cat_theme,
386 int num_categories_s,
387 const wxString& custom_classif_title)
388{
389 num_categories = num_categories_s;
390
391 if (new_cat_theme == CatClassification::custom) {
392 CatClassifManager* ccm = project->GetCatClassifManager();
393 if (!ccm)
394 return;
395 CatClassifState* new_ccs = ccm->FindClassifState(custom_classif_title);
396 if (!new_ccs)
397 return;
398 if (cc_state_map == new_ccs)
399 return;
400 if (cc_state_map) {
401 cc_state_map->removeObserver(this);
402 }
403 cc_state_map = new_ccs;
404 cc_state_map->registerObserver(this);
405 cat_classif_def_map = cc_state_map->GetCatClassif();
406 } else {
407 if (cc_state_map) {
408 cc_state_map->removeObserver(this);
409 }
410 cc_state_map = NULL;
411 }
412 SetCatType(new_cat_theme);
413 VarInfoAttributeChange();
414 CreateAndUpdateCategories();
415 UserChangedCellCategories();
416 PopulateCanvas();
417 if (all_init && template_frame) {
418 template_frame->UpdateTitle();
419 if (template_frame->GetTemplateLegend()) {
420 template_frame->GetTemplateLegend()->Recreate();
421 }
422 }
423}
424
425void ConditionalMapCanvas::update(CatClassifState* o)
426{

Callers 2

ChangeThemeTypeMethod · 0.80
ChangeThemeTypeMethod · 0.80

Calls 8

GetCatClassifManagerMethod · 0.80
FindClassifStateMethod · 0.80
GetTemplateLegendMethod · 0.80
removeObserverMethod · 0.45
registerObserverMethod · 0.45
UpdateTitleMethod · 0.45
RecreateMethod · 0.45

Tested by

no test coverage detected