def data(self,index,role): "Returns the data for a specific location as a string" if not index.isValid() : return None if role!=Qt.DisplayRole : return None data=index.internalPointer() if data==None : print "Error with index ",index.row(),index.column() return "XXX" #if index.column()==0 : print "EMFileItemModel.data(%d %d %s)=%s"%(index.row(),index.column(),index.parent(),str(data.__dict__)) col=index.column() if col==0: return nonone(data.index) elif col==1 : if data.isbdb : return "bdb:"+data.name return nonone(data.name) elif col==2 : if data.boxcount==0 : return "-" return nonone(data.boxcount) elif col==3 : if data.quality==0 : return "-" return nonone(data.quality) elif col==4 : if data.mgquality==0 : return "-" return nonone(data.mgquality)
def data(self,index,role): "Returns the data for a specific location as a string" if not index.isValid() : return None if role!=Qt.DisplayRole : return None data=index.internalPointer() if data==None : print "Error with index ",index.row(),index.column() return "XXX" #if index.column()==0 : print "EMFileItemModel.data(%d %d %s)=%s"%(index.row(),index.column(),index.parent(),str(data.__dict__)) col=index.column() if col==0: return nonone(data.index) elif col==1 : if data.isbdb : return "bdb:"+data.name return nonone(data.name) elif col==2 : if data.nimg==0 : return "-" return nonone(data.nimg) elif col==3 : if data.badparticlecount==0 : return "-" return nonone(data.badparticlecount) elif col==4 : if data.defocus==0 : return "-" return nonone(data.defocus) elif col==5 : if data.bfactor==0 : return "-" return nonone(data.bfactor) elif col==6 : if data.snr==0 : return "-" return nonone(data.snr) elif col==7 : if data.quality==0 : return "-" return nonone(data.quality) elif col==8 : if data.sampling==0 : return "-" return nonone(data.sampling) elif col==9 : if data.particledim==0 : return "-" return nonone(data.particledim)
def data(self,index,role): "Returns the data for a specific location as a string" if not index.isValid() : return None if role!=Qt.DisplayRole : return None data=index.internalPointer() if data==None : print "Error with index ",index.row(),index.column() return "XXX" col=index.column() if col==0: return nonone(data.index) elif col==1 : if data.isbdb : return "bdb:"+data.name return nonone(data.name) elif col==2 : if data.dim==0 : return "-" return nonone(data.dim)