- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
// Qt QML >:D
UI_Button
{
id: bt_connect
height: 40
width: 150
radiusBorder: 20
anchors.right: led_connection.left
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
textOn: qsTr("Отключиться")
textOff: qsTr("Подключиться")
state: putState(QVipGUI.btConnection)
onClicked:{
if(QVipGUI.btConnection !== GuiDefines.DEF_STATE_DIMMED) {
if(QVipGUI.btConnection === GuiDefines.DEF_STATE_OFF) {
QVipGUI.setLedConnection(GuiDefines.DEF_STATE_OFF)
QVipGUI.method_ActionGui(GuiDefines.ID_ACTION_CONNECT)
QVipGUI.method_ActionGui(GuiDefines.ID_ACTION_GETPORT) // <!>
var i = 0;
while(++i < 1000000){};
QVipGUI.method_ActionGui(GuiDefines.ID_ACTION_GETCONF);
}
else {
QVipGUI.method_ActionGui(GuiDefines.ID_ACTION_DISCONNECT)
}
}
}
}