SF.net SVN: fclient: [583] trunk/fclient/src/fclient/config.py
Status: Pre-Alpha
Brought to you by:
jurner
|
From: <jU...@us...> - 2008-07-12 11:06:48
|
Revision: 583
http://fclient.svn.sourceforge.net/fclient/?rev=583&view=rev
Author: jUrner
Date: 2008-07-12 04:06:56 -0700 (Sat, 12 Jul 2008)
Log Message:
-----------
added scope consts for settings
Modified Paths:
--------------
trunk/fclient/src/fclient/config.py
Modified: trunk/fclient/src/fclient/config.py
===================================================================
--- trunk/fclient/src/fclient/config.py 2008-07-11 19:42:24 UTC (rev 582)
+++ trunk/fclient/src/fclient/config.py 2008-07-12 11:06:56 UTC (rev 583)
@@ -50,11 +50,17 @@
#**********************************************************************************
#
#**********************************************************************************
+SettingScopeExpert = 0x1
+SettingScopePrivate = 0x2
+SettingScopeUser = 0x4
+SettingSkopeMask = SettingScopeExpert | SettingScopePrivate | SettingScopeUser
+
class SettingsBase(settings.SettingsBase):
"""application wide base class for settings"""
_config_settings_ = None
+
#TODO: we have to notify all instances on changes. yuk
def settingsObject(self):
settingsDir = self._config_settings_.value('SettingsDir')
@@ -75,8 +81,8 @@
class Settings(SettingsBase):
_key_ = 'ConfigSettings'
_settings_ = (
- ('SettingsDir', 'String', QtCore.QString(SettingsDir)), # if not None, settings are stored locally in the app folder
- ('SettingsAllUsers', 'Bool', False), # store settings for all users?
+ ('SettingsDir', 'String', QtCore.QString(SettingsDir), SettingScopeUser), # if not None, settings are stored locally in the app folder
+ ('SettingsAllUsers', 'Bool', False, SettingScopeUser), # store settings for all users?
)
SettingsBase._config_settings_ = Settings()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|