AddPrinterPagesModel.py 1.5 KB

12345678910111213141516171819202122232425262728293031
  1. # Copyright (c) 2019 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from .WelcomePagesModel import WelcomePagesModel
  4. #
  5. # This Qt ListModel is more or less the same the WelcomePagesModel, except that this model is only for adding a printer,
  6. # so only the steps for adding a printer is included.
  7. #
  8. class AddPrinterPagesModel(WelcomePagesModel):
  9. def initialize(self) -> None:
  10. self._pages.append({"id": "add_network_or_local_printer",
  11. "page_url": self._getBuiltinWelcomePagePath("AddNetworkOrLocalPrinterContent.qml"),
  12. "next_page_id": "machine_actions",
  13. "next_page_button_text": self._catalog.i18nc("@action:button", "Add"),
  14. "previous_page_button_text": self._catalog.i18nc("@action:button", "Cancel"),
  15. })
  16. self._pages.append({"id": "add_printer_by_ip",
  17. "page_url": self._getBuiltinWelcomePagePath("AddPrinterByIpContent.qml"),
  18. "next_page_id": "machine_actions",
  19. })
  20. self._pages.append({"id": "machine_actions",
  21. "page_url": self._getBuiltinWelcomePagePath("FirstStartMachineActionsContent.qml"),
  22. "should_show_function": self.shouldShowMachineActions,
  23. })
  24. self.setItems(self._pages)
  25. __all__ = ["AddPrinterPagesModel"]