Exemplo n.º 1
0
    def __init__(self, parent, win, name="modelTreeView", size=(200, 560)):
        """
        #doc
        """
        self._treemodel = TreeModel(self, win)

        self.modelTreeGui = ModelTreeGui(win, name, self._treemodel, parent)
        # public member; review: maybe it ought to have a special name
        # (or get-method) just for its public purpose, so this attr could
        # be made private for internal use

        self.mt_update()
        return
Exemplo n.º 2
0
    def __init__(self, parent, win, name="modelTreeView", size=(200, 560)):
        """
        #doc
        """
        self._treemodel = TreeModel(self, win)

        self.modelTreeGui = ModelTreeGui(win, name, self._treemodel, parent)
        # public member; review: maybe it ought to have a special name
        # (or get-method) just for its public purpose, so this attr could
        # be made private for internal use

        self.mt_update()
        return
Exemplo n.º 3
0
class ModelTree(object):
    """
    NE1's main model tree, serving as public owner of the model tree widget
    (self.modelTreeGui, class ModelTreeGui) and private owner of the tree
    model shown by that (class TreeModel).

    @note: ModelTree is a public class name, and self.modelTreeGui
           is a public member, accessed by MWsemantics (or a subobject)
           for use in building the Qt widget layout. For public access
           purposes it can be considered "the Qt widget containing the model
           tree".
    """

    def __init__(self, parent, win, name="modelTreeView", size=(200, 560)):
        """
        #doc
        """
        self._treemodel = TreeModel(self, win)

        self.modelTreeGui = ModelTreeGui(win, name, self._treemodel, parent)
        # public member; review: maybe it ought to have a special name
        # (or get-method) just for its public purpose, so this attr could
        # be made private for internal use

        self.mt_update()
        return

    def mt_update(self):
        return self.modelTreeGui.mt_update()

    def repaint_some_nodes(self, nodes):  # bruce 080507, for cross-highlighting
        """
        For each node in nodes, repaint that node, if it was painted the last
        time we repainted self as a whole. (Not an error if it wasn't.)
        """
        self.modelTreeGui.repaint_some_nodes(nodes)
        return

    def setMinimumSize(self, h, w):
        return self.modelTreeGui.setMinimumSize(h, w)

    def setMaximumWidth(self, w):  # k might not be needed
        return self.modelTreeGui.setMaximumWidth(w)

    def setColumnWidth(self, column, w):
        return self.modelTreeGui.setColumnWidth(column, w)

    def setGeometry(self, w, h):  # k might not be needed
        return self.modelTreeGui.setGeometry(QtCore.QRect(0, 0, w, h))

    pass  # end of class ModelTree
Exemplo n.º 4
0
class ModelTree(object):
    """
    NE1's main model tree, serving as public owner of the model tree widget
    (self.modelTreeGui, class ModelTreeGui) and private owner of the tree
    model shown by that (class TreeModel).

    @note: ModelTree is a public class name, and self.modelTreeGui
           is a public member, accessed by MWsemantics (or a subobject)
           for use in building the Qt widget layout. For public access
           purposes it can be considered "the Qt widget containing the model
           tree".
    """
    def __init__(self, parent, win, name="modelTreeView", size=(200, 560)):
        """
        #doc
        """
        self._treemodel = TreeModel(self, win)

        self.modelTreeGui = ModelTreeGui(win, name, self._treemodel, parent)
        # public member; review: maybe it ought to have a special name
        # (or get-method) just for its public purpose, so this attr could
        # be made private for internal use

        self.mt_update()
        return

    def mt_update(self):
        return self.modelTreeGui.mt_update()

    def repaint_some_nodes(self, nodes):  #bruce 080507, for cross-highlighting
        """
        For each node in nodes, repaint that node, if it was painted the last
        time we repainted self as a whole. (Not an error if it wasn't.)
        """
        self.modelTreeGui.repaint_some_nodes(nodes)
        return

    def setMinimumSize(self, h, w):
        return self.modelTreeGui.setMinimumSize(h, w)

    def setMaximumWidth(self, w):  #k might not be needed
        return self.modelTreeGui.setMaximumWidth(w)

    def setColumnWidth(self, column, w):
        return self.modelTreeGui.setColumnWidth(column, w)

    def setGeometry(self, w, h):  #k might not be needed
        return self.modelTreeGui.setGeometry(QtCore.QRect(0, 0, w, h))

    pass  # end of class ModelTree