MCPcopy Create free account
hub / github.com/cjcliffe/CubicSDR / initConfigurationSettings

Method initConfigurationSettings

src/AppFrame.cpp:378–451  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

376}
377
378void AppFrame::initConfigurationSettings() {
379
380 // Init Theme
381 ThemeMgr::mgr.setTheme(wxGetApp().getConfig()->getTheme());
382 bookmarkView->updateTheme();
383
384 // Init Font Scale
385 int fontScale = wxGetApp().getConfig()->getFontScale();
386 GLFont::setScale((GLFont::GLFontScale)fontScale);
387
388 // Init window position from configuration
389 wxRect *win = wxGetApp().getConfig()->getWindow();
390 if (win) {
391 SetPosition(win->GetPosition());
392 SetClientSize(win->GetSize());
393 } else {
394 SetClientSize(1280, 600);
395 Centre();
396 }
397
398 // Init maximize state
399 if (wxGetApp().getConfig()->getWindowMaximized()) {
400 Maximize();
401 }
402
403 // Init frequency snap
404 wxGetApp().setFrequencySnap(wxGetApp().getConfig()->getSnap());
405
406 // Init spectrum average speed
407 float spectrumAvg = wxGetApp().getConfig()->getSpectrumAvgSpeed();
408 spectrumAvgMeter->setLevel(spectrumAvg);
409 wxGetApp().getSpectrumProcessor()->setFFTAverageRate(spectrumAvg);
410
411 // Init waterfall speed
412 int wflps =wxGetApp().getConfig()->getWaterfallLinesPerSec();
413 waterfallSpeedMeter->setLevel(sqrtf(wflps));
414 waterfallDataThread->setLinesPerSecond(wflps);
415 waterfallCanvas->setLinesPerSecond(wflps);
416
417 // Init modem property collapsed state
418 int mpc =wxGetApp().getConfig()->getModemPropsCollapsed();
419 if (mpc) {
420 modemProps->setCollapsed(true);
421 }
422
423 // Init main splitter position (separates top/bottom area horizontally)
424 int msPos = wxGetApp().getConfig()->getMainSplit();
425 if (msPos != -1) {
426 mainSplitter->SetSashPosition(msPos);
427 }
428
429 // Init bookmark splitter position (separates bookmark/main vis vertically)
430 int bsPos = wxGetApp().getConfig()->getBookmarkSplit();
431 if (bsPos != -1) {
432 bookmarkSplitter->SetSashPosition(bsPos);
433 }
434
435 // Init vis splitter position (separates spectrum/waterfall horizontally)

Callers

nothing calls this directly

Calls 15

getConfigMethod · 0.80
getFontScaleMethod · 0.80
getWindowMethod · 0.80
getWindowMaximizedMethod · 0.80
setFrequencySnapMethod · 0.80
getSnapMethod · 0.80
getSpectrumAvgSpeedMethod · 0.80
setLevelMethod · 0.80
setFFTAverageRateMethod · 0.80
getSpectrumProcessorMethod · 0.80

Tested by

no test coverage detected