# mypy: disable-error-code="misc, override, attr-defined, no-redef, assignment"

import DrawingModule as DrawingModule
import KatanaResources as KatanaResources
import NodegraphAPI as NodegraphAPI
import UI4.KatanaPrefs.PrefNames as PrefNames
import QT4Widgets as QT4Widgets
import PyQt5.QtCore as QtCore
import PyQt5.QtGui as QtGui
import PyQt5.QtWidgets as QtWidgets
import Utils as Utils
from UI4.KatanaPrefs.KatanaPrefsObject import KatanaPrefs as KatanaPrefs
from UI4.Tabs.NodeGraphTab.Layers.TransientLayer import TransientLayer as TransientLayer
from _typeshed import Incomplete
from typing import ClassVar, Set, Tuple

class LinkConnectionLayer(TransientLayer):
    _LinkConnectionLayer__pixmaps: ClassVar[dict] = ...
    def __init__(self, basePorts, savedLinks, disableScenegraphUpdates: bool = ..., *args, **kwargs) -> None: ...
    def _LinkConnectionLayer__connectLinks(self, targetPort): ...
    def _LinkConnectionLayer__create_dot_node(self): ...
    def _LinkConnectionLayer__dropLinks(self): ...
    def _LinkConnectionLayer__exitNoChange(self): ...
    def _LinkConnectionLayer__getConsumerHitPort(self, node: NodegraphAPI.Node, basePorts): ...
    def _LinkConnectionLayer__getHitPort(self, node: NodegraphAPI.Node, currentPort): ...
    def _LinkConnectionLayer__getPortDescription(self, port: NodegraphAPI.Port, isSendOrReturnPort: Incomplete | None = ...) -> PortDescription: ...
    def _LinkConnectionLayer__isConnectionViable(self, portA: NodegraphAPI.Port | None, portB: NodegraphAPI.Port | None) -> bool: ...
    def _LinkConnectionLayer__isSendOrReturnPort(self, port: NodegraphAPI.Port) -> bool: ...
    def _LinkConnectionLayer__multiOutPopupCallback(self, port: NodegraphAPI.Port): ...
    def _LinkConnectionLayer__nodeDeleteHandler(self, eventType, eventID, node: NodegraphAPI.Node, *args, **kwargs): ...
    def _LinkConnectionLayer__processKeyPress(self, event): ...
    def _LinkConnectionLayer__processMouseMove(self, event): ...
    def _LinkConnectionLayer__processMousePress(self, event): ...
    def getBasePorts(self) -> list[NodegraphAPI.Port]: ...
    def paintGL(self): ...
    def processEvent(self, event): ...
    def processMousePress(self, event): ...
    def __del__(self) -> None: ...

class PortDescription(tuple):
    _field_defaults: ClassVar[dict] = ...
    _fields: ClassVar[tuple] = ...
    _fields_defaults: ClassVar[dict] = ...
    def __init__(self, _cls, node: NodegraphAPI.Node, type, name, isSendOrReturnPort) -> None: ...
    def _asdict(self): ...
    @classmethod
    def _make(cls, iterable): ...
    def _replace(self, _self, **kwds): ...
    def __getnewargs__(self): ...
    @property
    def isSendOrReturnPort(self): ...
    @property
    def name(self): ...
    @property
    def node(self): ...
    @property
    def type(self): ...
