Better handling of sources
svn: r79
This commit is contained in:
@@ -532,6 +532,21 @@ class Family:
|
||||
self.id = -1
|
||||
self.photoList = []
|
||||
self.note = Note()
|
||||
self.attributeList = []
|
||||
|
||||
def addAttribute(self,attribute) :
|
||||
self.attributeList.append(attribute)
|
||||
|
||||
def removeAttribute(self,attribute):
|
||||
index = 0
|
||||
for attr in self.attributeList:
|
||||
if attr == attribute:
|
||||
del self.attributeList[index]
|
||||
return
|
||||
index = index + 1
|
||||
|
||||
def getAttributeList(self) :
|
||||
return self.attributeList
|
||||
|
||||
def getNote(self):
|
||||
return self.note.get()
|
||||
@@ -807,6 +822,13 @@ class RelDataBase:
|
||||
map[attr.getType()] = 1
|
||||
return map.keys()
|
||||
|
||||
def getFamilyAttributeTypes(self):
|
||||
map = {}
|
||||
for family in self.familyMap.values():
|
||||
for attr in family.getAttributeList():
|
||||
map[attr.getType()] = 1
|
||||
return map.keys()
|
||||
|
||||
def getFamilyRelationTypes(self):
|
||||
map = {}
|
||||
for family in self.familyMap.values():
|
||||
|
||||
Reference in New Issue
Block a user