def contentItemFromQAction(qAction): """ Creates a Content object from a QAction object. """ cnt = Content() cnt.name = qAction.text() return cnt
def addContent(self,name,code): """ Create a new Content item and add it to the collection. """ cnt = Content() cnt.name = name cnt.code = code self._contentItems.append(cnt)
def addContent(self, name, code): """ Create a new Content item and add it to the collection. """ cnt = Content() cnt.name = name cnt.code = code self._contentItems.append(cnt)