mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-30 01:55:55 +08:00
Merge pull request #4690 from Ultimaker/rename_ToolBox_to_Marketplace
Rename user visible entries of ToolBox to Marketplace
This commit is contained in:
commit
d5806d145d
@ -26,8 +26,11 @@ Fullscreen mode can be toggled using the View menu or with the keyboard shortcut
|
|||||||
*Configuration error message
|
*Configuration error message
|
||||||
In previous versions, Ultimaker Cura would display an error dialog explaining when something happened to user configuration files, including the option to reset to factory defaults. This would not warn about losing the current printer and print profile settings, so this information has been added.
|
In previous versions, Ultimaker Cura would display an error dialog explaining when something happened to user configuration files, including the option to reset to factory defaults. This would not warn about losing the current printer and print profile settings, so this information has been added.
|
||||||
|
|
||||||
*Materials in the Toolbox
|
*Rename Toolbox to Marketplace
|
||||||
A new tab has been added to the Toolbox that includes downloadable material profiles, to quickly and easily prepare models for a range of third-party materials.
|
The entry points to the Toolbox are now renamed to Marketplace.
|
||||||
|
|
||||||
|
*Materials in the Marketplace
|
||||||
|
A new tab has been added to the Marketplace that includes downloadable material profiles, to quickly and easily prepare models for a range of third-party materials.
|
||||||
|
|
||||||
*New third-party definitions
|
*New third-party definitions
|
||||||
New profiles added for Anycube 4MAx and Tizyx K25. Contributed by jscurtu and ValentinPitre respectively.
|
New profiles added for Anycube 4MAx and Tizyx K25. Contributed by jscurtu and ValentinPitre respectively.
|
||||||
|
@ -10,7 +10,7 @@ Window
|
|||||||
{
|
{
|
||||||
id: base
|
id: base
|
||||||
property var selection: null
|
property var selection: null
|
||||||
title: catalog.i18nc("@title", "Toolbox")
|
title: catalog.i18nc("@title", "Marketplace")
|
||||||
modality: Qt.ApplicationModal
|
modality: Qt.ApplicationModal
|
||||||
flags: Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint
|
flags: Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
// Copyright (c) 2018 Ultimaker B.V.
|
// Copyright (c) 2018 Ultimaker B.V.
|
||||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
// Cura is released under the terms of the LGPLv3 or higher.
|
||||||
|
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 1.4
|
import QtQuick.Controls 1.4
|
||||||
|
@ -52,7 +52,7 @@ class PackagesModel(ListModel):
|
|||||||
items = []
|
items = []
|
||||||
|
|
||||||
if self._metadata is None:
|
if self._metadata is None:
|
||||||
Logger.logException("w", "Failed to load packages for Toolbox")
|
Logger.logException("w", "Failed to load packages for Marketplace")
|
||||||
self.setItems(items)
|
self.setItems(items)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ class Toolbox(QObject, Extension):
|
|||||||
self._dialog = self._createDialog("Toolbox.qml")
|
self._dialog = self._createDialog("Toolbox.qml")
|
||||||
|
|
||||||
if not self._dialog:
|
if not self._dialog:
|
||||||
Logger.log("e", "Unexpected error trying to create the 'Toolbox' dialog.")
|
Logger.log("e", "Unexpected error trying to create the 'Marketplace' dialog.")
|
||||||
return
|
return
|
||||||
|
|
||||||
self._dialog.show()
|
self._dialog.show()
|
||||||
@ -254,7 +254,7 @@ class Toolbox(QObject, Extension):
|
|||||||
self.enabledChanged.emit()
|
self.enabledChanged.emit()
|
||||||
|
|
||||||
def _createDialog(self, qml_name: str) -> Optional[QObject]:
|
def _createDialog(self, qml_name: str) -> Optional[QObject]:
|
||||||
Logger.log("d", "Toolbox: Creating dialog [%s].", qml_name)
|
Logger.log("d", "Marketplace: Creating dialog [%s].", qml_name)
|
||||||
plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId())
|
plugin_path = PluginRegistry.getInstance().getPluginPath(self.getPluginId())
|
||||||
if not plugin_path:
|
if not plugin_path:
|
||||||
return None
|
return None
|
||||||
@ -262,7 +262,7 @@ class Toolbox(QObject, Extension):
|
|||||||
|
|
||||||
dialog = self._application.createQmlComponent(path, {"toolbox": self})
|
dialog = self._application.createQmlComponent(path, {"toolbox": self})
|
||||||
if not dialog:
|
if not dialog:
|
||||||
raise Exception("Failed to create toolbox dialog")
|
raise Exception("Failed to create Marketplace dialog")
|
||||||
return dialog
|
return dialog
|
||||||
|
|
||||||
def _convertPluginMetadata(self, plugin: Dict[str, Any]) -> Dict[str, Any]:
|
def _convertPluginMetadata(self, plugin: Dict[str, Any]) -> Dict[str, Any]:
|
||||||
@ -578,7 +578,7 @@ class Toolbox(QObject, Extension):
|
|||||||
# Make API Calls
|
# Make API Calls
|
||||||
# --------------------------------------------------------------------------
|
# --------------------------------------------------------------------------
|
||||||
def _makeRequestByType(self, type: str) -> None:
|
def _makeRequestByType(self, type: str) -> None:
|
||||||
Logger.log("i", "Toolbox: Requesting %s metadata from server.", type)
|
Logger.log("i", "Marketplace: Requesting %s metadata from server.", type)
|
||||||
request = QNetworkRequest(self._request_urls[type])
|
request = QNetworkRequest(self._request_urls[type])
|
||||||
request.setRawHeader(*self._request_header)
|
request.setRawHeader(*self._request_header)
|
||||||
if self._network_manager:
|
if self._network_manager:
|
||||||
@ -586,7 +586,7 @@ class Toolbox(QObject, Extension):
|
|||||||
|
|
||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def startDownload(self, url: str) -> None:
|
def startDownload(self, url: str) -> None:
|
||||||
Logger.log("i", "Toolbox: Attempting to download & install package from %s.", url)
|
Logger.log("i", "Marketplace: Attempting to download & install package from %s.", url)
|
||||||
url = QUrl(url)
|
url = QUrl(url)
|
||||||
self._download_request = QNetworkRequest(url)
|
self._download_request = QNetworkRequest(url)
|
||||||
if hasattr(QNetworkRequest, "FollowRedirectsAttribute"):
|
if hasattr(QNetworkRequest, "FollowRedirectsAttribute"):
|
||||||
@ -603,7 +603,7 @@ class Toolbox(QObject, Extension):
|
|||||||
|
|
||||||
@pyqtSlot()
|
@pyqtSlot()
|
||||||
def cancelDownload(self) -> None:
|
def cancelDownload(self) -> None:
|
||||||
Logger.log("i", "Toolbox: User cancelled the download of a package.")
|
Logger.log("i", "Marketplace: User cancelled the download of a package.")
|
||||||
self.resetDownload()
|
self.resetDownload()
|
||||||
|
|
||||||
def resetDownload(self) -> None:
|
def resetDownload(self) -> None:
|
||||||
@ -690,7 +690,7 @@ class Toolbox(QObject, Extension):
|
|||||||
|
|
||||||
return
|
return
|
||||||
except json.decoder.JSONDecodeError:
|
except json.decoder.JSONDecodeError:
|
||||||
Logger.log("w", "Toolbox: Received invalid JSON for %s.", type)
|
Logger.log("w", "Marketplace: Received invalid JSON for %s.", type)
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
self.setViewPage("errored")
|
self.setViewPage("errored")
|
||||||
@ -717,10 +717,10 @@ class Toolbox(QObject, Extension):
|
|||||||
self._onDownloadComplete(file_path)
|
self._onDownloadComplete(file_path)
|
||||||
|
|
||||||
def _onDownloadComplete(self, file_path: str) -> None:
|
def _onDownloadComplete(self, file_path: str) -> None:
|
||||||
Logger.log("i", "Toolbox: Download complete.")
|
Logger.log("i", "Marketplace: Download complete.")
|
||||||
package_info = self._package_manager.getPackageInfo(file_path)
|
package_info = self._package_manager.getPackageInfo(file_path)
|
||||||
if not package_info:
|
if not package_info:
|
||||||
Logger.log("w", "Toolbox: Package file [%s] was not a valid CuraPackage.", file_path)
|
Logger.log("w", "Marketplace: Package file [%s] was not a valid CuraPackage.", file_path)
|
||||||
return
|
return
|
||||||
|
|
||||||
license_content = self._package_manager.getPackageLicense(file_path)
|
license_content = self._package_manager.getPackageLicense(file_path)
|
||||||
@ -819,7 +819,7 @@ class Toolbox(QObject, Extension):
|
|||||||
@pyqtSlot(str, str, str)
|
@pyqtSlot(str, str, str)
|
||||||
def filterModelByProp(self, model_type: str, filter_type: str, parameter: str) -> None:
|
def filterModelByProp(self, model_type: str, filter_type: str, parameter: str) -> None:
|
||||||
if not self._models[model_type]:
|
if not self._models[model_type]:
|
||||||
Logger.log("w", "Toolbox: Couldn't filter %s model because it doesn't exist.", model_type)
|
Logger.log("w", "Marketplace: Couldn't filter %s model because it doesn't exist.", model_type)
|
||||||
return
|
return
|
||||||
self._models[model_type].setFilter({filter_type: parameter})
|
self._models[model_type].setFilter({filter_type: parameter})
|
||||||
self.filterChanged.emit()
|
self.filterChanged.emit()
|
||||||
@ -827,7 +827,7 @@ class Toolbox(QObject, Extension):
|
|||||||
@pyqtSlot(str, "QVariantMap")
|
@pyqtSlot(str, "QVariantMap")
|
||||||
def setFilters(self, model_type: str, filter_dict: dict) -> None:
|
def setFilters(self, model_type: str, filter_dict: dict) -> None:
|
||||||
if not self._models[model_type]:
|
if not self._models[model_type]:
|
||||||
Logger.log("w", "Toolbox: Couldn't filter %s model because it doesn't exist.", model_type)
|
Logger.log("w", "Marketplace: Couldn't filter %s model because it doesn't exist.", model_type)
|
||||||
return
|
return
|
||||||
self._models[model_type].setFilter(filter_dict)
|
self._models[model_type].setFilter(filter_dict)
|
||||||
self.filterChanged.emit()
|
self.filterChanged.emit()
|
||||||
@ -835,7 +835,7 @@ class Toolbox(QObject, Extension):
|
|||||||
@pyqtSlot(str)
|
@pyqtSlot(str)
|
||||||
def removeFilters(self, model_type: str) -> None:
|
def removeFilters(self, model_type: str) -> None:
|
||||||
if not self._models[model_type]:
|
if not self._models[model_type]:
|
||||||
Logger.log("w", "Toolbox: Couldn't remove filters on %s model because it doesn't exist.", model_type)
|
Logger.log("w", "Marketplace: Couldn't remove filters on %s model because it doesn't exist.", model_type)
|
||||||
return
|
return
|
||||||
self._models[model_type].setFilter({})
|
self._models[model_type].setFilter({})
|
||||||
self.filterChanged.emit()
|
self.filterChanged.emit()
|
||||||
|
@ -421,7 +421,7 @@ Item
|
|||||||
Action
|
Action
|
||||||
{
|
{
|
||||||
id: browsePackagesAction
|
id: browsePackagesAction
|
||||||
text: catalog.i18nc("@action:menu", "Browse packages...")
|
text: catalog.i18nc("@action:menu", "Open Marketplace...")
|
||||||
iconName: "plugins_browse"
|
iconName: "plugins_browse"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ UM.MainWindow
|
|||||||
Menu
|
Menu
|
||||||
{
|
{
|
||||||
id: plugin_menu
|
id: plugin_menu
|
||||||
title: catalog.i18nc("@title:menu menubar:toplevel", "&Toolbox")
|
title: catalog.i18nc("@title:menu menubar:toplevel", "&Marketplace")
|
||||||
|
|
||||||
MenuItem { action: Cura.Actions.browsePackages }
|
MenuItem { action: Cura.Actions.browsePackages }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user