Rename printersModel to GlobalStacksModel

This is a better description for the model anyway.

CURA-6011
This commit is contained in:
Jaime van Kessel 2018-12-31 11:09:39 +01:00
parent a16e406507
commit fd9b29fee2
5 changed files with 7 additions and 6 deletions

View file

@ -51,7 +51,7 @@ from cura.Arranging.ArrangeObjectsJob import ArrangeObjectsJob
from cura.Arranging.ArrangeObjectsAllBuildPlatesJob import ArrangeObjectsAllBuildPlatesJob
from cura.Arranging.ShapeArray import ShapeArray
from cura.MultiplyObjectsJob import MultiplyObjectsJob
from cura.PrintersModel import PrintersModel
from cura.GlobalStacksModel import GlobalStacksModel
from cura.Scene.ConvexHullDecorator import ConvexHullDecorator
from cura.Operations.SetParentOperation import SetParentOperation
from cura.Scene.SliceableObjectDecorator import SliceableObjectDecorator
@ -971,7 +971,7 @@ class CuraApplication(QtApplication):
qmlRegisterType(MultiBuildPlateModel, "Cura", 1, 0, "MultiBuildPlateModel")
qmlRegisterType(InstanceContainer, "Cura", 1, 0, "InstanceContainer")
qmlRegisterType(ExtrudersModel, "Cura", 1, 0, "ExtrudersModel")
qmlRegisterType(PrintersModel, "Cura", 1, 0, "PrintersModel")
qmlRegisterType(GlobalStacksModel, "Cura", 1, 0, "GlobalStacksModel")
qmlRegisterType(FavoriteMaterialsModel, "Cura", 1, 0, "FavoriteMaterialsModel")
qmlRegisterType(GenericMaterialsModel, "Cura", 1, 0, "GenericMaterialsModel")

View file

@ -12,7 +12,8 @@ from cura.PrinterOutputDevice import ConnectionType
from cura.Settings.GlobalStack import GlobalStack
class PrintersModel(ListModel):
class GlobalStacksModel(ListModel):
NameRole = Qt.UserRole + 1
IdRole = Qt.UserRole + 2
HasRemoteConnectionRole = Qt.UserRole + 3

View file

@ -9,7 +9,7 @@ import Cura 1.0 as Cura
Instantiator
{
model: Cura.PrintersModel {}
model: Cura.GlobalStacksModel {}
MenuItem
{

View file

@ -9,7 +9,7 @@ import Cura 1.0 as Cura
Instantiator
{
model: Cura.PrintersModel {}
model: Cura.GlobalStacksModel {}
MenuItem
{
text: model.metadata["connect_group_name"]

View file

@ -11,7 +11,7 @@ ListView
{
id: listView
height: childrenRect.height
model: Cura.PrintersModel {}
model: Cura.GlobalStacksModel {}
section.property: "hasRemoteConnection"
section.delegate: Label