37 #------------------------------------------------------------------------------- |
37 #------------------------------------------------------------------------------- |
38 |
38 |
39 [ID_CONFIGURATIONEDITOR, |
39 [ID_CONFIGURATIONEDITOR, |
40 ] = [wx.NewId() for _init_ctrls in range(1)] |
40 ] = [wx.NewId() for _init_ctrls in range(1)] |
41 |
41 |
|
42 |
42 class ConfigurationEditor(EditorPanel): |
43 class ConfigurationEditor(EditorPanel): |
43 |
44 |
44 ID = ID_CONFIGURATIONEDITOR |
45 ID = ID_CONFIGURATIONEDITOR |
45 VARIABLE_PANEL_TYPE = "config" |
46 VARIABLE_PANEL_TYPE = "config" |
46 |
47 |
64 #------------------------------------------------------------------------------- |
65 #------------------------------------------------------------------------------- |
65 |
66 |
66 def GetTasksTableColnames(): |
67 def GetTasksTableColnames(): |
67 _ = lambda x : x |
68 _ = lambda x : x |
68 return [_("Name"), _("Triggering"), _("Single"), _("Interval"), _("Priority")] |
69 return [_("Name"), _("Triggering"), _("Single"), _("Interval"), _("Priority")] |
|
70 |
69 |
71 |
70 def GetTaskTriggeringOptions(): |
72 def GetTaskTriggeringOptions(): |
71 _ = lambda x : x |
73 _ = lambda x : x |
72 return [_("Interrupt"), _("Cyclic")] |
74 return [_("Interrupt"), _("Cyclic")] |
73 TASKTRIGGERINGOPTIONS_DICT = dict([(_(option), option) for option in GetTaskTriggeringOptions()]) |
75 TASKTRIGGERINGOPTIONS_DICT = dict([(_(option), option) for option in GetTaskTriggeringOptions()]) |
74 |
76 |
75 SingleCellEditor = lambda *x : wx.grid.GridCellChoiceEditor() |
77 SingleCellEditor = lambda *x : wx.grid.GridCellChoiceEditor() |
76 |
78 |
|
79 |
77 def CheckSingle(single, varlist): |
80 def CheckSingle(single, varlist): |
78 return single in varlist |
81 return single in varlist |
79 |
82 |
80 |
83 |
81 def GetInstancesTableColnames(): |
84 def GetInstancesTableColnames(): |
82 _ = lambda x : x |
85 _ = lambda x : x |
83 return [_("Name"), _("Type"), _("Task")] |
86 return [_("Name"), _("Type"), _("Task")] |
|
87 |
84 |
88 |
85 class ResourceTable(CustomTable): |
89 class ResourceTable(CustomTable): |
86 |
90 |
87 """ |
91 """ |
88 A custom wx.grid.Grid Table using user supplied data |
92 A custom wx.grid.Grid Table using user supplied data |