WhatsNewPagesModel.py 800 B

12345678910111213141516171819202122
  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 showing the
  6. # "what's new" page. This is also used in the "Help" menu to show the changes log.
  7. #
  8. class WhatsNewPagesModel(WelcomePagesModel):
  9. def initialize(self) -> None:
  10. self._pages = []
  11. self._pages.append({"id": "whats_new",
  12. "page_url": self._getBuiltinWelcomePagePath("WhatsNewContent.qml"),
  13. "next_page_button_text": self._catalog.i18nc("@action:button", "Close"),
  14. })
  15. self.setItems(self._pages)
  16. __all__ = ["WhatsNewPagesModel"]