PEATDB/PEATTables.py
def add_peatcommand(fieldtype):
                """Adds all commands per column type based on self.peatactions"""
                model = self.getModel()
                colname = model.getColumnName(col)
                protein = model.getRecName(row)
                functions = self.peatactions[fieldtype]

                for f in functions.keys():
                    func = getattr(self.parentapp, functions[f])
                    if f == 'Open Ekin':
                        ekinmode = self.ekin_actions[coltype]
                        def thisfunc(self=self,function=func,protein=protein,field_name=colname):
                            return function(protein=protein,field_name=field_name,mode=ekinmode)
                    else:
                        def thisfunc(self=self,function=func,protein=protein,field_name=colname):
                            return function(protein=protein,field_name=field_name)
                    popupmenu.add_command(label=f, command=thisfunc)
                return
Adds all commands per column type based on self.peatactions
Adds all commands per column type based on self.peatactions
Adds all commands per column type based on self . peatactions
def add_peatcommand(fieldtype):
                model = self.getModel()
                colname = model.getColumnName(col)
                protein = model.getRecName(row)
                functions = self.peatactions[fieldtype]
                for f in functions.keys():
                    func = getattr(self.parentapp, functions[f])
                    if f == 'Open Ekin':
                        ekinmode = self.ekin_actions[coltype]
                        def thisfunc(self=self,function=func,protein=protein,field_name=colname):
                            return function(protein=protein,field_name=field_name,mode=ekinmode)
                    else:
                        def thisfunc(self=self,function=func,protein=protein,field_name=colname):
                            return function(protein=protein,field_name=field_name)
                    popupmenu.add_command(label=f, command=thisfunc)
                return
def add_peatcommand ( fieldtype ) : model = self . getModel ( ) colname = model . getColumnName ( col ) protein = model . getRecName ( row ) functions = self . peatactions [ fieldtype ] for f in functions . keys ( ) : func = getattr ( self . parentapp , functions [ f ] ) if f == 'Open Ekin' : ekinmode = self . ekin_actions [ coltype ] def thisfunc ( self = self , function = func , protein = protein , field_name = colname ) : return function ( protein = protein , field_name = field_name , mode = ekinmode ) else : def thisfunc ( self = self , function = func , protein = protein , field_name = colname ) : return function ( protein = protein , field_name = field_name ) popupmenu . add_command ( label = f , command = thisfunc ) return
Adds all commands per column type based on self.peatactions
Adds all commands per column type based on self . peatactions
"""Adds all commands per column type based on self.peatactions"""
fieldtype