import QtQuick 2.7 import QtQuick.Window 2.2 import QtQuick.Controls 1.4 import com.gfa.ipc.appctrl 1.0 Window { visible: true width: 640 height: 480 title: qsTr("GfA App Control") function stateColor(state) { switch(state) { case QGfaAppCtrl.STATE_RUNNING: return "lightgreen"; case QGfaAppCtrl.STATE_PAUSED: return "lightgrey"; case QGfaAppCtrl.STATE_HANGING: return "red"; default: return "white"; } } function sec2HMS(sec) { var h = parseInt(sec / 3600); sec -= h * 3600; var m = parseInt(sec / 60); sec -= m * 60; return "" + h + (m < 10 ? ":0" : ":") + m + (sec < 10 ? ":0" : ":") + sec; } Rectangle { x: 10 y: 20 width: 120 height: 460 Rectangle { x: 0 y: 40 width: parent.width height: 30 Text { font.pixelSize: 14 font.italic: true anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left text: "State:" } } Rectangle { x: 0 y: 70 width: parent.width height: 30 Text { font.pixelSize: 14 font.italic: true anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left text: "Cyc. min. μs:" } } Rectangle { x: 0 y: 100 width: parent.width height: 30 Text { font.pixelSize: 14 font.italic: true anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left text: "Cyc. max. μs:" } } Rectangle { x: 0 y: 130 width: parent.width height: 30 Text { font.pixelSize: 14 font.italic: true anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left text: "Cyc. cur. μs:" } } Rectangle { x: 0 y: 160 width: parent.width height: 30 Text { font.pixelSize: 14 font.italic: true anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left text: "CPU Time sec.:" } } Rectangle { x: 0 y: 190 width: parent.width height: 30 Text { font.pixelSize: 14 font.italic: true anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left text: "CPU avg. %:" } } Rectangle { x: 0 y: 220 width: parent.width height: 30 Text { font.pixelSize: 14 font.italic: true anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left text: "CPU cur. %:" } } Rectangle { x: 0 y: 250 width: parent.width height: 30 Text { font.pixelSize: 14 font.italic: true anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left text: "Uptime H:M:S:" } } Rectangle { x: 0 y: 280 width: parent.width height: 30 Text { font.pixelSize: 14 font.italic: true anchors.verticalCenter: parent.verticalCenter anchors.left: parent.left text: "