selected printer is active printer in UCP

CURA-11403
This commit is contained in:
Saumya Jain 2024-03-04 16:47:09 +01:00
parent f19320cad8
commit c879809836
4 changed files with 44 additions and 19 deletions

View file

@ -5,7 +5,7 @@
# online cloud connected printers are represented within this ListModel. Additional information such as the number of
# connected printers for each printer type is gathered.
from typing import Optional, List, cast
from typing import Optional, List, cast, Dict, Any
from PyQt6.QtCore import Qt, QTimer, QObject, pyqtSlot, pyqtProperty, pyqtSignal
@ -159,3 +159,8 @@ class MachineListModel(ListModel):
"machineCount": machine_count,
"catergory": "connected" if is_online else "other",
})
def getItems(self) -> Dict[str, Any]:
if self.count > 0:
return self.items
return {}