MCPcopy Create free account
hub / github.com/SatDump/SatDump / initMainUI

Function initMainUI

src-interface/main_ui.cpp:42–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40 std::shared_ptr<StatusLoggerSink> status_logger_sink;
41
42 void initMainUI()
43 {
44 ImPlot::CreateContext();
45
46 audio::registerSinks();
47 offline::setup();
48 settings::setup();
49
50 // Load credits MD
51 std::ifstream ifs(resources::getResourcePath("credits.md"));
52 std::string credits_markdown((std::istreambuf_iterator<char>(ifs)), (std::istreambuf_iterator<char>()));
53 credits_md.set_md(credits_markdown);
54
55 registerViewerHandlers();
56
57 recorder_app = std::make_shared<RecorderApplication>();
58 viewer_app = std::make_shared<ViewerApplication>();
59 open_recorder = satdump::config::main_cfg.contains("cli") && satdump::config::main_cfg["cli"].contains("start_recorder_device");
60
61 eventBus->fire_event<AddGUIApplicationEvent>({other_apps});
62
63 // Logger status bar sync
64 status_logger_sink = std::make_shared<StatusLoggerSink>();
65 if (status_logger_sink->is_shown())
66 logger->add_sink(status_logger_sink);
67
68 // Shut down the logger init buffer manually to prevent init warnings
69 // From showing as a toast, or in the product processor screen
70 completeLoggerInit();
71
72 // Logger notify sink
73 notify_logger_sink = std::make_shared<NotifyLoggerSink>();
74 logger->add_sink(notify_logger_sink);
75 }
76
77 void exitMainUI()
78 {

Callers 2

initFunction · 0.85
mainFunction · 0.85

Calls 10

CreateContextFunction · 0.85
registerSinksFunction · 0.85
getResourcePathFunction · 0.85
registerViewerHandlersFunction · 0.85
completeLoggerInitFunction · 0.85
set_mdMethod · 0.80
is_shownMethod · 0.80
add_sinkMethod · 0.80
setupFunction · 0.70
containsMethod · 0.45

Tested by

no test coverage detected