dialogs/ActionBlockDialog.py
branchwxPython4
changeset 3639 6c7e8e8c6bc5
parent 3303 0ffb41625592
child 3640 822fdcef784b
equal deleted inserted replaced
3638:606c984a58c2 3639:6c7e8e8c6bc5
   161 
   161 
   162         self.SetSizer(main_sizer)
   162         self.SetSizer(main_sizer)
   163 
   163 
   164         self.Table = ActionTable(self, [], GetActionTableColnames())
   164         self.Table = ActionTable(self, [], GetActionTableColnames())
   165         typelist = GetTypeList()
   165         typelist = GetTypeList()
   166         self.TypeList = ",".join(map(_, typelist))
   166         self.TypeList = map(_, typelist)
   167         self.TranslateType = dict([(_(value), value) for value in typelist])
   167         self.TranslateType = dict([(_(value), value) for value in typelist])
   168         self.ColSizes = [60, 90, 130, 200, 50]
   168         self.ColSizes = [60, 90, 130, 200, 50]
   169         self.ColAlignements = [wx.ALIGN_LEFT, wx.ALIGN_LEFT, wx.ALIGN_LEFT, wx.ALIGN_LEFT, wx.ALIGN_LEFT]
   169         self.ColAlignements = [wx.ALIGN_LEFT, wx.ALIGN_LEFT, wx.ALIGN_LEFT, wx.ALIGN_LEFT, wx.ALIGN_LEFT]
   170 
   170 
   171         self.ActionsGrid.SetTable(self.Table)
   171         self.ActionsGrid.SetTable(self.Table)
   194 
   194 
   195     def OnActionsGridCellChange(self, event):
   195     def OnActionsGridCellChange(self, event):
   196         wx.CallAfter(self.Table.ResetView, self.ActionsGrid)
   196         wx.CallAfter(self.Table.ResetView, self.ActionsGrid)
   197         event.Skip()
   197         event.Skip()
   198 
   198 
   199     def SetQualifierList(self, list):
   199     def SetQualifierList(self, odict):
   200         self.QualifierList = ",".join(list)
   200         self.QualifierList = [qname for qname in odict]
   201         self.DurationList = list
   201         self.DurationList = odict
   202 
   202 
   203     def SetVariableList(self, list):
   203     def SetVariableList(self, lst):
   204         self.VariableList = "," + ",".join([variable.Name for variable in list])
   204         self.VariableList = [variable.Name for variable in lst]
   205 
   205 
   206     def SetActionList(self, list):
   206     def SetActionList(self, lst):
   207         self.ActionList = "," + ",".join(list)
   207         self.ActionList = lst
   208 
   208 
   209     def SetValues(self, actions):
   209     def SetValues(self, actions):
   210         for action in actions:
   210         for action in actions:
   211             row = action.copy()
   211             row = action.copy()
   212             if row.type == "reference" and row.value in self.ActionList:
   212             if row.type == "reference" and row.value in self.ActionList: