Exemple #1
0
 def onAddRequirement(self,evt):
   dlg = RequirementDialog(self,self.theStructureCtrl.assets())
   if (dlg.ShowModal() == PATTERNREQUIREMENT_BUTTONCOMMIT_ID):
     self.theSelectedIdx = self.GetItemCount()
     reqName = dlg.name()
     self.InsertStringItem(self.theSelectedIdx,reqName)
     self.reqs[reqName] = (dlg.description(),dlg.type(),dlg.rationale(),dlg.fitCriterion(),dlg.asset())
Exemple #2
0
 def onRequirementActivated(self,evt):
   self.theSelectedIdx = evt.GetIndex()
   reqName = self.GetItemText(self.theSelectedIdx)
   reqData = self.reqs[reqName]
   reqDesc = reqData[0]
   reqType = reqData[1]
   reqRationale = reqData[2]
   reqFC = reqData[3]
   reqAsset = reqData[4]
    
   dlg = RequirementDialog(self,self.theStructureCtrl.assets(),reqName,reqDesc,reqType,reqRationale,reqFC,reqAsset)
   if (dlg.ShowModal() == PATTERNREQUIREMENT_BUTTONCOMMIT_ID):
     del self.reqs[reqName]
     reqName = dlg.name()
     self.SetStringItem(self.theSelectedIdx,0,reqName)
     self.reqs[reqName] = (dlg.description(),dlg.type(),dlg.rationale(),dlg.fitCriterion(),dlg.asset())