Exemplo n.º 1
0
 def __init__(self, parent=None):
     super(NodeGraph, self).__init__(parent)
     self._model = NodeGraphModel()
     self._viewer = NodeViewer()
     self._undo_stack = QUndoStack(self)
     self._init_actions()
     self._wire_signals()
Exemplo n.º 2
0
    def __init__(self, parent=None, tab_search_key='tab'):
        super(NodeGraph, self).__init__(parent)
        self.setObjectName('NodeGraphQt')
        self._model = NodeGraphModel()
        self._viewer = NodeViewer()
        self._vendor = NodeVendor()
        self._undo_stack = QUndoStack(self)

        tab = QAction('Search Nodes', self)
        tab.setShortcut(tab_search_key)
        tab.triggered.connect(self._toggle_tab_search)
        self._viewer.addAction(tab)

        self._wire_signals()
Exemplo n.º 3
0
    def __init__(self, parent=None):
        super(NodeGraph, self).__init__(parent)
        self.setObjectName('NodeGraphQt')
        self._model = NodeGraphModel()
        self._viewer = NodeViewer(parent)
        self._node_factory = NodeFactory()
        self._undo_stack = QtWidgets.QUndoStack(self)

        tab = QtWidgets.QAction('Search Nodes', self)
        tab.setShortcut('tab')
        tab.triggered.connect(self._toggle_tab_search)
        self._viewer.addAction(tab)

        self._wire_signals()
Exemplo n.º 4
0
    def __init__(self, parent=None):
        super(NodeGraph, self).__init__(parent)
        self.setObjectName('NodeGraphQt')
        self._widget = None
        self._model = NodeGraphModel()
        self._viewer = NodeViewer()
        self._node_factory = NodeFactory()
        self._undo_stack = QtWidgets.QUndoStack(self)

        tab = QtWidgets.QShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Tab), self._viewer)
        tab.activated.connect(self._toggle_tab_search)
        self._viewer.need_show_tab_search.connect(self._toggle_tab_search)

        self._wire_signals()
        self.widget.setAcceptDrops(True)