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)
def content_items(self): """ :return: Returns a collection of content times specifying permissions for the various search operations. :rtype: list """ cnt_items = [] for a in self.actions(): c = Content() c.name = a.text() cnt_items.append(c) return cnt_items
def contentItemFromName(name): cnt = Content() cnt.name = name return cnt