def createModel(self):
     self.model = ResourcesTableModel(self)
     #self.model.setHeaders(["Full Name", "Creation Date", "Last Update"])
     self.model.setHeaders([i18n("Name"), i18n("Date")])
     datamanager.findResourcesByType(self.nepomukType,
                                     self.model.queryNextReadySlot,
                                     self.queryFinishedSlot, self)
class ResourcesByTypeTable(ResourcesTable):
    def __init__(self,
                 mainWindow=False,
                 nepomukType=None,
                 excludeList=None,
                 dialog=None):
        self.nepomukType = nepomukType
        super(ResourcesByTypeTable, self).__init__(mainWindow=mainWindow,
                                                   dialog=dialog,
                                                   excludeList=excludeList)

    def statementAddedSlot(self, statement):
        predicate = statement.predicate().uri()
        if predicate == soprano.Soprano.Vocabulary.RDF.type():
            object = statement.object().uri()
            if object == self.nepomukType:
                subject = statement.subject().uri()
                newresource = Nepomuk.Resource(subject)
                self.addResource(newresource)

    def createModel(self):
        self.model = ResourcesTableModel(self)
        #self.model.setHeaders(["Full Name", "Creation Date", "Last Update"])
        self.model.setHeaders([i18n("Name"), i18n("Date")])
        datamanager.findResourcesByType(self.nepomukType,
                                        self.model.queryNextReadySlot,
                                        self.queryFinishedSlot, self)
Beispiel #3
0
class ResourcesByTypeTable(ResourcesTable):

    def __init__(self, mainWindow=False, nepomukType=None, excludeList=None, dialog=None):
        self.nepomukType = nepomukType
        super(ResourcesByTypeTable, self).__init__(mainWindow=mainWindow, dialog=dialog, excludeList=excludeList)
        

    def statementAddedSlot(self, statement):
        predicate = statement.predicate().uri()
        if predicate == soprano.Soprano.Vocabulary.RDF.type():
            object = statement.object().uri()
            if object == self.nepomukType:
                subject = statement.subject().uri()
                newresource = Nepomuk.Resource(subject)
                self.addResource(newresource)

        
    def createModel(self):
        self.model = ResourcesTableModel(self)
        #self.model.setHeaders(["Full Name", "Creation Date", "Last Update"])
        self.model.setHeaders([i18n("Name"), i18n("Date")])
        datamanager.findResourcesByType(self.nepomukType, self.model.queryNextReadySlot, self.queryFinishedSlot, self)
Beispiel #4
0
 def createModel(self):
     self.model = ResourcesTableModel(self)
     #self.model.setHeaders(["Full Name", "Creation Date", "Last Update"])
     self.model.setHeaders([i18n("Name"), i18n("Date")])
     datamanager.findResourcesByType(self.nepomukType, self.model.queryNextReadySlot, self.queryFinishedSlot, self)