コード例 #1
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)
コード例 #2
0
ファイル: tasktreelazy.py プロジェクト: KDE/ginkgo
    def fetchMore(self):
#        if len(source) == 5:
            
        #source = source[:5]
        if self.parent is None:
            data = datamanager.findResourcesByType(TMO.Task)
            self.children.extend(Node(i.genericLabel(), self, self.depth + 1) for i in data)
            self.hasFinishedLoading = True
        else:
            data = datamanager.findResourcesByType(PIMO.Person)
            self.children.extend(Node(i.genericLabel(), self, self.depth + 1) for i in data)
            self.hasFinishedLoading = True
コード例 #3
0
ファイル: tasktreelazy.py プロジェクト: adamhartford/ginkgo
    def fetchMore(self):
        #        if len(source) == 5:

        #source = source[:5]
        if self.parent is None:
            data = datamanager.findResourcesByType(TMO.Task)
            self.children.extend(
                Node(i.genericLabel(), self, self.depth + 1) for i in data)
            self.hasFinishedLoading = True
        else:
            data = datamanager.findResourcesByType(PIMO.Person)
            self.children.extend(
                Node(i.genericLabel(), self, self.depth + 1) for i in data)
            self.hasFinishedLoading = True
コード例 #4
0
ファイル: resourcestable.py プロジェクト: KDE/ginkgo
    def closeEvent(self, event):
        print "closing..."
        try:
            print event
        except Exception, e:
            print "An error occurred: '%s.'" % str(e)


    def setQuery(self, query):
        self._query = query

    def query(self):
        return self._query
        


if __name__ == "__main__":
    import sys
    app = QApplication(sys.argv)
    
    
    model = ResourcesTableModel()

    contacts = datamanager.findResourcesByType(NFO.Website, model.queryNextReadySlot, model.queryFinishedSlot, None)

   
    
    app.exec_()

コード例 #5
0
ファイル: resourcesbytypetable.py プロジェクト: KDE/ginkgo
 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)
コード例 #6
0
ファイル: resourcestable.py プロジェクト: adamhartford/ginkgo
            self.mainWindow.writeEmail(selectedResources)
        elif key == SET_AS_CONTEXT:
            resource = Nepomuk.Resource(selectedResources[0])
            self.mainWindow.setResourceAsContext(resource)

    def closeEvent(self, event):
        print "closing..."
        try:
            print event
        except Exception, e:
            print "An error occurred: '%s.'" % str(e)

    def setQuery(self, query):
        self._query = query

    def query(self):
        return self._query


if __name__ == "__main__":
    import sys
    app = QApplication(sys.argv)

    model = ResourcesTableModel()

    contacts = datamanager.findResourcesByType(NFO.Website,
                                               model.queryNextReadySlot,
                                               model.queryFinishedSlot, None)

    app.exec_()