CURA-4870 Add information about the buildplate in the printer output

model so it can be used to show the buildplate name in the configuration
list.
This commit is contained in:
Diego Prado Gesto 2018-03-07 13:57:13 +01:00
parent 0beee79c3a
commit 97740123fa
5 changed files with 44 additions and 20 deletions

View file

@ -41,11 +41,13 @@ class ConfigurationModel(QObject):
return self._buildplate_configuration
def __str__(self):
info = "Printer type: " + self.printerType + "\n"
info = "Printer type: " + self._printer_type + "\n"
info += "Extruders: [\n"
for configuration in self.extruderConfigurations:
for configuration in self._extruder_configurations:
info += " " + str(configuration) + "\n"
info += "]"
if self._buildplate_configuration is not None:
info += "\nBuildplate: " + self._buildplate_configuration
return info
def __eq__(self, other):
@ -54,7 +56,7 @@ class ConfigurationModel(QObject):
def __hash__(self):
extruder_hash = hash(0)
first_extruder = None
for configuration in self.extruderConfigurations:
for configuration in self._extruder_configurations:
extruder_hash ^= hash(configuration)
if configuration.position == 0:
first_extruder = configuration