def __init__(self,controlObj): ''' Initialise a ComboBox element from a dictionary''' self.id = controlObj['id'] self.ui = controlObj['builder'].get_object(controlObj['id']) self.schema = controlObj['schema'] self.path = controlObj['path'] self.key = controlObj['key'] self.type = controlObj['type'] self.map = controlObj['map'] self.invmap = dict([ (v,k) for (k,v) in self.map.items() ]) self.disabled = False try: gsettings.is_valid( schema=self.schema, path=self.path, key=self.key ) except AssertionError as e: self.disabled = True logger.debug('Initialised a ComboBox with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}'.format(self=self))
def __init__(self, controlObj): ''' Initialise a FontButton element from a dictionary''' self.id = controlObj['id'] self.ui = controlObj['builder'].get_object(controlObj['id']) self.schema = controlObj['schema'] self.path = controlObj['path'] self.key = controlObj['key'] self.type = 'string' assert gsettings.is_valid(schema=self.schema, path=self.path, key=self.key) logger.debug( 'Initialised a fontbutton with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}' .format(self=self))
def __init__(self,controlObj): ''' Initialise a FontButton element from a dictionary''' self.id = controlObj['id'] self.ui = controlObj['builder'].get_object(controlObj['id']) self.schema = controlObj['schema'] self.path = controlObj['path'] self.key = controlObj['key'] self.type = 'string' assert gsettings.is_valid( schema=self.schema, path=self.path, key=self.key ) logger.debug('Initialised a fontbutton with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}'.format(self=self))
def __init__(self, controlObj): """ Initialise a FontButton element from a dictionary""" self.id = controlObj["id"] self.ui = controlObj["builder"].get_object(controlObj["id"]) self.schema = controlObj["schema"] self.path = controlObj["path"] self.key = controlObj["key"] self.type = "string" assert gsettings.is_valid(schema=self.schema, path=self.path, key=self.key) logger.debug( "Initialised a fontbutton with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}".format( self=self ) )
def __init__(self, controlObj): """ Initialise a ComboBox element from a dictionary""" self.id = controlObj["id"] self.ui = controlObj["builder"].get_object(controlObj["id"]) self.schema = controlObj["schema"] self.path = controlObj["path"] self.key = controlObj["key"] self.type = controlObj["type"] self.map = controlObj["map"] self.invmap = dict([(v, k) for (k, v) in self.map.items()]) assert gsettings.is_valid(schema=self.schema, path=self.path, key=self.key) logger.debug( "Initialised a ComboBox with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}".format( self=self ) )
def __init__(self, controlObj): """ Initialise a ColorChooser element from a dictionary""" self.id = controlObj["id"] self.ui = controlObj["builder"].get_object(controlObj["id"]) self.schema = controlObj["schema"] self.path = controlObj["path"] self.key = controlObj["key"] self.type = "string" self.usealpha = controlObj["usealpha"] assert gsettings.is_valid(schema=self.schema, path=self.path, key=self.key) self.color = Gdk.RGBA() logger.debug( "Initialised a colorchooser with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}".format( self=self ) )
def __init__(self, controlObj): ''' Initialise a Treeview element from a dictionary''' self.id = controlObj['id'] self.ui = controlObj['builder'].get_object(controlObj['id']) self.schema = controlObj['schema'] self.path = controlObj['path'] self.key = controlObj['key'] self.type = controlObj['type'] self.map = controlObj['map'] self.invmap = dict([(v, k) for (k, v) in self.map.items()]) assert gsettings.is_valid(schema=self.schema, path=self.path, key=self.key) logger.debug( 'Initialised a treeview with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}' .format(self=self))
def __init__(self,controlObj): ''' Initialise a ColorChooser element from a dictionary''' self.id = controlObj['id'] self.ui = controlObj['builder'].get_object(controlObj['id']) self.schema = controlObj['schema'] self.path = controlObj['path'] self.key = controlObj['key'] self.type = 'string' self.usealpha = controlObj['usealpha'] assert gsettings.is_valid( schema=self.schema, path=self.path, key=self.key ) self.color=Gdk.RGBA() logger.debug('Initialised a colorchooser with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}'.format(self=self))
def __init__(self,controlObj): ''' Initialise a Treeview element from a dictionary''' self.id = controlObj['id'] self.ui = controlObj['builder'].get_object(controlObj['id']) self.schema = controlObj['schema'] self.path = controlObj['path'] self.key = controlObj['key'] self.type = controlObj['type'] self.map = controlObj['map'] self.invmap = dict([ (v,k) for (k,v) in self.map.items() ]) assert gsettings.is_valid( schema=self.schema, path=self.path, key=self.key ) logger.debug('Initialised a treeview with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}'.format(self=self))
def __init__(self, controlObj): ''' Initialise a SpinButton from a controlObj dictionary ''' self.id = controlObj['id'] self.ui = controlObj['builder'].get_object(controlObj['id']) self.schema = controlObj['schema'] self.path = controlObj['path'] self.key = controlObj['key'] self.type = controlObj['type'] self.min = controlObj['min'] self.max = controlObj['max'] assert gsettings.is_valid(schema=self.schema, path=self.path, key=self.key) # TODO : set the range mased on the config min-max # self.ui. logger.debug( 'Initialised a spin with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}' .format(self=self))
def __init__(self,controlObj): ''' Initialise a SpinButton from a controlObj dictionary ''' self.id = controlObj['id'] self.ui = controlObj['builder'].get_object(controlObj['id']) self.schema = controlObj['schema'] self.path = controlObj['path'] self.key = controlObj['key'] self.type = controlObj['type'] self.min = controlObj['min'] self.max = controlObj['max'] assert gsettings.is_valid( schema=self.schema, path=self.path, key=self.key ) # TODO : set the range mased on the config min-max # self.ui. logger.debug('Initialised a spin with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}'.format(self=self))
def __init__(self,controlObj): ''' Initialise a Radio from a controlObj dictionary ''' self.id = controlObj['id'] self.builder = controlObj['builder'] self.ui = controlObj['builder'].get_object(controlObj['id']) self.schema = controlObj['schema'] self.path = controlObj['path'] self.key = controlObj['key'] self.type = controlObj['type'] self.group = controlObj['group'] self.value = controlObj['value'] self.dependants = controlObj['dependants'] self.active = False assert gsettings.is_valid( schema=self.schema, path=self.path, key=self.key ) logger.debug('Initialised a radiobutton with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}'.format(self=self))
def __init__(self, controlObj): ''' Initialise a Radio from a controlObj dictionary ''' self.id = controlObj['id'] self.builder = controlObj['builder'] self.ui = controlObj['builder'].get_object(controlObj['id']) self.schema = controlObj['schema'] self.path = controlObj['path'] self.key = controlObj['key'] self.type = controlObj['type'] self.group = controlObj['group'] self.value = controlObj['value'] self.dependants = controlObj['dependants'] self.active = False assert gsettings.is_valid(schema=self.schema, path=self.path, key=self.key) logger.debug( 'Initialised a radiobutton with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}' .format(self=self))
def __init__(self,controlObj): ''' Initialise a scale from a controlObj dictionary ''' self.id = controlObj['id'] self.ui = controlObj['builder'].get_object(controlObj['id']) self.schema = controlObj['schema'] self.path = controlObj['path'] self.key = controlObj['key'] self.type = controlObj['type'] self.min = controlObj['min'] self.max = controlObj['max'] self.ticks = controlObj['ticks'] assert gsettings.is_valid( schema = self.schema, path = self.path, key = self.key ) for tick in self.ticks: self.ui.add_mark(*tick) # TODO : Set range using min, max logger.debug('Initialised a scale with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}'.format(self=self))
def __init__(self,controlObj): ''' Initialise a ComboBox element from a dictionary''' self.id = controlObj['id'] self.ui = controlObj['builder'].get_object(controlObj['id']) self.schema = controlObj['schema'] self.path = controlObj['path'] self.key = controlObj['key'] self.type = controlObj['type'] self.map = controlObj['map'] self.invmap = dict([ (v,k) for (k,v) in self.map.items() ]) self.disabled = False try: assert gsettings.is_valid( schema=self.schema, path=self.path, key=self.key ) except AssertionError as e: self.disabled = True logger.debug('Initialised a ComboBox with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}'.format(self=self))
def __init__(self, controlObj): ''' Initialise a scale from a controlObj dictionary ''' self.id = controlObj['id'] self.ui = controlObj['builder'].get_object(controlObj['id']) self.schema = controlObj['schema'] self.path = controlObj['path'] self.key = controlObj['key'] self.type = controlObj['type'] self.min = controlObj['min'] self.max = controlObj['max'] self.ticks = controlObj['ticks'] assert gsettings.is_valid(schema=self.schema, path=self.path, key=self.key) for tick in self.ticks: self.ui.add_mark(*tick) # TODO : Set range using min, max logger.debug( 'Initialised a scale with id {self.id} to control key {self.key} of type {self.type} in schema {self.schema} with path {self.path}' .format(self=self))