WhatsNewPagesModel.py 952 B

123456789101112131415161718192021222324
  1. # Copyright (c) 2021 Ultimaker B.V.
  2. # Cura is released under the terms of the LGPLv3 or higher.
  3. from .WelcomePagesModel import WelcomePagesModel
  4. class WhatsNewPagesModel(WelcomePagesModel):
  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. def __init__(self, application: "CuraApplication") -> None:
  9. super(WhatsNewPagesModel, self).__init__(application = application)
  10. def initialize(self) -> None:
  11. self._pages = []
  12. self._pages.append({"id": "whats_new",
  13. "page_url": self._getBuiltinWelcomePagePath("WhatsNewContent.qml"),
  14. "next_page_button_text": self._catalog.i18nc("@action:button", "Close"),
  15. })
  16. self.setItems(self._pages)
  17. __all__ = ["WhatsNewPagesModel"]