Browse Source

Delete old 'Toolbox' in favour of new Marketplace.

part of CURA-8588
Remco Burema 3 years ago
parent
commit
b794ad6ed2

+ 1 - 1
cura/CuraApplication.py

@@ -493,7 +493,7 @@ class CuraApplication(QtApplication):
             "CuraEngineBackend", #Cura is useless without this one since you can't slice.
             "FileLogger", #You want to be able to read the log if something goes wrong.
             "XmlMaterialProfile", #Cura crashes without this one.
-            "Toolbox", #This contains the interface to enable/disable plug-ins, so if you disable it you can't enable it back.
+            "Marketplace", #This contains the interface to enable/disable plug-ins, so if you disable it you can't enable it back.
             "PrepareStage", #Cura is useless without this one since you can't load models.
             "PreviewStage", #This shows the list of the plugin views that are installed in Cura.
             "MonitorStage", #Major part of Cura's functionality.

+ 0 - 15
plugins/Toolbox/__init__.py

@@ -1,15 +0,0 @@
-# Copyright (c) 2018 Ultimaker B.V.
-# Toolbox is released under the terms of the LGPLv3 or higher.
-
-from .src import Toolbox
-from .src.CloudSync.SyncOrchestrator import SyncOrchestrator
-
-
-def getMetaData():
-    return {}
-
-
-def register(app):
-    return {
-        "extension": [Toolbox.Toolbox(app), SyncOrchestrator(app)]
-    }

+ 0 - 7
plugins/Toolbox/plugin.json

@@ -1,7 +0,0 @@
-{
-    "name": "Toolbox",
-    "author": "Ultimaker B.V.",
-    "version": "1.0.1",
-    "api": 7,
-    "description": "Find, manage and install new Cura packages."
-}

+ 0 - 6
plugins/Toolbox/resources/images/Shop.svg

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
-<path d="M19,3H5C3.3,3,2,4.3,2,6v3c0,1.5,0.8,2.7,2,3.4V22h16v-9.6c1.2-0.7,2-2,2-3.4V6C22,4.3,20.7,3,19,3z
-	M10,5h4v4c0,1.1-0.9,2-2,2s-2-0.9-2-2V5z M4,9V5h4v4c0,1.1-0.9,2-2,2S4,10.1,4,9z M18,20h-4v-5h-4v5H6v-7c1.2,0,2.3-0.5,3-1.4
-	c0.7,0.8,1.8,1.4,3,1.4s2.3-0.5,3-1.4c0.7,0.8,1.8,1.4,3,1.4V20z M20,9c0,1.1-0.9,2-2,2s-2-0.9-2-2V5h4V9z" />
-</svg>

+ 0 - 8
plugins/Toolbox/resources/images/installed_check.svg

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 22.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
-<svg version="1.1" id="Layer_3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
-	 viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
-<path d="M0,512h512V0L0,512z M440.4,318.3L331.2,431.6c-1.4,1.4-2.7,2-4.8,2c-2,0-3.4-0.7-4.8-2l-53.3-57.3l-1.4-2
-	c-1.4-1.4-2-3.4-2-4.8c0-1.4,0.7-3.4,2-4.8l9.6-9.6c2.7-2.7,6.8-2.7,9.6,0l0.7,0.7l37.6,40.2c1.4,1.4,3.4,1.4,4.8,0l91.4-94.9h0.7
-	c2.7-2.7,6.8-2.7,9.6,0l9.5,9.6C443.1,311.5,443.1,315.6,440.4,318.3z"/>
-</svg>

+ 0 - 3
plugins/Toolbox/resources/images/placeholder.svg

@@ -1,3 +0,0 @@
-<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 48 48">
-  <path d="M24,44,7,33.4V14.6L24,4,41,14.6V33.4ZM9,32.3l15,9.3,15-9.3V15.7L24,6.4,9,15.7Z"/>
-</svg>

+ 0 - 112
plugins/Toolbox/resources/qml/Toolbox.qml

@@ -1,112 +0,0 @@
-// Copyright (c) 2018 Ultimaker B.V.
-// Toolbox is released under the terms of the LGPLv3 or higher.
-
-// Main window for the Toolbox
-
-import QtQuick 2.2
-import QtQuick.Dialogs 1.1
-import QtQuick.Window 2.2
-import UM 1.1 as UM
-
-import "./pages"
-import "./dialogs"
-import "./components"
-
-Window
-{
-    id: base
-    property var selection: null
-    title: catalog.i18nc("@title", "Marketplace")
-    modality: Qt.ApplicationModal
-    flags: Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint
-
-    width: UM.Theme.getSize("large_popup_dialog").width
-    height:  UM.Theme.getSize("large_popup_dialog").height
-    minimumWidth: width
-    maximumWidth: minimumWidth
-    minimumHeight: height
-    maximumHeight: minimumHeight
-    color: UM.Theme.getColor("main_background")
-    UM.I18nCatalog
-    {
-        id: catalog
-        name: "cura"
-    }
-    Item
-    {
-        anchors.fill: parent
-
-        WelcomePage
-        {
-            visible: toolbox.viewPage === "welcome"
-        }
-
-        ToolboxHeader
-        {
-            id: header
-            visible: toolbox.viewPage !== "welcome"
-        }
-
-        Item
-        {
-            id: mainView
-            width: parent.width
-            z: parent.z - 1
-            anchors
-            {
-                top: header.bottom
-                bottom: footer.top
-            }
-            // TODO: This could be improved using viewFilter instead of viewCategory
-            ToolboxLoadingPage
-            {
-                id: viewLoading
-                visible: toolbox.viewCategory !== "installed" && toolbox.viewPage === "loading"
-            }
-            ToolboxErrorPage
-            {
-                id: viewErrored
-                visible: toolbox.viewCategory !== "installed" && toolbox.viewPage === "errored"
-            }
-            ToolboxDownloadsPage
-            {
-                id: viewDownloads
-                visible: toolbox.viewCategory !== "installed" && toolbox.viewPage === "overview"
-            }
-            ToolboxDetailPage
-            {
-                id: viewDetail
-                visible: toolbox.viewCategory !== "installed" && toolbox.viewPage === "detail"
-            }
-            ToolboxAuthorPage
-            {
-                id: viewAuthor
-                visible: toolbox.viewCategory !== "installed" && toolbox.viewPage === "author"
-            }
-            ToolboxInstalledPage
-            {
-                id: installedPluginList
-                visible: toolbox.viewCategory === "installed"
-            }
-        }
-
-        ToolboxFooter
-        {
-            id: footer
-            visible: toolbox.restartRequired
-            height: visible ? UM.Theme.getSize("toolbox_footer").height : 0
-        }
-
-        Connections
-        {
-            target: toolbox
-            function onShowLicenseDialog() { licenseDialog.show() }
-            function onCloseLicenseDialog() { licenseDialog.close() }
-        }
-        
-        ToolboxLicenseDialog
-        {
-            id: licenseDialog
-        }
-    }
-}

+ 0 - 29
plugins/Toolbox/resources/qml/components/ToolboxActionButtonStyle.qml

@@ -1,29 +0,0 @@
-// Copyright (c) 2018 Ultimaker B.V.
-// Toolbox is released under the terms of the LGPLv3 or higher.
-
-import QtQuick 2.2
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles 1.4
-import UM 1.1 as UM
-
-ButtonStyle
-{
-    background: Rectangle
-    {
-        implicitWidth: UM.Theme.getSize("toolbox_action_button").width
-        implicitHeight: UM.Theme.getSize("toolbox_action_button").height
-        color: "transparent"
-        border
-        {
-            width: UM.Theme.getSize("default_lining").width
-            color: UM.Theme.getColor("lining")
-        }
-    }
-    label: Label
-    {
-        text: control.text
-        color: UM.Theme.getColor("text")
-        verticalAlignment: Text.AlignVCenter
-        horizontalAlignment: Text.AlignHCenter
-    }
-}

+ 0 - 84
plugins/Toolbox/resources/qml/components/ToolboxBackColumn.qml

@@ -1,84 +0,0 @@
-// Copyright (c) 2018 Ultimaker B.V.
-// Toolbox is released under the terms of the LGPLv3 or higher.
-
-import QtQuick 2.10
-import QtQuick.Controls 1.4
-import QtQuick.Controls.Styles 1.4
-import UM 1.1 as UM
-
-Item
-{
-    id: sidebar
-    height: parent.height
-    width: UM.Theme.getSize("toolbox_back_column").width
-    anchors
-    {
-        top: parent.top
-        left: parent.left
-        topMargin: UM.Theme.getSize("wide_margin").height
-        leftMargin: UM.Theme.getSize("default_margin").width
-        rightMargin: UM.Theme.getSize("default_margin").width
-    }
-    Button
-    {
-        id: button
-        text: catalog.i18nc("@action:button", "Back")
-        enabled: !toolbox.isDownloading
-        UM.RecolorImage
-        {
-            id: backArrow
-            anchors
-            {
-                verticalCenter: parent.verticalCenter
-                left: parent.left
-                rightMargin: UM.Theme.getSize("default_margin").width
-            }
-            width: UM.Theme.getSize("standard_arrow").width
-            height: UM.Theme.getSize("standard_arrow").height
-            sourceSize
-            {
-                width: width
-                height: height
-            }
-            color: button.enabled ? (button.hovered ? UM.Theme.getColor("primary") : UM.Theme.getColor("text")) : UM.Theme.getColor("text_inactive")
-            source: UM.Theme.getIcon("ChevronSingleLeft")
-        }
-        width: UM.Theme.getSize("toolbox_back_button").width
-        height: UM.Theme.getSize("toolbox_back_button").height
-        onClicked:
-        {
-            toolbox.viewPage = "overview"
-            if (toolbox.viewCategory == "material")
-            {
-                toolbox.filterModelByProp("authors", "package_types", "material")
-            }
-            else if (toolbox.viewCategory == "plugin")
-            {
-                toolbox.filterModelByProp("packages", "type", "plugin")
-            }
-
-        }
-        style: ButtonStyle
-        {
-            background: Rectangle
-            {
-                color: "transparent"
-            }
-            label: Label
-            {
-                id: labelStyle
-                text: control.text
-                color: control.enabled ? (control.hovered ? UM.Theme.getColor("primary") : UM.Theme.getColor("text")) : UM.Theme.getColor("text_inactive")
-                font: UM.Theme.getFont("medium_bold")
-                horizontalAlignment: Text.AlignLeft
-                anchors
-                {
-                    left: parent.left
-                    leftMargin: UM.Theme.getSize("default_margin").width
-                }
-                width: control.width
-                renderType: Text.NativeRendering
-            }
-        }
-    }
-}

+ 0 - 209
plugins/Toolbox/resources/qml/components/ToolboxCompatibilityChart.qml

@@ -1,209 +0,0 @@
-// Copyright (c) 2019 Ultimaker B.V.
-// Toolbox is released under the terms of the LGPLv3 or higher.
-
-import QtQuick 2.10
-import QtQuick.Controls 1.4
-
-import UM 1.5 as UM
-
-Item
-{
-    id: base
-
-    property var packageData
-    property var technicalDataSheetUrl: packageData.links.technicalDataSheet
-    property var safetyDataSheetUrl: packageData.links.safetyDataSheet
-    property var printingGuidelinesUrl: packageData.links.printingGuidelines
-    property var materialWebsiteUrl: packageData.links.website
-
-    height: childrenRect.height
-    onVisibleChanged: packageData.type === "material" && (compatibilityItem.visible || dataSheetLinks.visible)
-
-    Column
-    {
-        id: compatibilityItem
-        visible: packageData.has_configs
-        width: parent.width
-        // This is a bit of a hack, but the whole QML is pretty messy right now. This needs a big overhaul.
-        height: visible ? heading.height + table.height: 0
-
-        Label
-        {
-            id: heading
-            width: parent.width
-            text: catalog.i18nc("@label", "Compatibility")
-            wrapMode: Text.WordWrap
-            color: UM.Theme.getColor("text_medium")
-            font: UM.Theme.getFont("medium")
-            renderType: Text.NativeRendering
-        }
-
-        TableView
-        {
-            id: table
-            width: parent.width
-            frameVisible: false
-
-            // Workaround for scroll issues (QTBUG-49652)
-            flickableItem.interactive: false
-            Component.onCompleted:
-            {
-                for (var i = 0; i < flickableItem.children.length; ++i)
-                {
-                    flickableItem.children[i].enabled = false
-                }
-            }
-            selectionMode: 0
-            model: packageData.supported_configs
-            headerDelegate: Rectangle
-            {
-                color: UM.Theme.getColor("main_background")
-                height: UM.Theme.getSize("toolbox_chart_row").height
-                Label
-                {
-                    anchors.verticalCenter: parent.verticalCenter
-                    elide: Text.ElideRight
-                    text: styleData.value || ""
-                    color: UM.Theme.getColor("text")
-                    font: UM.Theme.getFont("default_bold")
-                    renderType: Text.NativeRendering
-                }
-                Rectangle
-                {
-                    anchors.bottom: parent.bottom
-                    height: UM.Theme.getSize("default_lining").height
-                    width: parent.width
-                    color: "black"
-                }
-            }
-            rowDelegate: Item
-            {
-                height: UM.Theme.getSize("toolbox_chart_row").height
-                Label
-                {
-                    anchors.verticalCenter: parent.verticalCenter
-                    elide: Text.ElideRight
-                    text: styleData.value || ""
-                    color: UM.Theme.getColor("text_medium")
-                    font: UM.Theme.getFont("default")
-                    renderType: Text.NativeRendering
-                }
-            }
-            itemDelegate: Item
-            {
-                height: UM.Theme.getSize("toolbox_chart_row").height
-                Label
-                {
-                    anchors.verticalCenter: parent.verticalCenter
-                    elide: Text.ElideRight
-                    text: styleData.value || ""
-                    color: UM.Theme.getColor("text_medium")
-                    font: UM.Theme.getFont("default")
-                    renderType: Text.NativeRendering
-                }
-            }
-
-            Component
-            {
-                id: columnTextDelegate
-                Label
-                {
-                    anchors.fill: parent
-                    verticalAlignment: Text.AlignVCenter
-                    text: styleData.value || ""
-                    elide: Text.ElideRight
-                    color: UM.Theme.getColor("text_medium")
-                    font: UM.Theme.getFont("default")
-                    renderType: Text.NativeRendering
-                }
-            }
-
-            TableViewColumn
-            {
-                role: "machine"
-                title: catalog.i18nc("@label:table_header", "Machine")
-                width: Math.floor(table.width * 0.25)
-                delegate: columnTextDelegate
-            }
-            TableViewColumn
-            {
-                role: "print_core"
-                title: "Print Core" //This term should not be translated.
-                width: Math.floor(table.width * 0.2)
-            }
-            TableViewColumn
-            {
-                role: "build_plate"
-                title: catalog.i18nc("@label:table_header", "Build Plate")
-                width: Math.floor(table.width * 0.225)
-            }
-            TableViewColumn
-            {
-                role: "support_material"
-                title: catalog.i18nc("@label:table_header", "Support")
-                width: Math.floor(table.width * 0.225)
-            }
-            TableViewColumn
-            {
-                role: "quality"
-                title: catalog.i18nc("@label:table_header", "Quality")
-                width: Math.floor(table.width * 0.1)
-            }
-        }
-    }
-
-    Label
-    {
-        id: dataSheetLinks
-        anchors.top: compatibilityItem.bottom
-        anchors.topMargin: UM.Theme.getSize("narrow_margin").height
-        visible: base.technicalDataSheetUrl !== undefined ||
-                    base.safetyDataSheetUrl !== undefined ||
-                    base.printingGuidelinesUrl !== undefined ||
-                    base.materialWebsiteUrl !== undefined
-                    
-        text:
-        {
-            var result = ""
-            if (base.technicalDataSheetUrl !== undefined)
-            {
-                var tds_name = catalog.i18nc("@action:label", "Technical Data Sheet")
-                result += "<a href='%1'>%2</a>".arg(base.technicalDataSheetUrl).arg(tds_name)
-            }
-            if (base.safetyDataSheetUrl !== undefined)
-            {
-                if (result.length > 0)
-                {
-                    result += "<br/>"
-                }
-                var sds_name = catalog.i18nc("@action:label", "Safety Data Sheet")
-                result += "<a href='%1'>%2</a>".arg(base.safetyDataSheetUrl).arg(sds_name)
-            }
-            if (base.printingGuidelinesUrl !== undefined)
-            {
-                if (result.length > 0)
-                {
-                    result += "<br/>"
-                }
-                var pg_name = catalog.i18nc("@action:label", "Printing Guidelines")
-                result += "<a href='%1'>%2</a>".arg(base.printingGuidelinesUrl).arg(pg_name)
-            }
-            if (base.materialWebsiteUrl !== undefined)
-            {
-                if (result.length > 0)
-                {
-                    result += "<br/>"
-                }
-                var pg_name = catalog.i18nc("@action:label", "Website")
-                result += "<a href='%1'>%2</a>".arg(base.materialWebsiteUrl).arg(pg_name)
-            }
-
-            return result
-        }
-        font: UM.Theme.getFont("default")
-        color: UM.Theme.getColor("text")
-        linkColor: UM.Theme.getColor("text_link")
-        onLinkActivated: UM.UrlUtil.openUrl(link, ["http", "https"])
-        renderType: Text.NativeRendering
-    }
-}

Some files were not shown because too many files changed in this diff