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

import CatalogAPI as CatalogAPI
import CatalogWidget as CatalogWidget
import NodegraphAPI as NodegraphAPI
import PyQt5.QtCore
import PyQt5.QtWidgets
import PyQt5.QtCore as QtCore
import PyQt5.QtGui as QtGui
import PyQt5.QtWidgets as QtWidgets
import UI4 as UI4
import Utils as Utils
import collections
import enum
from CatalogAPI.CatalogItem import QueueCatalogItemPropertyUpdate as QueueCatalogItemPropertyUpdate
from QT4Widgets.SortableTreeWidget import SortableTreeWidget as SortableTreeWidget
from UI4.Tabs.Catalog.CatalogWidget.CatalogWidget import kColumnTypes
from UI4.Tabs.Catalog.CatalogWidgetItem import CatalogSlotParentItem as CatalogSlotParentItem, CatalogWidgetItem as CatalogWidgetItem, CatalogWidgetItemDelegate as CatalogWidgetItemDelegate, GetColumnID as GetColumnID, GetColumnKeyName as GetColumnKeyName, GetColumnName as GetColumnName, GetDefaultColumnWidth as GetDefaultColumnWidth
from UI4.Util.CatalogEventHandlers import RegenerateThumbnail as RegenerateThumbnail
from UI4.Util.Events import debounce as debounce
from Utils.Decorators import deprecated as deprecated
from typing import ClassVar, Set, Tuple

class CatalogWidget(SortableTreeWidget):
    class kColumnTypes(enum.Enum):
        Default: ClassVar[kColumnTypes] = ...
        GSV: ClassVar[kColumnTypes] = ...
        IRF: ClassVar[kColumnTypes] = ...
        _member_map_: ClassVar[collections.OrderedDict] = ...
        _member_names_: ClassVar[list] = ...
        _member_type_: ClassVar[type[object]] = ...
        _value2member_map_: ClassVar[dict] = ...
        @classmethod
        def __init__(cls, value) -> None: ...
        def _generate_next_value_(self, name, start, count, last_values): ...
    LIST_ALL: ClassVar[int] = ...
    LIST_LOCKED: ClassVar[int] = ...
    LIST_SELECTED: ClassVar[int] = ...
    LIST_UNLOCKED: ClassVar[int] = ...
    _CatalogWidget__headerState: ClassVar[None] = ...
    _kDefaultColumnWidthForDynamicColumns: ClassVar[int] = ...
    _kDynamicColumnTooltip: ClassVar[dict] = ...
    _kHeaderTooltips: ClassVar[dict] = ...
    _kHideableHeaderTooltip: ClassVar[str] = ...
    _kMoveableHeaderTooltip: ClassVar[str] = ...
    kColumnTypeRole: ClassVar[PyQt5.QtCore.Qt.ItemDataRole] = ...
    def __init__(self, *args) -> None: ...
    def _CatalogWidget__aboutToDrag(self, dragItems, dragObject): ...
    def _CatalogWidget__areTopLevelItemsReadyForSlotMode(self): ...
    def _CatalogWidget__areTopLevelItemsReadyForTimeMode(self): ...
    def _CatalogWidget__catalog_clientSlotUpdate_CB(self, *args, **kwargs): ...
    def _CatalogWidget__catalog_itemCreate_CB(self, eventType, index, item, **kwargs): ...
    def _CatalogWidget__catalog_itemDelete_CB(self, args): ...
    def _CatalogWidget__catalog_itemPropertyUpdate_CB(self, eventType, index, item, **kwargs): ...
    def _CatalogWidget__catalog_itemSlotUpdate_CB(self, eventType, index, item, **kwargs): ...
    def _CatalogWidget__catalog_itemUserCommentUpdate_CB(self, eventType, index, item, **kwargs): ...
    def _CatalogWidget__catalog_itemsReordered_CB(self, args): ...
    def _CatalogWidget__catalog_rebuild_CB(self, args): ...
    def _CatalogWidget__columnMovedCB(self, section, fromIndex, toIndex): ...
    def _CatalogWidget__dragMoveEvent(self, event, parent, index, callbackRecord): ...
    def _CatalogWidget__dropEvent(self, event, parent, index): ...
    def _CatalogWidget__findListViewItemFromCatalogItem(self, catalogItem): ...
    def _CatalogWidget__getSlotItem(self, index): ...
    def _CatalogWidget__headerSignalBlocker(self, *args, **kwds): ...
    def _CatalogWidget__keypressCallback(self, event): ...
    def _CatalogWidget__mousePressEvent_CB(self, event): ...
    def _CatalogWidget__onProjectSettingsChange(self, eventData: list[tuple[str, object, dict]]): ...
    def _CatalogWidget__regenerateThumbnails(self, *args, **kwargs): ...
    def _CatalogWidget__saveProjectSettingsDebounced(self, *args, **kwargs): ...
    def _CatalogWidget__sectionResized_CB(self, column, oldSize, newSize): ...
    def _CatalogWidget__setHeaderTooltips(self): ...
    def _CatalogWidget__updateThumbnailPixmaps(self, width: int): ...
    def _CatalogWidget__updateThumbnailWidth(self): ...
    def addDynamicColumn(self, columnName: str, columnType: CatalogWidget.kColumnTypes): ...
    def applyColumnHiddenSettings(self, columnsHidden: dict[str, bool]): ...
    def applyColumnOrderSettings(self, columnOrder: dict[str, int]): ...
    def applyColumnWidthsSettings(self, columnWidths: dict[str, int]): ...
    def applyProjectSettings(self): ...
    def deleteItems(self, selectionMask): ...
    def drawBranches(self, painter, rect, index): ...
    def getColumnHiddenSettings(self) -> dict[str, bool]: ...
    def getColumnOrderSettings(self) -> dict[str, int]: ...
    def getColumnWidthsSettings(self) -> dict[str, int]: ...
    def getItems(self, selectionMask): ...
    def getMonitorSwipeMode(self): ...
    def getSmallFont(self): ...
    def rebuild(self): ...
    def restoreState(self): ...
    def saveProjectSettings(self): ...
    def saveState(self): ...

class _CatalogThumbnailWidthRequester(PyQt5.QtCore.QObject):
    _CatalogThumbnailWidthRequester__instance: ClassVar[None] = ...
    thumbnailSizeReset: ClassVar[PyQt5.QtCore.pyqtSignal] = ...
    def __init__(self) -> None: ...
    @classmethod
    def instance(cls): ...
    def requestWidth(self, width: int): ...
    def resetWidth(self): ...

class _HeaderContextMenu(_NonAutomaticallyDissmisableMenu):
    def __init__(self, parent: CatalogWidget) -> None: ...
    def _HeaderContextMenu__onChecked(self): ...
    def open(self, point: PyQt5.QtCore.QPoint): ...

class _HeaderGSVMenu(_HeaderSubMenuBase):
    _kColumnType: ClassVar[kColumnTypes] = ...
    _kCombinedColumnIdx: ClassVar[int] = ...
    def __init__(self, parent) -> None: ...
    def _getColumnNamesFromSnapshot(self, snapshot: ProjectSnapshot) -> list[str]: ...

class _HeaderIRFMenu(_HeaderSubMenuBase):
    _kColumnType: ClassVar[kColumnTypes] = ...
    _kCombinedColumnIdx: ClassVar[int] = ...
    def __init__(self, parent) -> None: ...
    def _getColumnNamesFromSnapshot(self, snapshot: ProjectSnapshot) -> list[str]: ...

class _HeaderSubMenuBase(_NonAutomaticallyDissmisableMenu):
    _kColumnType: ClassVar[NotImplementedType] = ...
    _kCombinedColumnIdx: ClassVar[NotImplementedType] = ...
    def __init__(self, parent: _HeaderContextMenu) -> None: ...
    def _HeaderSubMenuBase__createAddColumnAction(self, label: str) -> PyQt5.QtWidgets.QAction: ...
    def _HeaderSubMenuBase__createCheckboxAction(self, label: str) -> PyQt5.QtWidgets.QAction: ...
    def _HeaderSubMenuBase__createExistingColumnAction(self, label: str, logicalIdx: int) -> PyQt5.QtWidgets.QAction: ...
    @classmethod
    def _HeaderSubMenuBase__createNew(cls, parent): ...
    def _HeaderSubMenuBase__onAddNew(self): ...
    def _HeaderSubMenuBase__onToggleExisting(self): ...
    def _getColumnNamesFromSnapshot(self, snapshot: ProjectSnapshot): ...

class _NonAutomaticallyDissmisableMenu(PyQt5.QtWidgets.QMenu):
    def event(self, event: PyQt5.QtCore.QEvent) -> bool: ...
