mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 17:27:51 -06:00
Added typing
CURA-5595
This commit is contained in:
parent
40c51249f5
commit
bf219c3821
1 changed files with 7 additions and 1 deletions
|
@ -1,6 +1,12 @@
|
||||||
|
# Copyright (c) 2018 Ultimaker B.V.
|
||||||
|
# Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
from UM.Qt.ListModel import ListModel
|
from UM.Qt.ListModel import ListModel
|
||||||
from PyQt5.QtCore import pyqtSlot, Qt
|
from PyQt5.QtCore import pyqtSlot, Qt
|
||||||
|
|
||||||
|
|
||||||
class SidebarCustomMenuItemsModel(ListModel):
|
class SidebarCustomMenuItemsModel(ListModel):
|
||||||
NameRole = Qt.UserRole + 1
|
NameRole = Qt.UserRole + 1
|
||||||
ActionsRole = Qt.UserRole + 2
|
ActionsRole = Qt.UserRole + 2
|
||||||
|
@ -27,7 +33,7 @@ class SidebarCustomMenuItemsModel(ListModel):
|
||||||
})
|
})
|
||||||
|
|
||||||
@pyqtSlot(str, "QVariantList", "QVariantMap")
|
@pyqtSlot(str, "QVariantList", "QVariantMap")
|
||||||
def callMenuItemMethod(self, menu_item_name: str, menu_item_actions: list, kwargs)-> None:
|
def callMenuItemMethod(self, menu_item_name: str, menu_item_actions: list, kwargs: Any)-> None:
|
||||||
for item in self._items:
|
for item in self._items:
|
||||||
if menu_item_name == item["name"]:
|
if menu_item_name == item["name"]:
|
||||||
for method in menu_item_actions:
|
for method in menu_item_actions:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue