7 QSettings settings(
US3,
"UltraScan" );
8 return settings.value(
"browser",
"/usr/bin/firefox" ).toString();
13 QSettings settings(
US3,
"UltraScan" );
14 settings.setValue(
"browser", browser );
22 QSettings settings(
US3,
"UltraScan" );
23 return settings.value(
"workBaseDir",
24 QDir::homePath() +
"/ultrascan" ).toString();
29 QSettings settings(
US3,
"UltraScan" );
30 if ( dir == QDir::homePath() +
"/ultrascan" )
31 settings.remove(
"workBaseDir" );
33 settings.setValue(
"workBaseDir", dir );
39 QSettings settings(
US3,
"UltraScan" );
40 return settings.value(
"importDir",
workBaseDir() +
"/imports" ).toString();
45 QSettings settings(
US3,
"UltraScan" );
47 settings.remove(
"importDir" );
49 settings.setValue(
"importDir", dir );
55 QSettings settings(
US3,
"UltraScan" );
56 return settings.value(
"tmpDir",
workBaseDir() +
"/tmp" ).toString();
61 QSettings settings(
US3,
"UltraScan" );
63 settings.remove(
"tmpDir" );
65 settings.setValue(
"tmpDir", dir );
101 QString base = qApp->applicationDirPath().remove( QRegExp(
"/bin$" ) );
103 if ( base.contains(
".app/Contents" ) )
105 int ii = base.lastIndexOf(
"/bin/" );
108 base = base.left( ii );
118 QSettings settings(
US3,
"UltraScan" );
119 return settings.value(
"license", QStringList() ).toStringList();
124 QSettings settings(
US3,
"UltraScan" );
125 settings.setValue(
"license", license );
131 QSettings settings(
US3,
"UltraScan" );
132 return settings.value(
"UltraScanPW" ).toByteArray();
137 QSettings settings(
US3,
"UltraScan" );
138 settings.setValue(
"UltraScanPW", hash );
144 QSettings settings(
US3,
"UltraScan" );
145 return settings.value(
"tempTolerance", 0.5 ).toDouble();
150 QSettings settings(
US3,
"UltraScan" );
151 if ( tempTolerance == 0.5 )
152 settings.remove(
"tempTolerance" );
154 settings.setValue(
"tempTolerance", tempTolerance );
160 QSettings settings(
US3,
"UltraScan" );
161 return settings.value(
"beckmanBug",
false ).toBool();
166 QSettings settings(
US3,
"UltraScan" );
168 settings.remove(
"beckmanBug" );
170 settings.setValue(
"beckmanBug",
true );
176 QSettings settings(
US3,
"UltraScan" );
177 return settings.value(
"dataLocation", 2 ).toInt();
182 QSettings settings(
US3,
"UltraScan" );
184 settings.remove(
"dataLocation" );
186 settings.setValue(
"dataLocation", location );
191 static int us_settings_debug = 0;
194 return us_settings_debug;
199 us_settings_debug = level;
204 QSettings settings(
US3,
"UltraScan" );
205 return settings.value(
"us_debug", 0 ).toInt();
210 QSettings settings(
US3,
"UltraScan" );
212 settings.remove(
"us_debug" );
214 settings.setValue(
"us_debug", level );
221 QSettings settings(
US3,
"UltraScan" );
222 return settings.value(
"debug_text",
"" ).toStringList();
227 return debug_text().contains( match, Qt::CaseInsensitive );
232 QSettings settings(
US3,
"UltraScan" );
233 if ( debuglist.count() == 0 )
234 settings.remove(
"debug_text" );
236 settings.setValue(
"debug_text", debuglist );
242 QSettings settings(
US3,
"UltraScan" );
243 return settings.value(
"us_investigator_name",
"Not Available" ).toString();
248 QSettings settings(
US3,
"UltraScan" );
250 settings.remove(
"us_investigator_name" );
252 settings.setValue(
"us_investigator_name", name );
257 QSettings settings(
US3,
"UltraScan" );
258 return settings.value(
"us_investigator_ID", -1 ).toInt();
263 QSettings settings(
US3,
"UltraScan" );
265 settings.remove(
"us_investigator_ID" );
267 settings.setValue(
"us_investigator_ID",
id );
272 QSettings settings(
US3,
"UltraScan" );
273 return settings.value(
"us_investigator_level", 0 ).toInt();
278 QSettings settings(
US3,
"UltraScan" );
280 settings.remove(
"us_investigator_level" );
282 settings.setValue(
"us_investigator_level", level );
288 QSettings settings(
US3,
"UltraScan" );
289 return settings.value(
"advanced_level", 0 ).toInt();
294 QSettings settings(
US3,
"UltraScan" );
296 settings.remove(
"advanced_level" );
298 settings.setValue(
"advanced_level", level );
304 QSettings settings(
US3,
"UltraScan" );
305 return settings.value(
"threads", 1 ).toInt();
310 QSettings settings(
US3,
"UltraScan" );
312 settings.remove(
"threads" );
314 settings.setValue(
"threads", threads );
321 QSettings settings(
US3,
"UltraScan" );
322 QList<QStringList> dblist;
323 int dbCount = settings.value(
"dbCount", 0 ).toInt();
325 for (
int i = 0; i < dbCount; i++ )
327 QString key = QString(
"dblist%1" ).arg( i );
328 dblist << settings.value( key ).toStringList();
336 QSettings settings(
US3,
"UltraScan" );
339 if ( settings.contains(
"dbCount" ) )
341 int count = settings.value(
"dbCount" ).toInt();
342 for (
int i = 0; i < count; i++ )
344 QString key = QString(
"dblist%1" ).arg( i );
345 settings.remove( key );
349 int dbCount = dblist.size();
351 for (
int i = 0; i < dbCount; i++ )
353 QString key = QString(
"dblist%1" ).arg( i );
354 settings.setValue( key, dblist.at( i ) );
357 settings.setValue(
"dbCount", dbCount );
362 QSettings settings(
US3,
"UltraScan" );
363 return settings.value(
"defaultDB", QStringList() ).toStringList();
368 QSettings settings(
US3,
"UltraScan" );
369 if ( defaultDB.isEmpty() )
370 settings.remove(
"defaultDB" );
372 settings.setValue(
"defaultDB", defaultDB );