Make a slight redesign of the builtins

This commit is contained in:
cncfanatics
2010-10-04 09:17:52 +02:00
parent 7564914cf0
commit c41525ff4a
23 changed files with 47 additions and 45 deletions

View File

@@ -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 *