Rearrange details page, add performance data

This commit is contained in:
Anton Thomasson 2022-01-13 21:10:47 +01:00
parent cd90064f9a
commit 47cde78edc
7 changed files with 106 additions and 14 deletions

View file

@ -69,6 +69,27 @@ Page {
visible: printer.attrs.hasOwnProperty("printer-state-message") visible: printer.attrs.hasOwnProperty("printer-state-message")
} }
SectionHeader {
text: qsTr("Supply status")
visible: printer.attrs.hasOwnProperty("marker-colors")
}
Repeater
{
model: printer.attrs["marker-colors"].value.length
SupplyItem
{
color: printer.attrs["marker-colors"].value[index]
level: printer.attrs["marker-levels"].value[index]
high_level: printer.attrs["marker-high-levels"].value[index]
low_level: printer.attrs["marker-low-levels"].value[index]
name: printer.attrs["marker-names"].value[index]
type: printer.attrs["marker-types"].value[index]
}
}
SectionHeader { SectionHeader {
text: qsTr("IPP versions") text: qsTr("IPP versions")
visible: printer.attrs.hasOwnProperty("ipp-versions-supported") visible: printer.attrs.hasOwnProperty("ipp-versions-supported")
@ -115,25 +136,24 @@ Page {
} }
SectionHeader { SectionHeader {
text: qsTr("Supply status") text: qsTr("Performance")
visible: printer.attrs.hasOwnProperty("marker-colors") visible: printer.attrs.hasOwnProperty("pages-per-minute") || printer.attrs.hasOwnProperty("pages-per-minute-color")
} }
Repeater Label
{ {
model: printer.attrs["marker-colors"].value.length text: ""+printer.attrs["pages-per-minute"].value+" "+qsTr("pages/min")
visible: printer.attrs.hasOwnProperty("pages-per-minute")
SupplyItem }
Label
{ {
color: printer.attrs["marker-colors"].value[index] text: ""+printer.attrs["pages-per-minute-color"].value+" "+qsTr("pages/min (color)")
level: printer.attrs["marker-levels"].value[index] visible: printer.attrs.hasOwnProperty("pages-per-minute-color")
high_level: printer.attrs["marker-high-levels"].value[index]
low_level: printer.attrs["marker-low-levels"].value[index] }
name: printer.attrs["marker-names"].value[index]
type: printer.attrs["marker-types"].value[index]
} }
} }
} }
}
}

View file

@ -205,6 +205,18 @@
<source>Location</source> <source>Location</source>
<translation>Standort</translation> <translation>Standort</translation>
</message> </message>
<message>
<source>Performance</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>pages/min</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>pages/min (color)</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>FirstPage</name> <name>FirstPage</name>

View file

@ -205,6 +205,18 @@
<source>Location</source> <source>Location</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Performance</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>pages/min</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>pages/min (color)</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>FirstPage</name> <name>FirstPage</name>

View file

@ -205,6 +205,18 @@
<source>Location</source> <source>Location</source>
<translation>Localisation</translation> <translation>Localisation</translation>
</message> </message>
<message>
<source>Performance</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>pages/min</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>pages/min (color)</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>FirstPage</name> <name>FirstPage</name>

View file

@ -205,6 +205,18 @@
<source>Location</source> <source>Location</source>
<translation>Locatie</translation> <translation>Locatie</translation>
</message> </message>
<message>
<source>Performance</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>pages/min</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>pages/min (color)</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>FirstPage</name> <name>FirstPage</name>

View file

@ -205,6 +205,18 @@
<source>Location</source> <source>Location</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Performance</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>pages/min</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>pages/min (color)</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>FirstPage</name> <name>FirstPage</name>

View file

@ -205,6 +205,18 @@
<source>Location</source> <source>Location</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<source>Performance</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>pages/min</source>
<translation type="unfinished"></translation>
</message>
<message>
<source>pages/min (color)</source>
<translation type="unfinished"></translation>
</message>
</context> </context>
<context> <context>
<name>FirstPage</name> <name>FirstPage</name>