mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-16 01:15:55 +08:00
Added basic tabs for monitoring print
CURA-1036
This commit is contained in:
parent
8b5800c1ee
commit
8a603c2fc1
@ -14,6 +14,7 @@ Rectangle
|
||||
id: base;
|
||||
|
||||
property int currentModeIndex;
|
||||
property bool monitoringPrint: false
|
||||
|
||||
// Is there an output device for this printer?
|
||||
property bool printerConnected: Cura.MachineManager.printerOutputDevices.length != 0
|
||||
@ -44,12 +45,44 @@ Rectangle
|
||||
}
|
||||
}
|
||||
|
||||
// Mode selection buttons for changing between Setting & Monitor print mode
|
||||
Row
|
||||
{
|
||||
id: settingAndMonitorButtons // Really need a better name for this.
|
||||
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width;
|
||||
anchors.right: parent.right
|
||||
Button
|
||||
{
|
||||
width: (parent.width - UM.Theme.getSize("default_margin").width) / 2
|
||||
height: 50
|
||||
onClicked: monitoringPrint = false
|
||||
iconSource: UM.Theme.getIcon("tab_settings");
|
||||
style: UM.Theme.styles.tool_button
|
||||
checkable: true
|
||||
checked: true
|
||||
exclusiveGroup: settingAndMonitorButtonsGroup
|
||||
}
|
||||
Button
|
||||
{
|
||||
width: (parent.width - UM.Theme.getSize("default_margin").width) / 2
|
||||
height: 50
|
||||
onClicked: monitoringPrint = true
|
||||
iconSource: UM.Theme.getIcon("tab_monitor");
|
||||
style: UM.Theme.styles.tool_button
|
||||
checkable: true
|
||||
exclusiveGroup: settingAndMonitorButtonsGroup
|
||||
}
|
||||
ExclusiveGroup { id: settingAndMonitorButtonsGroup }
|
||||
}
|
||||
|
||||
SidebarHeader {
|
||||
id: header
|
||||
width: parent.width
|
||||
height: totalHeightHeader
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.top: settingAndMonitorButtons.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
|
||||
onShowTooltip: base.showTooltip(item, location, text)
|
||||
@ -91,8 +124,9 @@ Rectangle
|
||||
anchors.top: headerSeparator.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
width: parent.width/100*45
|
||||
font: UM.Theme.getFont("large");
|
||||
font: UM.Theme.getFont("large")
|
||||
color: UM.Theme.getColor("text")
|
||||
visible: !monitoringPrint
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
@ -103,6 +137,7 @@ Rectangle
|
||||
anchors.rightMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.top: headerSeparator.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
visible: !monitoringPrint
|
||||
Component{
|
||||
id: wizardDelegate
|
||||
Button {
|
||||
@ -152,6 +187,19 @@ Rectangle
|
||||
}
|
||||
}
|
||||
|
||||
Label {
|
||||
id: monitorLabel
|
||||
text: catalog.i18nc("@label","Activity Data");
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width;
|
||||
anchors.top: headerSeparator.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
width: parent.width/100*45
|
||||
font: UM.Theme.getFont("large")
|
||||
color: UM.Theme.getColor("text")
|
||||
visible: monitoringPrint
|
||||
}
|
||||
|
||||
StackView
|
||||
{
|
||||
id: sidebarContents
|
||||
@ -161,6 +209,7 @@ Rectangle
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
anchors.left: base.left
|
||||
anchors.right: base.right
|
||||
visible: !monitoringPrint
|
||||
|
||||
delegate: StackViewDelegate
|
||||
{
|
||||
@ -191,6 +240,40 @@ Rectangle
|
||||
}
|
||||
}
|
||||
|
||||
// Item that holds all the print monitor properties
|
||||
Grid
|
||||
{
|
||||
id: printMonitor
|
||||
anchors.bottom: footerSeparator.top
|
||||
anchors.top: monitorLabel.bottom
|
||||
anchors.topMargin: UM.Theme.getSize("default_margin").height
|
||||
anchors.left: base.left
|
||||
anchors.leftMargin: UM.Theme.getSize("default_margin").width
|
||||
anchors.right: base.right
|
||||
visible: monitoringPrint
|
||||
columns: 2
|
||||
columnSpacing: UM.Theme.getSize("default_margin").width
|
||||
Label
|
||||
{
|
||||
text: "Temperature 1: "
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: "" + Cura.MachineManager.printerOutputDevices[0].hotendTemperatures[0]
|
||||
}
|
||||
|
||||
|
||||
Label
|
||||
{
|
||||
text: "Temperature 2: "
|
||||
}
|
||||
Label
|
||||
{
|
||||
text: "" + Cura.MachineManager.printerOutputDevices[0].hotendTemperatures[1]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: footerSeparator
|
||||
width: parent.width
|
||||
|
12
resources/themes/cura/icons/tab_monitor.svg
Normal file
12
resources/themes/cura/icons/tab_monitor.svg
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="19px" height="19px" viewBox="0 0 19 19" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
||||
<!-- Generator: Sketch 3.4.4 (17249) - http://www.bohemiancoding.com/sketch -->
|
||||
<title>Fill 1 Copy 3</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs></defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
|
||||
<g id="HIG" sketch:type="MSArtboardGroup" transform="translate(-718.000000, -2432.000000)" fill="#FFFFFF">
|
||||
<path d="M718,2432 L737,2432 L737,2432.90476 L718,2432.90476 L718,2432 L718,2432 Z M718,2450.09524 L719.737762,2450.09524 L721.464456,2449.19048 L733.599225,2449.19048 L735.296978,2450.09524 L737,2450.09524 L737,2451 L735.298343,2451 L733.599225,2450.09524 L721.463296,2450.09524 L719.737762,2450.99006 L718,2451 L718,2450.09524 L718,2450.09524 Z M736.136364,2432.90476 L737,2432.90476 L737,2450.09524 L736.136364,2450.09524 L736.136364,2432.90476 L736.136364,2432.90476 Z M718,2432.90476 L718.863636,2432.90476 L718.863636,2450.09524 L718,2450.09524 L718,2432.90476 L718,2432.90476 Z M720.590909,2434.71429 L734.409091,2434.71429 L734.409091,2447.38095 L720.590909,2447.38095 L720.590909,2434.71429 L720.590909,2434.71429 Z M721.454545,2435.61905 L733.545455,2435.61905 L733.545455,2446.47619 L721.454545,2446.47619 L721.454545,2435.61905 L721.454545,2435.61905 Z M725.772727,2435.61905 L729.227273,2435.61905 L729.227273,2438.33333 L725.772727,2438.33333 L725.772727,2435.61905 L725.772727,2435.61905 Z M723.181818,2445.57143 L731.818182,2445.57143 L731.818182,2446.47619 L723.181818,2446.47619 L723.181818,2445.57143 L723.181818,2445.57143 Z M726.636364,2438.33333 L728.363636,2438.33333 L728.363636,2439.2381 L726.636364,2439.2381 L726.636364,2438.33333 L726.636364,2438.33333 Z" id="Fill-1-Copy-3" sketch:type="MSShapeGroup"></path>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
44
resources/themes/cura/icons/tab_settings.svg
Normal file
44
resources/themes/cura/icons/tab_settings.svg
Normal file
@ -0,0 +1,44 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg [
|
||||
<!ENTITY ns_extend "http://ns.adobe.com/Extensibility/1.0/">
|
||||
<!ENTITY ns_ai "http://ns.adobe.com/AdobeIllustrator/10.0/">
|
||||
<!ENTITY ns_graphs "http://ns.adobe.com/Graphs/1.0/">
|
||||
<!ENTITY ns_vars "http://ns.adobe.com/Variables/1.0/">
|
||||
<!ENTITY ns_imrep "http://ns.adobe.com/ImageReplacement/1.0/">
|
||||
<!ENTITY ns_sfw "http://ns.adobe.com/SaveForWeb/1.0/">
|
||||
<!ENTITY ns_custom "http://ns.adobe.com/GenericCustomNamespace/1.0/">
|
||||
<!ENTITY ns_adobe_xpath "http://ns.adobe.com/XPath/1.0/">
|
||||
]>
|
||||
<svg version="1.2" baseProfile="tiny" xmlns:x="&ns_extend;" xmlns:i="&ns_ai;" xmlns:graph="&ns_graphs;"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 30 30"
|
||||
xml:space="preserve">
|
||||
<switch>
|
||||
<foreignObject requiredExtensions="&ns_ai;" x="0" y="0" width="1" height="1">
|
||||
<i:pgfRef xlink:href="#adobe_illustrator_pgf">
|
||||
</i:pgfRef>
|
||||
</foreignObject>
|
||||
<g i:extraneous="self">
|
||||
<g id="frame_30x30" display="none">
|
||||
<rect display="inline" width="30" height="30"/>
|
||||
</g>
|
||||
<g id="frame_24x24" display="none">
|
||||
<rect x="3" y="3" display="inline" fill="#FFFFFF" width="24" height="24"/>
|
||||
</g>
|
||||
<g id="icon" fill="#FFFFFF">
|
||||
<g>
|
||||
<rect x="2.994" y="26" width="24" height="1"/>
|
||||
<g>
|
||||
<polygon points="22.994,16.137 16.494,16.137 16.494,15.136 21.994,15.136 21.994,12.894 22.994,12.894 "/>
|
||||
<rect x="6.994" y="18.758" width="16" height="1"/>
|
||||
</g>
|
||||
<rect x="4.994" y="22.379" width="20" height="1"/>
|
||||
<path d="M22.5,1.571L22.5,1.571C22.5,1.571,22.512,1.563,22.5,1.571L22.5,1.571h-0.018c0,0-6.148,0-6.037,0v3.744
|
||||
c0,0,2.982,4.857,5.793,5.124c0.041,0.004,0.08,0.004,0.119,0.01c0.043,0.002,0.084,0.006,0.125,0.006h0.012H22.5
|
||||
c0.047,0,0.086-0.004,0.129-0.006c0.033-0.006,0.082-0.006,0.117-0.01c2.812-0.267,5.797-5.124,5.797-5.124V1.571
|
||||
C28.652,1.571,22.5,1.571,22.5,1.571"/>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</switch>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
Loading…
x
Reference in New Issue
Block a user