PEATDB/PEATTables.py
def handle_double_click(self, event):
        """Do double click stuff. Selected row/cols will already have
           been set with single click binding"""
        row = self.get_row_clicked(event)
        col = self.get_col_clicked(event)
        absrow = self.get_AbsoluteRow(row)
        if col == None:
            return
        model = self.getModel()
        cellvalue = model.getCellRecord(absrow, col)
        coltype = model.getColumnType(col)
        colname = model.getColumnName(col)
        protein = model.getRecName(absrow)

        def do_peatcommand(fieldtype):
            functions = self.peatactions[fieldtype]
            kys = functions.keys()
            default = kys[0]
            func = getattr(self.parentapp, functions[default])
            if fieldtype == 'Ekintype':
                ekinmode = self.ekin_actions[coltype]
                func(protein=protein, field_name=colname, mode=ekinmode)
            else:
                func(protein=protein, field_name=colname)
            return
        if Formula.isFormula(cellvalue):
            self.formula_Dialog(row, col, cellvalue)
        elif coltype in self.model.ekintypes:
            do_peatcommand('Ekintype')
        elif coltype.lower() == 'text':
            self.draw_cellentry(row, col)
        elif self.peatactions.has_key(coltype):
            do_peatcommand(coltype)
        else:
            raise Exception('Unknown field')
        return
Do double click stuff. Selected row/cols will already have
           been set with single click binding
Do double click stuff. Selected row/cols will already have
been set with single click binding
Do double click stuff . Selected row / cols will already have been set with single click binding
def handle_double_click(self, event):
        row = self.get_row_clicked(event)
        col = self.get_col_clicked(event)
        absrow = self.get_AbsoluteRow(row)
        if col == None:
            return
        model = self.getModel()
        cellvalue = model.getCellRecord(absrow, col)
        coltype = model.getColumnType(col)
        colname = model.getColumnName(col)
        protein = model.getRecName(absrow)
        def do_peatcommand(fieldtype):
            functions = self.peatactions[fieldtype]
            kys = functions.keys()
            default = kys[0]
            func = getattr(self.parentapp, functions[default])
            if fieldtype == 'Ekintype':
                ekinmode = self.ekin_actions[coltype]
                func(protein=protein, field_name=colname, mode=ekinmode)
            else:
                func(protein=protein, field_name=colname)
            return
        if Formula.isFormula(cellvalue):
            self.formula_Dialog(row, col, cellvalue)
        elif coltype in self.model.ekintypes:
            do_peatcommand('Ekintype')
        elif coltype.lower() == 'text':
            self.draw_cellentry(row, col)
        elif self.peatactions.has_key(coltype):
            do_peatcommand(coltype)
        else:
            raise Exception('Unknown field')
        return
def handle_double_click ( self , event ) : row = self . get_row_clicked ( event ) col = self . get_col_clicked ( event ) absrow = self . get_AbsoluteRow ( row ) if col == None : return model = self . getModel ( ) cellvalue = model . getCellRecord ( absrow , col ) coltype = model . getColumnType ( col ) colname = model . getColumnName ( col ) protein = model . getRecName ( absrow ) def do_peatcommand ( fieldtype ) : functions = self . peatactions [ fieldtype ] kys = functions . keys ( ) default = kys [ 0 ] func = getattr ( self . parentapp , functions [ default ] ) if fieldtype == 'Ekintype' : ekinmode = self . ekin_actions [ coltype ] func ( protein = protein , field_name = colname , mode = ekinmode ) else : func ( protein = protein , field_name = colname ) return if Formula . isFormula ( cellvalue ) : self . formula_Dialog ( row , col , cellvalue ) elif coltype in self . model . ekintypes : do_peatcommand ( 'Ekintype' ) elif coltype . lower ( ) == 'text' : self . draw_cellentry ( row , col ) elif self . peatactions . has_key ( coltype ) : do_peatcommand ( coltype ) else : raise Exception ( 'Unknown field' ) return
Do double click stuff.
Do double click stuff .
"""Do double click stuff. Selected row/cols will already have
           been set with single click binding"""
self
event