Rename value to glyph_data in glyphdbedit.Column and its subclasses.
This commit is contained in:
parent
da67db6dff
commit
ce3353c831
1 changed files with 12 additions and 12 deletions
|
|
@ -34,34 +34,34 @@ from ..image import Image
|
||||||
|
|
||||||
class Column(object):
|
class Column(object):
|
||||||
header = None
|
header = None
|
||||||
def data(self, value):
|
def data(self, glyph_data):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def image(self, value):
|
def image(self, glyph_data):
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def sortKey(self, value):
|
def sortKey(self, glyph_data):
|
||||||
return self.data(value)
|
return self.data(glyph_data)
|
||||||
|
|
||||||
|
|
||||||
class TextColumn(Column):
|
class TextColumn(Column):
|
||||||
header = 'Text'
|
header = 'Text'
|
||||||
|
|
||||||
def data(self, value):
|
def data(self, glyph_data):
|
||||||
return value.text
|
return glyph_data.text
|
||||||
|
|
||||||
def image(self, value):
|
def image(self, glyph_data):
|
||||||
return value.image.qimage
|
return glyph_data.image.qimage
|
||||||
|
|
||||||
|
|
||||||
class ElevationColumn(Column):
|
class ElevationColumn(Column):
|
||||||
header = 'Elevation'
|
header = 'Elevation'
|
||||||
|
|
||||||
def data(self, value):
|
def data(self, glyph_data):
|
||||||
return str(value.elevation)
|
return str(glyph_data.elevation)
|
||||||
|
|
||||||
def sortKey(self, value):
|
def sortKey(self, glyph_data):
|
||||||
return value.elevation
|
return glyph_data.elevation
|
||||||
|
|
||||||
|
|
||||||
class GlyphDBModel(QAbstractTableModel):
|
class GlyphDBModel(QAbstractTableModel):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue