mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-03 01:04:35 +08:00

We created a new set of icons for Cura. These icons had to be reverted though because they weren't working out in the interface for the last release yet. This unreverts them, basically adding them back hoping that we'll get them fixed in time for the next release. Contributes to issue CURA-8342. Revert "Revert "Fix merge conflict"" This reverts commit bb20e3307f43edc1ff53cb154d2351ddfe39e158. Revert "Revert "Merge pull request #9716 from Ultimaker/CURA-8010_new_icons"" This reverts commit 70e4e9640e561e18a12870f30c905203ce8ccee7. Revert "Revert "Fix typo in icon name"" This reverts commit 38ce22ba7c3f40b971bc6e1e0a8e776ca9d51512. Revert "Revert "Add list for deprecated icons"" This reverts commit 119a957e7f978dbf1ddbcb3b0005bf38e8fed943. Revert "Revert "Add Function icon"" This reverts commit 760726cf0bb953bb1b0fc277b448f419d4bd2544. Revert "Revert "Switch out inherit icon"" This reverts commit 26afff609381e2004d194c280f504b6226859bd3. Revert "Revert "Merge branch 'CURA-8205_Introduce_new_icons_in_Cura' of github.com:Ultimaker/Cura"" This reverts commit 6483db3d47ee052c1a966cdee3af7190577a5769. Revert "Fix incorrect icons" This reverts commit 02a4ade2a50a943ff36fd4895bdc9261cf2133eb.
183 lines
5.4 KiB
QML
183 lines
5.4 KiB
QML
// Copyright (c) 2019 Ultimaker B.V.
|
|
// Cura 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.3 as UM
|
|
import Cura 1.0 as Cura
|
|
|
|
/**
|
|
* This component contains the print job queue, extracted from the primary
|
|
* MonitorStage.qml file not for reusability but simply to keep it lean and more
|
|
* readable.
|
|
*/
|
|
Item
|
|
{
|
|
// If the printer is a cloud printer or not. Other items base their enabled state off of this boolean. In the future
|
|
// they might not need to though.
|
|
property bool cloudConnection: Cura.MachineManager.activeMachineIsUsingCloudConnection
|
|
|
|
Label
|
|
{
|
|
id: queuedLabel
|
|
anchors
|
|
{
|
|
left: queuedPrintJobs.left
|
|
top: parent.top
|
|
}
|
|
color: UM.Theme.getColor("text")
|
|
font: UM.Theme.getFont("large")
|
|
text: catalog.i18nc("@label", "Queued")
|
|
renderType: Text.NativeRendering
|
|
}
|
|
|
|
Item
|
|
{
|
|
id: manageQueueLabel
|
|
anchors
|
|
{
|
|
right: queuedPrintJobs.right
|
|
verticalCenter: queuedLabel.verticalCenter
|
|
}
|
|
height: 18 * screenScaleFactor // TODO: Theme!
|
|
width: childrenRect.width
|
|
|
|
UM.RecolorImage
|
|
{
|
|
id: externalLinkIcon
|
|
anchors.verticalCenter: manageQueueLabel.verticalCenter
|
|
color: UM.Theme.getColor("text_link")
|
|
source: UM.Theme.getIcon("LinkExternal")
|
|
width: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!)
|
|
height: 16 * screenScaleFactor // TODO: Theme! (Y U NO USE 18 LIKE ALL OTHER ICONS?!)
|
|
}
|
|
Label
|
|
{
|
|
id: manageQueueText
|
|
anchors
|
|
{
|
|
left: externalLinkIcon.right
|
|
leftMargin: UM.Theme.getSize("narrow_margin").width
|
|
verticalCenter: externalLinkIcon.verticalCenter
|
|
}
|
|
color: UM.Theme.getColor("text_link")
|
|
font: UM.Theme.getFont("medium") // 14pt, regular
|
|
text: catalog.i18nc("@label link to connect manager", "Manage in browser")
|
|
renderType: Text.NativeRendering
|
|
}
|
|
}
|
|
|
|
MouseArea
|
|
{
|
|
anchors.fill: manageQueueLabel
|
|
onClicked: OutputDevice.openPrintJobControlPanel()
|
|
onEntered:
|
|
{
|
|
manageQueueText.font.underline = true
|
|
}
|
|
onExited:
|
|
{
|
|
manageQueueText.font.underline = false
|
|
}
|
|
}
|
|
|
|
Row
|
|
{
|
|
id: printJobQueueHeadings
|
|
anchors
|
|
{
|
|
left: queuedPrintJobs.left
|
|
leftMargin: UM.Theme.getSize("narrow_margin").width
|
|
top: queuedLabel.bottom
|
|
topMargin: 24 * screenScaleFactor // TODO: Theme!
|
|
}
|
|
spacing: 18 * screenScaleFactor // TODO: Theme!
|
|
|
|
Label
|
|
{
|
|
text: catalog.i18nc("@label", "There are no print jobs in the queue. Slice and send a job to add one.")
|
|
color: UM.Theme.getColor("text")
|
|
font: UM.Theme.getFont("medium")
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
renderType: Text.NativeRendering
|
|
visible: printJobList.count === 0
|
|
}
|
|
|
|
Label
|
|
{
|
|
text: catalog.i18nc("@label", "Print jobs")
|
|
color: UM.Theme.getColor("text")
|
|
font: UM.Theme.getFont("medium") // 14pt, regular
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
width: 284 * screenScaleFactor // TODO: Theme! (Should match column size)
|
|
|
|
renderType: Text.NativeRendering
|
|
visible: printJobList.count > 0
|
|
}
|
|
|
|
Label
|
|
{
|
|
text: catalog.i18nc("@label", "Total print time")
|
|
color: UM.Theme.getColor("text")
|
|
font: UM.Theme.getFont("medium") // 14pt, regular
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
width: UM.Theme.getSize("monitor_column").width
|
|
|
|
renderType: Text.NativeRendering
|
|
visible: printJobList.count > 0
|
|
}
|
|
|
|
Label
|
|
{
|
|
text: catalog.i18nc("@label", "Waiting for")
|
|
color: UM.Theme.getColor("text")
|
|
font: UM.Theme.getFont("medium") // 14pt, regular
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
width: UM.Theme.getSize("monitor_column").width
|
|
|
|
renderType: Text.NativeRendering
|
|
visible: printJobList.count > 0
|
|
}
|
|
}
|
|
|
|
ScrollView
|
|
{
|
|
id: queuedPrintJobs
|
|
anchors
|
|
{
|
|
bottom: parent.bottom
|
|
horizontalCenter: parent.horizontalCenter
|
|
top: printJobQueueHeadings.bottom
|
|
topMargin: 12 * screenScaleFactor // TODO: Theme!
|
|
}
|
|
style: UM.Theme.styles.scrollview
|
|
width: parent.width
|
|
|
|
ListView
|
|
{
|
|
id: printJobList
|
|
anchors.fill: parent
|
|
delegate: MonitorPrintJobCard
|
|
{
|
|
anchors
|
|
{
|
|
left: parent.left
|
|
right: parent.right
|
|
}
|
|
printJob: modelData
|
|
}
|
|
model:
|
|
{
|
|
if (OutputDevice.receivedData)
|
|
{
|
|
return OutputDevice.queuedPrintJobs
|
|
}
|
|
return [null, null]
|
|
}
|
|
spacing: 6 // TODO: Theme!
|
|
}
|
|
}
|
|
}
|