7 QSettings settings(
US3,
"UltraScan" );
8 return settings.value(
"fontFamily",
"Helvetica" ).toString();
13 QSettings settings(
US3,
"UltraScan" );
14 if ( fontFamily ==
"Helvetica" )
15 settings.remove(
"fontFamily" );
17 settings.setValue(
"fontFamily", fontFamily );
22 QSettings settings(
US3,
"UltraScan" );
23 return settings.value(
"fontSize", 10 ).toInt();
28 QSettings settings(
US3,
"UltraScan" );
30 settings.remove(
"fontSize" );
32 settings.setValue(
"fontSize", fontSize );
37 QSettings settings(
US3,
"UltraScan" );
41 if ( os ==
"osx" ) defaultStyle =
"Macintosh";
42 else if ( os ==
"win32" ) defaultStyle =
"Windows";
43 else defaultStyle =
"Plastique";
45 return settings.value(
"guiStyle", defaultStyle ).toString();
50 QSettings settings(
US3,
"UltraScan" );
54 if ( os ==
"osx" ) defaultStyle =
"Macintosh";
55 else if ( os ==
"win32" ) defaultStyle =
"Windows";
56 else defaultStyle =
"Plastique";
58 if ( style == defaultStyle )
59 settings.remove(
"guiStyle" );
61 settings.setValue(
"guiStyle", style );
67 QSettings settings(
US3,
"UltraScan" );
68 return settings.value(
"plotMargin", 10 ).toInt();
73 QSettings settings(
US3,
"UltraScan" );
75 settings.remove(
"plotMargin" );
77 settings.setValue(
"plotMargin", fontSize );
85 QSettings settings(
US3,
"UltraScan" );
86 if ( settings.contains(
"palettes/labelColor" ) )
87 return settings.value(
"palettes/labelColor" ).value<QPalette>();
94 p.setColor( QPalette::Active, QPalette::WindowText, Qt::white );
95 p.setColor( QPalette::Active, QPalette::Window, Qt::black );
96 p.setColor( QPalette::Active, QPalette::Light, Qt::black );
97 p.setColor( QPalette::Active, QPalette::Dark, Qt::black );
98 p.setColor( QPalette::Active, QPalette::Text, Qt::white );
99 p.setColor( QPalette::Active, QPalette::Base, Qt::black );
101 p.setColor( QPalette::Disabled, QPalette::WindowText, Qt::white );
102 p.setColor( QPalette::Disabled, QPalette::Window, Qt::black );
103 p.setColor( QPalette::Disabled, QPalette::Light, Qt::black );
104 p.setColor( QPalette::Disabled, QPalette::Dark, Qt::black );
105 p.setColor( QPalette::Disabled, QPalette::Text, Qt::white );
106 p.setColor( QPalette::Disabled, QPalette::Base, Qt::black );
108 p.setColor( QPalette::Inactive, QPalette::WindowText, Qt::white );
109 p.setColor( QPalette::Inactive, QPalette::Window, Qt::black );
110 p.setColor( QPalette::Inactive, QPalette::Light, Qt::black );
111 p.setColor( QPalette::Inactive, QPalette::Dark, Qt::black );
112 p.setColor( QPalette::Inactive, QPalette::Text, Qt::white );
113 p.setColor( QPalette::Inactive, QPalette::Base, Qt::black );
120 QSettings settings(
US3,
"UltraScan" );
121 settings.setValue(
"palettes/labelColor", palette );
127 QSettings settings(
US3,
"UltraScan" );
128 if ( settings.contains(
"palettes/editColor" ) )
129 return settings.value(
"palettes/editColor" ).value<QPalette>();
136 p.setColor( QPalette::Active, QPalette::WindowText, Qt::black );
137 p.setColor( QPalette::Active, QPalette::Window, Qt::white );
138 p.setColor( QPalette::Active, QPalette::Light, Qt::white );
139 p.setColor( QPalette::Active, QPalette::Dark, Qt::darkGray );
140 p.setColor( QPalette::Active, QPalette::Mid, Qt::black );
141 p.setColor( QPalette::Active, QPalette::Text, Qt::black );
142 p.setColor( QPalette::Active, QPalette::Base, Qt::white );
143 p.setColor( QPalette::Active, QPalette::HighlightedText, Qt::white );
144 p.setColor( QPalette::Active, QPalette::Highlight, Qt::darkBlue );
145 p.setColor( QPalette::Active, QPalette::Button, Qt::lightGray );
146 p.setColor( QPalette::Active, QPalette::Midlight, Qt::lightGray );
147 p.setColor( QPalette::Active, QPalette::BrightText, Qt::red );
148 p.setColor( QPalette::Active, QPalette::ButtonText, Qt::black );
149 p.setColor( QPalette::Active, QPalette::Shadow, Qt::black );
151 p.setColor( QPalette::Disabled, QPalette::WindowText, Qt::black );
152 p.setColor( QPalette::Disabled, QPalette::Window, Qt::lightGray );
153 p.setColor( QPalette::Disabled, QPalette::Light, Qt::white );
154 p.setColor( QPalette::Disabled, QPalette::Dark, Qt::darkGray );
155 p.setColor( QPalette::Disabled, QPalette::Mid, Qt::black );
156 p.setColor( QPalette::Disabled, QPalette::Text, Qt::black );
157 p.setColor( QPalette::Disabled, QPalette::Base, Qt::lightGray );
158 p.setColor( QPalette::Disabled, QPalette::HighlightedText, Qt::white );
159 p.setColor( QPalette::Disabled, QPalette::Highlight, Qt::darkBlue );
160 p.setColor( QPalette::Disabled, QPalette::Button, Qt::darkGray );
161 p.setColor( QPalette::Disabled, QPalette::Midlight, Qt::darkGray );
162 p.setColor( QPalette::Disabled, QPalette::BrightText, Qt::red );
163 p.setColor( QPalette::Disabled, QPalette::ButtonText, Qt::black );
164 p.setColor( QPalette::Disabled, QPalette::Shadow, Qt::black );
166 p.setColor( QPalette::Inactive, QPalette::WindowText, Qt::black );
167 p.setColor( QPalette::Inactive, QPalette::Window, Qt::white );
168 p.setColor( QPalette::Inactive, QPalette::Light, Qt::white );
169 p.setColor( QPalette::Inactive, QPalette::Dark, Qt::darkBlue );
170 p.setColor( QPalette::Inactive, QPalette::Mid, Qt::black );
171 p.setColor( QPalette::Inactive, QPalette::Text, Qt::black );
172 p.setColor( QPalette::Inactive, QPalette::Base, Qt::white );
173 p.setColor( QPalette::Inactive, QPalette::HighlightedText, Qt::white );
174 p.setColor( QPalette::Inactive, QPalette::Highlight, Qt::darkBlue );
175 p.setColor( QPalette::Inactive, QPalette::Button, Qt::lightGray );
176 p.setColor( QPalette::Inactive, QPalette::Midlight, Qt::lightGray );
177 p.setColor( QPalette::Inactive, QPalette::BrightText, Qt::red );
178 p.setColor( QPalette::Inactive, QPalette::ButtonText, Qt::black );
179 p.setColor( QPalette::Inactive, QPalette::Shadow, Qt::black );
186 QSettings settings(
US3,
"UltraScan" );
187 settings.setValue(
"palettes/editColor", palette );
194 QSettings settings(
US3,
"UltraScan" );
195 if ( settings.contains(
"palettes/frameColor" ) )
196 return settings.value(
"palettes/frameColor" ).value<QPalette>();
203 p.setColor( QPalette::Active, QPalette::WindowText, Qt::white );
204 p.setColor( QPalette::Active, QPalette::Window, Qt::darkCyan );
205 p.setColor( QPalette::Active, QPalette::Light, Qt::lightGray );
206 p.setColor( QPalette::Active, QPalette::Dark, Qt::darkGray );
207 p.setColor( QPalette::Active, QPalette::Mid, Qt::cyan );
208 p.setColor( QPalette::Active, QPalette::Midlight, Qt::white );
209 p.setColor( QPalette::Active, QPalette::Base, Qt::darkGray );
211 p.setColor( QPalette::Disabled, QPalette::WindowText, Qt::white );
212 p.setColor( QPalette::Disabled, QPalette::Window, Qt::darkCyan );
213 p.setColor( QPalette::Disabled, QPalette::Light, Qt::lightGray);
214 p.setColor( QPalette::Disabled, QPalette::Dark, Qt::darkGray );
215 p.setColor( QPalette::Disabled, QPalette::Mid, Qt::cyan );
216 p.setColor( QPalette::Disabled, QPalette::Midlight, Qt::white );
217 p.setColor( QPalette::Disabled, QPalette::Base, Qt::darkGray );
219 p.setColor( QPalette::Inactive, QPalette::WindowText, Qt::white );
220 p.setColor( QPalette::Inactive, QPalette::Window, Qt::darkCyan );
221 p.setColor( QPalette::Inactive, QPalette::Light, Qt::lightGray);
222 p.setColor( QPalette::Inactive, QPalette::Dark, Qt::darkGray );
223 p.setColor( QPalette::Inactive, QPalette::Mid, Qt::cyan );
224 p.setColor( QPalette::Inactive, QPalette::Midlight, Qt::white );
225 p.setColor( QPalette::Inactive, QPalette::Base, Qt::darkGray );
232 QSettings settings(
US3,
"UltraScan" );
233 settings.setValue(
"palettes/frameColor", palette );
240 QSettings settings(
US3,
"UltraScan" );
241 if ( settings.contains(
"palettes/pushbColor" ) )
242 return settings.value(
"palettes/pushbColor" ).value<QPalette>();
246 #define bluegreen QColor( 0x00, 0xe0, 0xe0 )
251 p.setColor( QPalette::Active, QPalette::ButtonText, Qt::black );
252 p.setColor( QPalette::Active, QPalette::Button,
bluegreen );
253 p.setColor( QPalette::Active, QPalette::Light, Qt::white );
254 p.setColor( QPalette::Active, QPalette::Dark, Qt::darkGray );
255 p.setColor( QPalette::Active, QPalette::Shadow, Qt::black );
257 p.setColor( QPalette::Disabled, QPalette::ButtonText, Qt::white );
258 p.setColor( QPalette::Disabled, QPalette::Button,
bluegreen );
259 p.setColor( QPalette::Disabled, QPalette::Light, Qt::white );
260 p.setColor( QPalette::Disabled, QPalette::Dark, Qt::darkGray );
261 p.setColor( QPalette::Disabled, QPalette::Shadow, Qt::black );
263 p.setColor( QPalette::Inactive, QPalette::ButtonText, Qt::black );
264 p.setColor( QPalette::Inactive, QPalette::Button,
bluegreen );
265 p.setColor( QPalette::Inactive, QPalette::Light, Qt::white );
266 p.setColor( QPalette::Inactive, QPalette::Dark, Qt::darkGray );
267 p.setColor( QPalette::Inactive, QPalette::Shadow, Qt::black );
274 QSettings settings(
US3,
"UltraScan" );
275 settings.setValue(
"palettes/pushbColor", palette );
282 QSettings settings(
US3,
"UltraScan" );
283 if ( settings.contains(
"palettes/normalColor" ) )
284 return settings.value(
"palettes/normalColor" ).value<QPalette>();
291 p.setColor( QPalette::Active, QPalette::WindowText, Qt::black );
292 p.setColor( QPalette::Active, QPalette::Window, Qt::lightGray );
293 p.setColor( QPalette::Active, QPalette::Light, Qt::white );
294 p.setColor( QPalette::Active, QPalette::Dark, Qt::darkGray );
295 p.setColor( QPalette::Active, QPalette::Mid, Qt::lightGray );
296 p.setColor( QPalette::Active, QPalette::Text, Qt::black );
297 p.setColor( QPalette::Active, QPalette::Base, Qt::white );
298 p.setColor( QPalette::Active, QPalette::HighlightedText, Qt::white );
299 p.setColor( QPalette::Active, QPalette::Highlight, Qt::darkBlue );
300 p.setColor( QPalette::Active, QPalette::Button, Qt::lightGray );
301 p.setColor( QPalette::Active, QPalette::Midlight, Qt::lightGray );
302 p.setColor( QPalette::Active, QPalette::BrightText, Qt::red );
303 p.setColor( QPalette::Active, QPalette::ButtonText, Qt::black );
304 p.setColor( QPalette::Active, QPalette::Shadow, Qt::black );
306 p.setColor( QPalette::Disabled, QPalette::WindowText, Qt::black );
307 p.setColor( QPalette::Disabled, QPalette::Window, Qt::lightGray );
308 p.setColor( QPalette::Disabled, QPalette::Light, Qt::white );
309 p.setColor( QPalette::Disabled, QPalette::Dark, Qt::darkGray );
310 p.setColor( QPalette::Disabled, QPalette::Mid, Qt::lightGray );
311 p.setColor( QPalette::Disabled, QPalette::Text, Qt::black );
312 p.setColor( QPalette::Disabled, QPalette::Base, Qt::lightGray );
313 p.setColor( QPalette::Disabled, QPalette::HighlightedText, Qt::white );
314 p.setColor( QPalette::Disabled, QPalette::Highlight, Qt::darkBlue );
315 p.setColor( QPalette::Disabled, QPalette::Button, Qt::lightGray );
316 p.setColor( QPalette::Disabled, QPalette::Midlight, Qt::lightGray );
317 p.setColor( QPalette::Disabled, QPalette::BrightText, Qt::red );
318 p.setColor( QPalette::Disabled, QPalette::ButtonText, Qt::black );
319 p.setColor( QPalette::Disabled, QPalette::Shadow, Qt::black );
321 p.setColor( QPalette::Inactive, QPalette::WindowText, Qt::black );
322 p.setColor( QPalette::Inactive, QPalette::Window, Qt::lightGray );
323 p.setColor( QPalette::Inactive, QPalette::Light, Qt::white );
324 p.setColor( QPalette::Inactive, QPalette::Dark, Qt::darkGray );
325 p.setColor( QPalette::Inactive, QPalette::Mid, Qt::lightGray );
326 p.setColor( QPalette::Inactive, QPalette::Text, Qt::black );
327 p.setColor( QPalette::Inactive, QPalette::Base, Qt::white );
328 p.setColor( QPalette::Inactive, QPalette::HighlightedText, Qt::white );
329 p.setColor( QPalette::Inactive, QPalette::Highlight, Qt::darkBlue );
330 p.setColor( QPalette::Inactive, QPalette::Button, Qt::lightGray );
331 p.setColor( QPalette::Inactive, QPalette::Midlight, Qt::lightGray );
332 p.setColor( QPalette::Inactive, QPalette::BrightText, Qt::red );
333 p.setColor( QPalette::Inactive, QPalette::ButtonText, Qt::black );
334 p.setColor( QPalette::Inactive, QPalette::Shadow, Qt::black );
341 QSettings settings(
US3,
"UltraScan" );
342 settings.setValue(
"palettes/normalColor", palette );
348 QSettings settings(
US3,
"UltraScan" );
349 if ( settings.contains(
"palettes/lcdColor" ) )
350 return settings.value(
"palettes/lcdColor" ).value<QPalette>();
357 p.setColor( QPalette::Active, QPalette::WindowText, Qt::green );
358 p.setColor( QPalette::Active, QPalette::Window, Qt::black );
359 p.setColor( QPalette::Active, QPalette::Light, Qt::green );
360 p.setColor( QPalette::Active, QPalette::Shadow, Qt::darkCyan );
362 p.setColor( QPalette::Inactive, QPalette::WindowText, Qt::green );
363 p.setColor( QPalette::Inactive, QPalette::Window, Qt::black );
364 p.setColor( QPalette::Inactive, QPalette::Light, Qt::green );
365 p.setColor( QPalette::Inactive, QPalette::Shadow, Qt::darkCyan );
372 QSettings settings(
US3,
"UltraScan" );
373 settings.setValue(
"palettes/lcdColor", palette );
379 QSettings settings(
US3,
"UltraScan" );
380 if ( settings.contains(
"palettes/plotColor" ) )
381 return settings.value(
"palettes/plotColor" ).value<QPalette>();
388 p.setColor( QPalette::Active, QPalette::WindowText, Qt::black );
389 p.setColor( QPalette::Active, QPalette::Window, Qt::lightGray );
390 p.setColor( QPalette::Active, QPalette::Shadow, Qt::black );
392 p.setColor( QPalette::Inactive, QPalette::WindowText, Qt::black );
393 p.setColor( QPalette::Inactive, QPalette::Window, Qt::lightGray );
394 p.setColor( QPalette::Inactive, QPalette::Shadow, Qt::black );
401 QSettings settings(
US3,
"UltraScan" );
402 settings.setValue(
"palettes/plotColor", palette );
409 QSettings settings(
US3,
"UltraScan" );
410 return settings.value(
"palettes/plotCurve", Qt::yellow ).value<QColor>();
415 QSettings settings(
US3,
"UltraScan" );
416 if ( color == Qt::yellow )
417 settings.remove(
"palettes/plotCurve" );
419 settings.setValue(
"palettes/plotCurve", color );
425 QSettings settings(
US3,
"UltraScan" );
426 return settings.value(
"palettes/normalColor", Qt::darkBlue ).value<QColor>();
431 QSettings settings(
US3,
"UltraScan" );
432 if ( color == Qt::darkBlue )
433 settings.remove(
"palettes/plotCanvasBG" );
435 settings.setValue(
"palettes/plotCanvasBG", color );
441 QSettings settings(
US3,
"UltraScan" );
442 return settings.value(
"palettes/plotMajGrid", Qt::white ).value<QColor>();
447 QSettings settings(
US3,
"UltraScan" );
448 if ( color == Qt::white )
449 settings.remove(
"palettes/plotMajGrid" );
451 settings.setValue(
"palettes/plotMajGrid", color );
457 QSettings settings(
US3,
"UltraScan" );
458 return settings.value(
"palettes/plotMinGrid", Qt::lightGray ).value<QColor>();
463 QSettings settings(
US3,
"UltraScan" );
464 if ( color == Qt::lightGray )
465 settings.remove(
"palettes/plotMinGrid" );
467 settings.setValue(
"palettes/plotMinGrid", color );
473 QSettings settings(
US3,
"UltraScan" );
474 return settings.value(
"palettes/plotPicker", Qt::white ).value<QColor>();
479 QSettings settings(
US3,
"UltraScan" );
480 if ( color == Qt::white )
481 settings.remove(
"palettes/plotPicker" );
483 settings.setValue(
"palettes/plotPicker", color );