Make a slight redesign of the builtins
This commit is contained in:
@@ -25,10 +25,8 @@ class ViewColumn(object):
|
||||
Once the missing methods are correctly implemented,
|
||||
they can be used as columns in a view.
|
||||
'''
|
||||
columns = []
|
||||
columns = {}
|
||||
def __init__(self, fittingView):
|
||||
ViewColumn.columns.append(self)
|
||||
|
||||
self.fittingView = fittingView
|
||||
self.columnText = ""
|
||||
self.imageId = -1
|
||||
@@ -36,6 +34,14 @@ class ViewColumn(object):
|
||||
self.mask = wx.LIST_MASK_TEXT | wx.LIST_MASK_IMAGE
|
||||
self.resizable = True
|
||||
|
||||
@classmethod
|
||||
def register(cls):
|
||||
ViewColumn.columns[cls.name] = cls
|
||||
|
||||
@classmethod
|
||||
def getColumn(cls, name):
|
||||
return ViewColumn.columns[name]
|
||||
|
||||
def getRestrictions(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
@@ -47,3 +53,5 @@ class ViewColumn(object):
|
||||
|
||||
def getParameters(self):
|
||||
raise NotImplementedError()
|
||||
|
||||
from gui.builtinViewColumns import *
|
||||
Reference in New Issue
Block a user