コード例 #1
0
    def makeGrpTreeNone(self):
        """Make tree with no grouping."""
        tree = TMNode((_("Dataset"), _("Size"), _("Type"), _("File")), None)
        for name, ds in self.doc.data.iteritems():
            child = DatasetNode(self.doc, name,
                                ("name", "size", "type", "linkfile"), None)

            # add if not filtered for filtering
            if not self.datasetFilterOut(ds, child):
                tree.insertChildSorted(child)
        return tree
コード例 #2
0
ファイル: datasetbrowser.py プロジェクト: asirinelli/veusz
    def makeGrpTreeNone(self):
        """Make tree with no grouping."""
        tree = TMNode( ("Dataset", "Size", "Type", "File"), None )
        for name, ds in self.doc.data.iteritems():
            child = DatasetNode( self.doc, name,
                                 ("name", "size", "type", "linkfile"),
                                 None )

            # add if not filtered for filtering
            if not self.datasetFilterOut(ds, child):
                tree.insertChildSorted(child)
        return tree
コード例 #3
0
ファイル: datasetbrowser.py プロジェクト: asirinelli/veusz
    def __init__(self, doc, dsname, cols, parent):
        ds = doc.data[dsname]
        data = []
        assert cols[0] == "name"
        for c in cols:
            if c == "name":
                data.append( dsname )
            elif c == "size":
                data.append( ds.userSize() )
            elif c == "type":
                data.append( ds.dstype )
            elif c == "linkfile":
                data.append( os.path.basename(datasetLinkFile(ds)) )

        TMNode.__init__(self, tuple(data), parent)
        self.doc = doc
        self.cols = cols
コード例 #4
0
    def __init__(self, doc, dsname, cols, parent):
        ds = doc.data[dsname]
        data = []
        assert cols[0] == "name"
        for c in cols:
            if c == "name":
                data.append(dsname)
            elif c == "size":
                data.append(ds.userSize())
            elif c == "type":
                data.append(ds.dstype)
            elif c == "linkfile":
                data.append(os.path.basename(datasetLinkFile(ds)))

        TMNode.__init__(self, tuple(data), parent)
        self.doc = doc
        self.cols = cols
コード例 #5
0
ファイル: datasetbrowser.py プロジェクト: asirinelli/veusz
def treeFromList(nodelist, rootdata):
    """Construct a tree from a list of nodes."""
    tree = TMNode( rootdata, None )
    for node in nodelist:
        tree.insertChildSorted(node)
    return tree
コード例 #6
0
def treeFromList(nodelist, rootdata):
    """Construct a tree from a list of nodes."""
    tree = TMNode(rootdata, None)
    for node in nodelist:
        tree.insertChildSorted(node)
    return tree