123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149 |
- import QtQuick 2.2
- import QtQuick.Controls 1.4
- import QtQuick.Controls.Styles 1.4
- import UM 1.3 as UM
- Item
- {
- property var printJob: null
- function getPrettyTime(time)
- {
- return OutputDevice.formatDuration(time)
- }
- Rectangle
- {
- id: background
- anchors.fill: parent
- Item
- {
- // Content on the left of the infobox
- anchors
- {
- top: parent.top
- bottom: parent.bottom
- left: parent.left
- right: parent.horizontalCenter
- margins: UM.Theme.getSize("default_margin").width
- }
- Label
- {
- id: printJobName
- text: "printJobName"
- }
- Label
- {
- id: ownerName
- anchors.top: printJobName.bottom
- text: "OwnerName"
- }
- Image
- {
- source: printJob.preview_image_url
- anchors.top: ownerName.bottom
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottom: totalTimeLabel.top
- width: height
- }
- Label
- {
- id: totalTimeLabel
- anchors.bottom: parent.bottom
- anchors.right: parent.right
- text: printJob != null ? getPrettyTime(printJob.timeTotal) : "3h 12m"
- elide: Text.ElideRight
- }
- }
- Item
- {
- // Content on the right side of the infobox.
- anchors
- {
- top: parent.top
- bottom: parent.bottom
- left: parent.horizontalCenter
- right: parent.right
- margins: UM.Theme.getSize("default_margin").width
- }
- Label
- {
- id: targetPrinterLabel
- text: "Waiting for: first available"
- }
- Button
- {
- text: "..."
- anchors
- {
- right: parent.right
- top: parent.top
- }
- }
- // PrintCore && Material config
- Row
- {
- id: extruderInfo
- anchors.bottom: parent.bottom
- anchors
- {
- left: parent.left
- right: parent.right
- }
- height: childrenRect.height
- spacing: UM.Theme.getSize("default_margin").width
- PrintCoreConfiguration
- {
- id: leftExtruderInfo
- width: Math.round((parent.width - extruderSeperator.width) / 2)
- printCoreConfiguration: printJob.configuration.extruderConfigurations[0]
- }
- Rectangle
- {
- id: extruderSeperator
- width: UM.Theme.getSize("default_lining").width
- height: parent.height
- color: lineColor
- }
- PrintCoreConfiguration
- {
- id: rightExtruderInfo
- width: Math.round((parent.width - extruderSeperator.width) / 2)
- printCoreConfiguration: printJob.configuration.extruderConfigurations[1]
- }
- }
- }
- Rectangle
- {
- color: "grey"
- width: 1
- anchors.top: parent.top
- anchors.bottom: parent.bottom
- anchors.margins: UM.Theme.getSize("default_margin").height
- anchors.horizontalCenter: parent.horizontalCenter
- }
- }
- }
|