PEATDB/Labbook.py
def edit_Table(self, row, col):
        """Edit a nested table.
        Done by opening up another instance of labbook and
        returning the data to the parent"""

        #get cell data and pass to labbook as a new table
        model = self.getModel()
        tabledata = model.getCellRecord(row,col)
        refname = str(row)+'_'+str(col)
        if self.peatinfo != None:
            refname =  self.peatinfo['record']+'_'+self.peatinfo['column']+'_'+refname
        from Labbook import LabbookApp
        if tabledata:
            self.sublabbook = LabbookApp(parent=self, title=refname, data=tabledata)
        else:
            self.sublabbook = LabbookApp(parent=self, title=refname)
        self.master.wait_window(self.sublabbook.labbook_win)

        # did we get any data back?
        if not hasattr(self,'templabbookdata'):
            self.templabbookdata=None
        else:
            model.setValueAt(self.templabbookdata, row, col)
            self.redrawTable()
            self.templabbookdata=None

        return
Edit a nested table.
        Done by opening up another instance of labbook and
        returning the data to the parent
Edit a nested table.
Done by opening up another instance of labbook and
returning the data to the parent
Edit a nested table . Done by opening up another instance of labbook and returning the data to the parent
def edit_Table(self, row, col):
        model = self.getModel()
        tabledata = model.getCellRecord(row,col)
        refname = str(row)+'_'+str(col)
        if self.peatinfo != None:
            refname =  self.peatinfo['record']+'_'+self.peatinfo['column']+'_'+refname
        from Labbook import LabbookApp
        if tabledata:
            self.sublabbook = LabbookApp(parent=self, title=refname, data=tabledata)
        else:
            self.sublabbook = LabbookApp(parent=self, title=refname)
        self.master.wait_window(self.sublabbook.labbook_win)
        if not hasattr(self,'templabbookdata'):
            self.templabbookdata=None
        else:
            model.setValueAt(self.templabbookdata, row, col)
            self.redrawTable()
            self.templabbookdata=None
        return
def edit_Table ( self , row , col ) : model = self . getModel ( ) tabledata = model . getCellRecord ( row , col ) refname = str ( row ) + '_' + str ( col ) if self . peatinfo != None : refname = self . peatinfo [ 'record' ] + '_' + self . peatinfo [ 'column' ] + '_' + refname from Labbook import LabbookApp if tabledata : self . sublabbook = LabbookApp ( parent = self , title = refname , data = tabledata ) else : self . sublabbook = LabbookApp ( parent = self , title = refname ) self . master . wait_window ( self . sublabbook . labbook_win ) if not hasattr ( self , 'templabbookdata' ) : self . templabbookdata = None else : model . setValueAt ( self . templabbookdata , row , col ) self . redrawTable ( ) self . templabbookdata = None return
Edit a nested table.
Edit a nested table .
"""Edit a nested table.
        Done by opening up another instance of labbook and
        returning the data to the parent""" #get cell data and pass to labbook as a new table # did we get any data back?
self
row
col