MCPcopy Create free account
hub / github.com/DreamSourceLab/DSView / _loadApp

Function _loadApp

DSView/pv/config/appconfig.cpp:111–146  ·  view source on GitHub ↗

------ app

Source from the content-addressed store, hash-verified

109
110///------ app
111static void _loadApp(AppOptions &o, QSettings &st)
112{
113 st.beginGroup("Application");
114 getFiled("quickScroll", st, o.quickScroll, true);
115 getFiled("warnofMultiTrig", st, o.warnofMultiTrig, true);
116 getFiled("originalData", st, o.originalData, false);
117 getFiled("ableSaveLog", st, o.ableSaveLog, false);
118 getFiled("appendLogMode", st, o.appendLogMode, false);
119 getFiled("logLevel", st, o.logLevel, 3);
120 getFiled("transDecoderDlg", st, o.transDecoderDlg, true);
121 getFiled("trigPosDisplayInMid", st, o.trigPosDisplayInMid, true);
122 getFiled("displayProfileInBar", st, o.displayProfileInBar, false);
123 getFiled("swapBackBufferAlways", st, o.swapBackBufferAlways, false);
124 getFiled("fontSize", st, o.fontSize, 9.0);
125 getFiled("autoScrollLatestData", st, o.autoScrollLatestData, true);
126 getFiled("version", st, o.version, 1);
127
128 o.warnofMultiTrig = true;
129
130 QString fmt;
131 getFiled("protocalFormats", st, fmt, "");
132 if (fmt != ""){
133 StringToFormatArray(fmt, o.m_protocolFormats);
134 }
135
136 float minSize = 0;
137 float maxSize = 0;
138 AppConfig::GetFontSizeRange(&minSize, &maxSize);
139
140 if (o.version == 1 || o.fontSize < minSize || o.fontSize > maxSize)
141 {
142 o.fontSize = (maxSize + minSize) / 2;
143 }
144
145 st.endGroup();
146}
147
148static void _saveApp(AppOptions &o, QSettings &st)
149{

Callers 1

LoadAllMethod · 0.85

Calls 2

getFiledFunction · 0.85
StringToFormatArrayFunction · 0.85

Tested by

no test coverage detected