def asQFont(tableName, key, defaultValue=None): from Config.Types import asQFont prop = Property(tableName, key) if prop.hasValue(): return asQFont(prop) elif defaultValue is None: raise AttributeError() return defaultValue
def asQColor(table, key, defaultValue=None): from Config.Types import asQColor if isinstance(table, str): prop = Property(table, key) else: # Table prop = table[key] if prop.hasValue(): return asQColor(prop) elif defaultValue is None: raise AttributeError() return defaultValue
def get_or(self, key, defaultValue): return Property(self.tableName, key).get_or(defaultValue)
def get(self, key): return Property(self.tableName, key).get()
def __getitem__(self, key): return Property(self.tableName, key)
def get(tableName, key): return Property(tableName, key).get()