Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cura/UI
diff options
context:
space:
mode:
authorJaime van Kessel <nallath@gmail.com>2021-12-01 12:18:04 +0300
committerJaime van Kessel <nallath@gmail.com>2021-12-01 12:18:04 +0300
commita057cbe481eb4363edce0bc9b91b5a1a13c0b393 (patch)
treeef506e312f76d8c5a26005d7ff0b6fe39f7e3533 /cura/UI
parent26d6a02c32506869a7c46794ce6f26b2a8c0957f (diff)
Minor codestyle cleanup
Boyscouting CURA-8696
Diffstat (limited to 'cura/UI')
-rw-r--r--cura/UI/WhatsNewPagesModel.py16
1 files changed, 10 insertions, 6 deletions
diff --git a/cura/UI/WhatsNewPagesModel.py b/cura/UI/WhatsNewPagesModel.py
index 11320a0ebb..1627f3e3ce 100644
--- a/cura/UI/WhatsNewPagesModel.py
+++ b/cura/UI/WhatsNewPagesModel.py
@@ -1,18 +1,22 @@
# Copyright (c) 2021 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
-from .WelcomePagesModel import WelcomePagesModel
import os
from typing import Optional, Dict, List, Tuple
+
from PyQt5.QtCore import pyqtProperty, pyqtSlot
+
from UM.Logger import Logger
from UM.Resources import Resources
-#
-# This Qt ListModel is more or less the same the WelcomePagesModel, except that this model is only for showing the
-# "what's new" page. This is also used in the "Help" menu to show the changes log.
-#
+from cura.UI.WelcomePagesModel import WelcomePagesModel
+
+
class WhatsNewPagesModel(WelcomePagesModel):
+ """
+ This Qt ListModel is more or less the same the WelcomePagesModel, except that this model is only for showing the
+ "what's new" page. This is also used in the "Help" menu to show the changes log.
+ """
image_formats = [".png", ".jpg", ".jpeg", ".gif", ".svg"]
text_formats = [".txt", ".htm", ".html"]
@@ -21,7 +25,7 @@ class WhatsNewPagesModel(WelcomePagesModel):
@staticmethod
def _collectOrdinalFiles(resource_type: int, include: List[str]) -> Tuple[Dict[int, str], int]:
- result = {} #type: Dict[int, str]
+ result = {} # type: Dict[int, str]
highest = -1
try:
folder_path = Resources.getPath(resource_type, "whats_new")