Rename AbstractStacksModel.py -> MachineListModel.py since this model includes both abstract machine stacks and regular machines

Add machineCount for displaying the number of machines of a type.

MachineSelectorButton is in use in other places, swapped it out for a new Component MachineListButton.

CURA-9514
This commit is contained in:
joeydelarago 2022-08-23 14:29:05 +02:00
parent bedb76d516
commit b18080c332
6 changed files with 104 additions and 11 deletions

View file

@ -115,7 +115,7 @@ from . import CuraActions
from . import PlatformPhysics
from . import PrintJobPreviewImageProvider
from .AutoSave import AutoSave
from .Machines.Models.AbstractStacksModel import AbstractStacksModel
from .Machines.Models.MachineListModel import MachineListModel
from .Machines.Models.ActiveIntentQualitiesModel import ActiveIntentQualitiesModel
from .Machines.Models.IntentSelectionModel import IntentSelectionModel
from .SingleInstance import SingleInstance
@ -1195,7 +1195,7 @@ class CuraApplication(QtApplication):
qmlRegisterType(InstanceContainer, "Cura", 1, 0, "InstanceContainer")
qmlRegisterType(ExtrudersModel, "Cura", 1, 0, "ExtrudersModel")
qmlRegisterType(GlobalStacksModel, "Cura", 1, 0, "GlobalStacksModel")
qmlRegisterType(AbstractStacksModel, "Cura", 1, 0, "AbstractStacksModel")
qmlRegisterType(MachineListModel, "Cura", 1, 0, "MachineListModel")
self.processEvents()
qmlRegisterType(FavoriteMaterialsModel, "Cura", 1, 0, "FavoriteMaterialsModel")