123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- import QtQuick 2.6
- import QtQuick.Window 2.2
- import QtQuick.Controls 1.5
- import QtQuick.Controls.Styles 1.4
- import QtQuick.Controls.Private 1.0
- import com.gfa.ipc.appctrl 1.0
- import com.gfa.shm._oem_ 1.0
- Rectangle {
- width: 800
- height: 480
- /////////////////////////////////////////////////////////////////////////////////////////////////
- Rectangle {
- x: 10
- y: 10
- width: parent.width - 20
- height: 30
- radius: 5
- border.width: 1
- border.color: "black"
- color: "lightgreen"
- Image {
- anchors.left: parent.left
- anchors.verticalCenter: parent.verticalCenter
- fillMode: Image.PreserveAspectFit
- height: parent.height
- source: "qrc:/img/blank.png"
- }
- Text {
- font.pixelSize: 16
- font.bold: true
- anchors.verticalCenter: parent.verticalCenter
- anchors.centerIn: parent
- text: "SHM - Bell frames"
- }
- Image {
- anchors.right: parent.right
- anchors.verticalCenter: parent.verticalCenter
- fillMode: Image.PreserveAspectFit
- height: parent.height
- source: "qrc:/img/next.png"
- MouseArea {
- anchors.fill: parent
- onClicked: { idPageLoader.source = "appctrl.qml" }
- }
- }
- }
- /////////////////////////////////////////////////////////////////////////////////////////////////
- Rectangle {
- x: 10
- y: 40
- height: 400
- width: parent.width - 20
-
- ListModel {
- id: bellFrameModel
- Component.onCompleted: {
- var i = 0;
- bellFrameModel.clear();
- for(i = 0; i < qSHM.bellFrames.length; ++i)
- {
- var bf = qSHM.bellFrames[i];
- if(bf.id.val > 0)
- {
- bellFrameModel.append({"mid": bf.id.val, "type": bf.type.val, "relaisID": bf.relaisID.val,
- "startOffsMin": bf.startOffsMin.val, "startOffsSec": bf.startOffsSec.val,
- "durationMin": bf.durationMin.val, "durationSec": bf.durationSec.val});
- }
- }
- }
- }
- TableView {
- anchors.fill: parent
- model: bellFrameModel
- style: TableViewStyle {
- itemDelegate: idTableViewItemStyle
- headerDelegate: idTableViewHeaderStyle
- }
- TableViewColumn {
- role: "mid"
- width: 50
- title: "ID"
- }
- TableViewColumn {
- role: "type"
- width: 50
- title: "Typ"
- }
- TableViewColumn {
- role: "relaisID"
- width: 80
- title: "Relais"
- }
- TableViewColumn {
- role: "startOffsMin"
- width: 100
- title: "Start-Min."
- }
- TableViewColumn {
- role: "startOffsSec"
- width: 100
- title: "Start-Sec."
- }
- TableViewColumn {
- role: "durationMin"
- width: 100
- title: "Dauer-Min."
- }
- TableViewColumn {
- role: "durationSec"
- width: 100
- title: "Dauer-Sec."
- }
- }
- }
- /////////////////////////////////////////////////////////////////////////////////////////////////
- Rectangle {
- x: 10
- y: 440
- height: 30
- width: parent.width - 20
- Button {
- text: "Exit"
- anchors.fill: parent
- onClicked: Qt.quit()
- style: idButtonStyle
- }
- }
- }
|