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

Method SetCheckMarks

Explore/ConditionalMapView.cpp:227–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227void ConditionalMapCanvas::SetCheckMarks(wxMenu* menu)
228{
229 // Update the checkmarks and enable/disable state for the
230 // following menu items if they were specified for this particular
231 // view in the xrc file. Items that cannot be enable/disabled,
232 // or are not checkable do not appear.
233
234 ConditionalNewCanvas::SetCheckMarks(menu);
235
236 GeneralWxUtils::CheckMenuItem(menu, XRCID("ID_MAPANALYSIS_THEMELESS"),
237 GetCatType() == CatClassification::no_theme);
238
239 for (int i=1; i<=10; i++) {
240 wxString str_xrcid;
241 bool flag;
242
243 str_xrcid = wxString::Format("ID_QUANTILE_%d", i);
244 flag = GetCatType()==CatClassification::quantile && GetNumCats()==i;
245 GeneralWxUtils::CheckMenuItem(menu, XRCID(str_xrcid), flag);
246
247 str_xrcid = wxString::Format("ID_EQUAL_INTERVALS_%d", i);
248 flag = GetCatType()==CatClassification::equal_intervals && GetNumCats()==i;
249 GeneralWxUtils::CheckMenuItem(menu, XRCID(str_xrcid), flag);
250
251 str_xrcid = wxString::Format("ID_NATURAL_BREAKS_%d", i);
252 flag = GetCatType()==CatClassification::natural_breaks && GetNumCats()==i;
253 GeneralWxUtils::CheckMenuItem(menu, XRCID(str_xrcid), flag);
254 }
255
256 GeneralWxUtils::CheckMenuItem(menu,
257 XRCID("ID_MAPANALYSIS_CHOROPLETH_PERCENTILE"),
258 GetCatType() == CatClassification::percentile);
259 GeneralWxUtils::CheckMenuItem(menu, XRCID("ID_MAPANALYSIS_HINGE_15"),
260 GetCatType() == CatClassification::hinge_15);
261 GeneralWxUtils::CheckMenuItem(menu, XRCID("ID_MAPANALYSIS_HINGE_30"),
262 GetCatType() == CatClassification::hinge_30);
263 GeneralWxUtils::CheckMenuItem(menu,
264 XRCID("ID_MAPANALYSIS_CHOROPLETH_STDDEV"),
265 GetCatType() == CatClassification::stddev);
266 GeneralWxUtils::CheckMenuItem(menu, XRCID("ID_MAPANALYSIS_UNIQUE_VALUES"),
267 GetCatType() == CatClassification::unique_values);
268}
269
270wxString ConditionalMapCanvas::GetCategoriesTitle()
271{

Callers 2

MapMenusMethod · 0.45
UpdateOptionMenuItemsMethod · 0.45

Calls 1

GetNumCatsFunction · 0.70

Tested by

no test coverage detected