PyScore

01: # -*- python -*-
02: #### validdata.py #### python package PyScore.register module validdata ####
03: 
04: # PyScore
05: # a race scoring programme
06: # written by Matt Draisey
07: # 2004 April 6
08: 
09: #### validdata.py #### python package PyScore.register module validdata ####
10: 
11: import datetime
12: import gtk,pango
13: from register import basetree
14: 
15: ######## ######## ######## dates ######## ######## ########
16: 
17: datebase=datetime.date(2005,05,18)
18: 
19: ######## ######## ######## load data frames ######## ######## ########
20: 
21: def new_boid(position):
22:         return basetree.model.get_path(basetree.model.insert(None,position,(
23:                 True,False,False,False,
24:                 0,pango.STYLE_NORMAL,pango.WEIGHT_NORMAL,True,
25:                 -1,
26:                 "Boat Identification: 'New'",
27:                 "",
28:                 "",
29:                 "",
30:                 "",
31:                 0,
32:         )))
33: 
34: def limit_cert(page,makeofboat):
35:     def valid_authorities(self,makeofboat):
36:         if makeofboat.lower.startswith("shark"):
37:              pass
38: 
39: def new_cert(parent,position):
40:         p=basetree.model.get_iter(parent)
41:         return basetree.model.get_path(basetree.model.insert(p,position,(
42:                 False,True,False,False,
43:                 1,pango.STYLE_OBLIQUE,pango.WEIGHT_NORMAL,True,
44:                 -1,
45:                 "Certification: 'New'",
46:                 "",
47:                 "New",
48:                 "",
49:                 "",
50:                 0,
51:         )))
52: 
53: def new_flco(parent,position):
54:         p=basetree.model.get_iter(parent)
55:         return basetree.model.get_path(basetree.model.insert(p,position,(
56:                 False,False,True,False,
57:                 2,pango.STYLE_NORMAL,pango.WEIGHT_BOLD,True,
58:                 -1,
59:                 "Fleet Configuration: 'New'",
60:                 "",
61:                 "",
62:                 "",
63:                 "",
64:                 0,
65:         )))
66: 
67: def new_regi(parent,position):
68:         p=basetree.model.get_iter(parent)
69:         return basetree.model.get_path(basetree.model.insert(p,position,(
70:                 False,False,False,True,
71:                 3,pango.STYLE_ITALIC,pango.WEIGHT_BOLD,True,
72:                 -1,
73:                 "Registration: 'New'",
74:                 "",
75:                 "New",
76:                 "1",
77:                 "1",
78:                 1,
79:         )))
80: 
81: #### dataframes.py #### python package PyScore.register module dataframes ####