PEATDB/Ekin/Ekin_main.py
def showDatasetsTable(self):
        """Show a list of all datasets in a table"""
        if hasattr(self, 'datasetsframe'):
            self.m.forget(self.datasetsframe)
        if self.showdatasetstable.get() == 1:
            from PEATDB.Ekin.Tables import EkinProjModel, EkinProjTable

            def plotselected():
                datasets = self.datasetstable.get_selectedRecordNames()
                self.plotframe.plotCurrent(datasets=datasets, plotoption=self.overlayPlots.get())

            def deleteselected():
                datasets = self.datasetstable.get_selectedRecordNames()
                for d in datasets:
                    print d
                    self.E.deleteDataset(d)
                self.updateDatasetSelector()
                self.updateAll()

            def createTable():
                self.currentmodel = EkinProjModel(self.E)
                self.datasetsframe = Frame(self.m)
                self.m.add(self.datasetsframe,minsize=250)
                self.datasetstable = EkinProjTable(self.datasetsframe, self.currentmodel)
                self.datasetstable.createTableFrame()

            def refresh():
                self.currentmodel = EkinProjModel(self.E)
                self.datasetstable.redrawTable()

            createTable()
            b=Frame(self.datasetsframe)
            b.grid(row=3,column=1)
            Button(b, text='plot selected', command=plotselected).pack(side=LEFT,fill=BOTH)
            self.delb = Ekin_images.delb()
            Button(b, text='delete', image=self.delb,command=deleteselected).pack(side=LEFT,fill=BOTH)
            Button(b, text='refresh', command=refresh).pack(side=LEFT,fill=BOTH)
        else:
            if hasattr(self, 'datasetsframe'):
                self.m.forget(self.datasetsframe)
        return
Show a list of all datasets in a table
Show a list of all datasets in a table
Show a list of all datasets in a table
def showDatasetsTable(self):
        if hasattr(self, 'datasetsframe'):
            self.m.forget(self.datasetsframe)
        if self.showdatasetstable.get() == 1:
            from PEATDB.Ekin.Tables import EkinProjModel, EkinProjTable
            def plotselected():
                datasets = self.datasetstable.get_selectedRecordNames()
                self.plotframe.plotCurrent(datasets=datasets, plotoption=self.overlayPlots.get())
            def deleteselected():
                datasets = self.datasetstable.get_selectedRecordNames()
                for d in datasets:
                    print d
                    self.E.deleteDataset(d)
                self.updateDatasetSelector()
                self.updateAll()
            def createTable():
                self.currentmodel = EkinProjModel(self.E)
                self.datasetsframe = Frame(self.m)
                self.m.add(self.datasetsframe,minsize=250)
                self.datasetstable = EkinProjTable(self.datasetsframe, self.currentmodel)
                self.datasetstable.createTableFrame()
            def refresh():
                self.currentmodel = EkinProjModel(self.E)
                self.datasetstable.redrawTable()
            createTable()
            b=Frame(self.datasetsframe)
            b.grid(row=3,column=1)
            Button(b, text='plot selected', command=plotselected).pack(side=LEFT,fill=BOTH)
            self.delb = Ekin_images.delb()
            Button(b, text='delete', image=self.delb,command=deleteselected).pack(side=LEFT,fill=BOTH)
            Button(b, text='refresh', command=refresh).pack(side=LEFT,fill=BOTH)
        else:
            if hasattr(self, 'datasetsframe'):
                self.m.forget(self.datasetsframe)
        return
def showDatasetsTable ( self ) : if hasattr ( self , 'datasetsframe' ) : self . m . forget ( self . datasetsframe ) if self . showdatasetstable . get ( ) == 1 : from PEATDB . Ekin . Tables import EkinProjModel , EkinProjTable def plotselected ( ) : datasets = self . datasetstable . get_selectedRecordNames ( ) self . plotframe . plotCurrent ( datasets = datasets , plotoption = self . overlayPlots . get ( ) ) def deleteselected ( ) : datasets = self . datasetstable . get_selectedRecordNames ( ) for d in datasets : print d self . E . deleteDataset ( d ) self . updateDatasetSelector ( ) self . updateAll ( ) def createTable ( ) : self . currentmodel = EkinProjModel ( self . E ) self . datasetsframe = Frame ( self . m ) self . m . add ( self . datasetsframe , minsize = 250 ) self . datasetstable = EkinProjTable ( self . datasetsframe , self . currentmodel ) self . datasetstable . createTableFrame ( ) def refresh ( ) : self . currentmodel = EkinProjModel ( self . E ) self . datasetstable . redrawTable ( ) createTable ( ) b = Frame ( self . datasetsframe ) b . grid ( row = 3 , column = 1 ) Button ( b , text = 'plot selected' , command = plotselected ) . pack ( side = LEFT , fill = BOTH ) self . delb = Ekin_images . delb ( ) Button ( b , text = 'delete' , image = self . delb , command = deleteselected ) . pack ( side = LEFT , fill = BOTH ) Button ( b , text = 'refresh' , command = refresh ) . pack ( side = LEFT , fill = BOTH ) else : if hasattr ( self , 'datasetsframe' ) : self . m . forget ( self . datasetsframe ) return
Show a list of all datasets in a table
Show a list of all datasets in a table
"""Show a list of all datasets in a table"""
self