Esempio n. 1
0
    def contentItemFromQAction(qAction):
        """
        Creates a Content object from a QAction object.
        """
        cnt = Content()
        cnt.name = qAction.text()

        return cnt
Esempio n. 2
0
 def contentItemFromQAction(qAction):
     """
     Creates a Content object from a QAction object.
     """
     cnt = Content()
     cnt.name = qAction.text()
     
     return cnt
Esempio n. 3
0
    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)
Esempio n. 4
0
 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)
Esempio n. 5
0
    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
Esempio n. 6
0
 def contentItemFromName(name):
     cnt = Content()
     cnt.name = name
     return cnt