diff --git a/plugins/ChangeLogPlugin/ChangeLog.py b/plugins/ChangeLogPlugin/ChangeLog.py new file mode 100644 index 0000000000..095f8a5647 --- /dev/null +++ b/plugins/ChangeLogPlugin/ChangeLog.py @@ -0,0 +1,98 @@ +# Copyright (c) 2015 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. + +from UM.i18n import i18nCatalog +from UM.Extension import Extension +from UM.Preferences import Preferences +from UM.Application import Application +from UM.PluginRegistry import PluginRegistry +from UM.Version import Version + +from PyQt5.QtQuick import QQuickView +from PyQt5.QtQml import QQmlComponent, QQmlContext +from PyQt5.QtCore import QUrl, pyqtSlot, QObject + +import os.path + +catalog = i18nCatalog("cura") + +class ChangeLog(Extension, QObject,): + def __init__(self, parent = None): + QObject.__init__(self, parent) + Extension.__init__(self) + self._changelog_window = None + self._changelog_context = None + version_string = Application.getInstance().getVersion() + if version_string is not "master": + self._version = Version(version_string) + else: + self._version = None + self._change_logs = None + Application.getInstance().engineCreatedSignal.connect(self._onEngineCreated) + Preferences.getInstance().addPreference("general/latest_version_changelog_shown", "15.05.90") #First version of CURA with uranium + #self.showChangelog() + + def getChangeLogs(self): + if not self._change_logs: + self.loadChangeLogs() + return self._change_logs + + @pyqtSlot(result = str) + def getChangeLogString(self): + logs = self.getChangeLogs() + latest_version = Version(Preferences.getInstance().getValue("general/latest_version_changelog_shown")) + result = "" + for version in logs: + result += "

" + str(version) + "


" + result += "" + for change in logs[version]: + result += "" + str(change) + "
" + for line in logs[version][change]: + result += str(line) + "
" + result += "
" + + pass + return result + + def loadChangeLogs(self): + self._change_logs = {} + with open(os.path.join(PluginRegistry.getInstance().getPluginPath("ChangeLogPlugin"), "ChangeLog.txt"), 'r') as f: + open_version = None + open_header = None + for line in f: + line = line.replace("\n","") + if "[" in line and "]" in line: + line = line.replace("[","") + line = line.replace("]","") + open_version = Version(line) + self._change_logs[Version(line)] = {} + elif line.startswith("*"): + open_header = line.replace("*","") + self._change_logs[open_version][open_header] = [] + else: + if line != "": + self._change_logs[open_version][open_header].append(line) + + def _onEngineCreated(self): + if not self._version: + return #We're on dev branch. + if self._version > Preferences.getInstance().getValue("general/latest_version_changelog_shown"): + self.showChangelog() + + def showChangelog(self): + if not self._changelog_window: + self.createChangelogWindow() + self._changelog_window.show() + Preferences.getInstance().setValue("general/latest_version_changelog_shown", Application.getInstance().getVersion()) + + def hideChangelog(self): + if self._changelog_window: + self._changelog_window.hide() + + def createChangelogWindow(self): + path = QUrl.fromLocalFile(os.path.join(PluginRegistry.getInstance().getPluginPath("ChangeLogPlugin"), "ChangeLog.qml")) + component = QQmlComponent(Application.getInstance()._engine, path) + self._changelog_context = QQmlContext(Application.getInstance()._engine.rootContext()) + self._changelog_context.setContextProperty("manager", self) + self._changelog_window = component.create(self._changelog_context) + #print(self._changelog_window) diff --git a/plugins/ChangeLogPlugin/ChangeLog.qml b/plugins/ChangeLogPlugin/ChangeLog.qml new file mode 100644 index 0000000000..61400f3d07 --- /dev/null +++ b/plugins/ChangeLogPlugin/ChangeLog.qml @@ -0,0 +1,28 @@ +// Copyright (c) 2015 Ultimaker B.V. +// Cura is released under the terms of the AGPLv3 or higher. + +import QtQuick 2.1 +import QtQuick.Controls 1.1 +import QtQuick.Layouts 1.1 +import QtQuick.Window 2.1 + +import UM 1.1 as UM + +UM.Dialog +{ + id: base + width: 300 * Screen.devicePixelRatio; + height: 500 * Screen.devicePixelRatio; + title: "Changelog" + ScrollView + { + anchors.fill:parent + Text + { + text: manager.getChangeLogString() + width:base.width - 35 + wrapMode: Text.Wrap; + //Component.onCompleted: console.log() + } + } +} diff --git a/plugins/ChangeLogPlugin/ChangeLog.txt b/plugins/ChangeLogPlugin/ChangeLog.txt new file mode 100644 index 0000000000..c263b4f112 --- /dev/null +++ b/plugins/ChangeLogPlugin/ChangeLog.txt @@ -0,0 +1,41 @@ +[15.10.0] +*All at Once/One at a Time +Cura’s default mode is set to All At Once. You can print multiple objects faster with the option print objects One At A Time. This can be changed in Advanced Settings. Please note that in One At A Time mode, grouped objects will still be printed as a single object. + +*Setting Profiles +Now you can create preferred setting favourites and share them with others. + + +*Post-Processing Plugin +This plugin supports post-processing on the GCode generated by the engine – allowing for custom scripts. For example, Pause At Height and Tweak At Z. + +*Support for Bed Levelling and other wizards +We have restored the Bed Levelling function and several other wizards that were previously available for the Ultimaker Original. Additionally, these are ready to be used with machines from other vendors (BQ, Rep Rap neo). + +*Third-Party Printer Profiles +We received printer profiles for third-party vendors (BQ, Rep Rap neo) from the community (thanks guys!). These have been included in this release. + + +*3MF File Loading Support (New) +We’re happy to report we now support loading 3MF files. This is a new file format similar to AMF, but freely available. + +*Output Device API for Developers (New) +The Storage Device API has now been replaced with the Output Device API for saving files. It’s designed to make it easier for anyone that wants to write a plugin giving them some form of output device, whether it’s a printer or a web service. + +*Improved Cut-Off Object Bottom (New) +We’ve added a feature than allows you to move objects below the build plate. You can either correct a model with a rough bottom, or print only a part of an object. Please note that the implementation greatly differs from the old one where it was a setting. + +*Improved File Saving (new) +We’re happy to report that the way file saving is handled has received a huge overhaul. Now the default action is to save everything on the build plate to a file. + +*Select Multiple Objects (New) +You now have the freedom to select and manipulate multiple objects at the same time. + +*Grouping (New) +You can now group objects together to make it easier to manipulate multiple objects. + +*Per-Object Settings (New) +You can now select different profiles for different objects and in advance mode override individual settings. + +*64-bit Windows Builds (New) +Cura now allows 64-bit Windows builds in addition to the 32-bit builds. For users running the 64-bit version of Windows, you can now load models in more detail. \ No newline at end of file diff --git a/plugins/ChangeLogPlugin/__init__.py b/plugins/ChangeLogPlugin/__init__.py new file mode 100644 index 0000000000..8f8235bf23 --- /dev/null +++ b/plugins/ChangeLogPlugin/__init__.py @@ -0,0 +1,21 @@ +# Copyright (c) 2015 Ultimaker B.V. +# Cura is released under the terms of the AGPLv3 or higher. +from UM.i18n import i18nCatalog + +from . import ChangeLog + +catalog = i18nCatalog("cura") + +def getMetaData(): + return { + "plugin": { + "name": "Change log", + "author": "Ultimaker", + "version": "1.0", + "description": catalog.i18nc("Change log plugin description", "Shows changes since latest checked version"), + "api": 2 + } + } + +def register(app): + return {"extension": ChangeLog.ChangeLog()} \ No newline at end of file