|
@@ -1,12 +1,11 @@
|
|
|
-// Copyright (c) 2018 Ultimaker B.V.
|
|
|
+// Copyright (c) 2022 Ultimaker B.V.
|
|
|
// Uranium is released under the terms of the LGPLv3 or higher.
|
|
|
|
|
|
import QtQuick 2.7
|
|
|
-import QtQuick.Controls 1.4
|
|
|
-import QtQuick.Layouts 1.3
|
|
|
+import QtQuick.Controls 2.4
|
|
|
|
|
|
-import UM 1.2 as UM
|
|
|
-import Cura 1.0 as Cura
|
|
|
+import UM 1.5 as UM
|
|
|
+import Cura 1.5 as Cura
|
|
|
|
|
|
Item
|
|
|
{
|
|
@@ -51,71 +50,62 @@ Item
|
|
|
materialProperties.approximate_diameter = currentItem.approximate_diameter || "0"
|
|
|
}
|
|
|
|
|
|
- Item
|
|
|
- {
|
|
|
- anchors.fill: parent
|
|
|
-
|
|
|
- Item // Material title Label
|
|
|
- {
|
|
|
- id: profileName
|
|
|
-
|
|
|
- width: parent.width
|
|
|
- height: childrenRect.height
|
|
|
+ // Material title Label
|
|
|
+ UM.Label {
|
|
|
+ id: profileName
|
|
|
|
|
|
- Label {
|
|
|
- width: parent.width
|
|
|
- text: materialProperties.name
|
|
|
- font: UM.Theme.getFont("large_bold")
|
|
|
- elide: Text.ElideRight
|
|
|
- }
|
|
|
- }
|
|
|
+ width: parent.width
|
|
|
+ text: materialProperties.name
|
|
|
+ font: UM.Theme.getFont("large_bold")
|
|
|
+ elide: Text.ElideRight
|
|
|
+ }
|
|
|
|
|
|
- MaterialsView // Material detailed information view below the title Label
|
|
|
+ // Material detailed information view below the title Label
|
|
|
+ MaterialsView
|
|
|
+ {
|
|
|
+ id: materialDetailsView
|
|
|
+ anchors
|
|
|
{
|
|
|
- id: materialDetailsView
|
|
|
- anchors
|
|
|
- {
|
|
|
- left: parent.left
|
|
|
- right: parent.right
|
|
|
- top: profileName.bottom
|
|
|
- topMargin: UM.Theme.getSize("default_margin").height
|
|
|
- bottom: parent.bottom
|
|
|
- }
|
|
|
-
|
|
|
- editingEnabled: currentItem != null && !currentItem.is_read_only
|
|
|
- onResetSelectedMaterial: base.resetExpandedActiveMaterial()
|
|
|
-
|
|
|
- properties: materialProperties
|
|
|
- containerId: currentItem != null ? currentItem.id : ""
|
|
|
- currentMaterialNode: currentItem.container_node
|
|
|
+ left: parent.left
|
|
|
+ right: parent.right
|
|
|
+ top: profileName.bottom
|
|
|
+ topMargin: UM.Theme.getSize("default_margin").height
|
|
|
+ bottom: parent.bottom
|
|
|
}
|
|
|
|
|
|
- QtObject
|
|
|
- {
|
|
|
- id: materialProperties
|
|
|
-
|
|
|
- property string guid: "00000000-0000-0000-0000-000000000000"
|
|
|
- property string container_id: "Unknown";
|
|
|
- property string name: "Unknown";
|
|
|
- property string profile_type: "Unknown";
|
|
|
- property string brand: "Unknown";
|
|
|
- property string material: "Unknown"; // This needs to be named as "material" to be consistent with
|
|
|
- // the material container's metadata entry
|
|
|
-
|
|
|
- property string color_name: "Yellow";
|
|
|
- property color color_code: "yellow";
|
|
|
-
|
|
|
- property real density: 0.0;
|
|
|
- property real diameter: 0.0;
|
|
|
- property string approximate_diameter: "0";
|
|
|
-
|
|
|
- property real spool_cost: 0.0;
|
|
|
- property real spool_weight: 0.0;
|
|
|
- property real spool_length: 0.0;
|
|
|
- property real cost_per_meter: 0.0;
|
|
|
-
|
|
|
- property string description: "";
|
|
|
- property string adhesion_info: "";
|
|
|
- }
|
|
|
+ editingEnabled: currentItem != null && !currentItem.is_read_only
|
|
|
+ onResetSelectedMaterial: base.resetExpandedActiveMaterial()
|
|
|
+
|
|
|
+ properties: materialProperties
|
|
|
+ containerId: currentItem != null ? currentItem.id : ""
|
|
|
+ currentMaterialNode: currentItem.container_node
|
|
|
+ }
|
|
|
+
|
|
|
+ QtObject
|
|
|
+ {
|
|
|
+ id: materialProperties
|
|
|
+
|
|
|
+ property string guid: "00000000-0000-0000-0000-000000000000"
|
|
|
+ property string container_id: "Unknown";
|
|
|
+ property string name: "Unknown";
|
|
|
+ property string profile_type: "Unknown";
|
|
|
+ property string brand: "Unknown";
|
|
|
+ property string material: "Unknown"; // This needs to be named as "material" to be consistent with
|
|
|
+ // the material container's metadata entry
|
|
|
+
|
|
|
+ property string color_name: "Yellow";
|
|
|
+ property color color_code: "yellow";
|
|
|
+
|
|
|
+ property real density: 0.0;
|
|
|
+ property real diameter: 0.0;
|
|
|
+ property string approximate_diameter: "0";
|
|
|
+
|
|
|
+ property real spool_cost: 0.0;
|
|
|
+ property real spool_weight: 0.0;
|
|
|
+ property real spool_length: 0.0;
|
|
|
+ property real cost_per_meter: 0.0;
|
|
|
+
|
|
|
+ property string description: "";
|
|
|
+ property string adhesion_info: "";
|
|
|
}
|
|
|
-}
|
|
|
+}
|