mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 04:54:04 -06:00
CURA-5035 Added fake material showcase model
This commit is contained in:
parent
594e9aa414
commit
87c194178d
20 changed files with 95 additions and 110 deletions
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
@ -14,7 +14,6 @@ import UM 1.1 as UM
|
|||
Window
|
||||
{
|
||||
id: base
|
||||
property bool dataReady: manager.dataReady
|
||||
title: catalog.i18nc("@title:tab", "Toolbox");
|
||||
modality: Qt.ApplicationModal
|
||||
width: 720 * screenScaleFactor
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
@ -43,6 +43,7 @@ Item
|
|||
{
|
||||
manager.viewPage = "overview"
|
||||
manager.filterPackages("type", manager.viewCategory)
|
||||
manager.filterAuthors("type", manager.viewCategory)
|
||||
}
|
||||
style: ButtonStyle
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
@ -34,7 +34,16 @@ Column
|
|||
|
||||
Repeater
|
||||
{
|
||||
model: manager.pluginsShowcaseModel
|
||||
model: {
|
||||
if ( manager.viewCategory == "plugin" )
|
||||
{
|
||||
return manager.pluginsShowcaseModel
|
||||
}
|
||||
if ( manager.viewCategory == "material" )
|
||||
{
|
||||
return manager.materialsShowcaseModel
|
||||
}
|
||||
}
|
||||
delegate: ToolboxDownloadsShowcaseTile {}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
@ -51,19 +51,20 @@ Item
|
|||
{
|
||||
anchors.fill: parent
|
||||
onClicked: {
|
||||
if ( manager.viewCategory == "material" )
|
||||
switch(manager.viewCategory)
|
||||
{
|
||||
manager.viewSelection = model.name
|
||||
manager.viewPage = "author"
|
||||
manager.filterAuthors("name", model.name)
|
||||
manager.filterPackages("author_name", model.name)
|
||||
}
|
||||
else
|
||||
{
|
||||
manager.viewSelection = model.id
|
||||
manager.viewPage = "detail"
|
||||
manager.filterAuthors("name", model.author_name)
|
||||
manager.filterPackages("id", model.id)
|
||||
case "material":
|
||||
manager.viewSelection = model.name
|
||||
manager.viewPage = "author"
|
||||
manager.filterAuthors("name", model.name)
|
||||
manager.filterPackages("author_name", model.name)
|
||||
break
|
||||
default:
|
||||
manager.viewSelection = model.id
|
||||
manager.viewPage = "detail"
|
||||
manager.filterAuthors("name", model.author_name)
|
||||
manager.filterPackages("id", model.id)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
@ -157,20 +157,18 @@ Item
|
|||
ProgressBar
|
||||
{
|
||||
id: progressbar
|
||||
minimumValue: 0;
|
||||
maximumValue: 100
|
||||
anchors.left: installButton.left
|
||||
anchors.right: installButton.right
|
||||
anchors.top: installButton.bottom
|
||||
anchors.topMargin: 4
|
||||
value: manager.isDownloading ? manager.downloadProgress : 0
|
||||
visible: manager.isDownloading && pluginList.activePlugin == model
|
||||
visible: manager.isDownloading
|
||||
style: ProgressBarStyle
|
||||
{
|
||||
background: Rectangle
|
||||
{
|
||||
color: "lightgray"
|
||||
implicitHeight: 6
|
||||
color: UM.Theme.getColor("lining")
|
||||
implicitHeight: Math.floor(UM.Theme.getSize("base_unit").height / 2)
|
||||
}
|
||||
progress: Rectangle
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.7
|
||||
import QtQuick.Dialogs 1.1
|
||||
import QtQuick.Controls 1.4
|
||||
import QtQuick.Controls.Styles 1.4
|
||||
import UM 1.1 as UM
|
||||
|
||||
// TODO: Switch to QtQuick.Controls 2.x and remove QtQuick.Controls.Styles
|
||||
|
||||
Rectangle
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
import QtQuick.Dialogs 1.1
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// Copyright (c) 2018 Ultimaker B.V.
|
||||
// PluginBrowser is released under the terms of the LGPLv3 or higher.
|
||||
// Toolbox is released under the terms of the LGPLv3 or higher.
|
||||
|
||||
import QtQuick 2.2
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue