Preferences/__init__.py

branch
5_5_x
changeset 3847
4a946734fd27
parent 3732
88b9be051ce9
child 3915
c6aa0bccd7d8
equal deleted inserted replaced
3844:6ba315c68a8b 3847:4a946734fd27
862 # defaults for Qt related stuff 862 # defaults for Qt related stuff
863 qtDefaults = { 863 qtDefaults = {
864 "Qt4TranslationsDir": "", 864 "Qt4TranslationsDir": "",
865 "QtToolsPrefix4": "", 865 "QtToolsPrefix4": "",
866 "QtToolsPostfix4": "", 866 "QtToolsPostfix4": "",
867 "PyuicIndent": 4,
868 "PyuicFromImports": False,
867 } 869 }
868 870
869 # defaults for corba related stuff 871 # defaults for corba related stuff
870 corbaDefaults = { 872 corbaDefaults = {
871 "omniidl": "omniidl" 873 "omniidl": "omniidl"
2390 @param prefClass preferences class used as the storage area 2392 @param prefClass preferences class used as the storage area
2391 @return the requested Qt setting 2393 @return the requested Qt setting
2392 """ 2394 """
2393 if key == "Qt4TranslationsDir": 2395 if key == "Qt4TranslationsDir":
2394 return getQt4TranslationsDir(prefClass) 2396 return getQt4TranslationsDir(prefClass)
2397 elif key in ["PyuicIndent"]:
2398 return int(prefClass.settings.value(
2399 "Qt/" + key, prefClass.qtDefaults[key]))
2400 elif key in ["PyuicFromImports"]:
2401 return toBool(prefClass.settings.value(
2402 "Qt/" + key, prefClass.qtDefaults[key]))
2395 else: 2403 else:
2396 return prefClass.settings.value("Qt/" + key, prefClass.qtDefaults[key]) 2404 return prefClass.settings.value("Qt/" + key, prefClass.qtDefaults[key])
2397 2405
2398 2406
2399 def setQt(key, value, prefClass=Prefs): 2407 def setQt(key, value, prefClass=Prefs):

eric ide

mercurial