CuteHMI - Modbus Controller Items (CuteHMI.Examples.Modbus.ControllerItems.0)
Screen.ui.qml

Here is a complete listing of the screen component.

import QtQuick 2.0
import QtQuick.Controls 2.0
import CuteHMI.Modbus 2.0
Item {
Switch {
id: element
x: 10
y: 10
text: qsTr("Switch")
CoilItem {
id: coilItem
device: client
address: 10
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
CheckBox {
id: checkBox
x: 10
y: 80
text: qsTr("Check Box")
CoilItem {
id: coilItem1
device: client
address: 10
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
Label {
id: label
x: 227
y: 94
text: qsTr("Label")
HoldingRegisterItem {
id: holdingRegisterItem1
device: client
delegateProperty: "text"
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
address: 10
}
}
SpinBox {
id: spinBox
x: 160
y: 10
HoldingRegisterItem {
id: holdingRegisterItem
device: client
address: 10
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
}
/*##^##
Designer {
D{i:0;autoSize:true;height:480;width:640}
}
##^##*/
//(c)C: Copyright © 2020, Michał Policht <michal@policht.pl>. All rights reserved.
//(c)C: This file is a part of CuteHMI.
//(c)C: CuteHMI is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
//(c)C: CuteHMI is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
//(c)C: You should have received a copy of the GNU Lesser General Public License along with CuteHMI. If not, see <https://www.gnu.org/licenses/>.
CuteHMI::Modbus
CuteHMI