代码拉取完成,页面将自动刷新
import QtQuick 2.4
import QtQuick.Controls 2.2
import "buildview"
Item {
id: item1
width: 600
height: 400
OfflineBaiduMap {
id: sdoffmap
width: parent.width + 20
height: parent.height + 20
}
BuildView {
id: buildView
objectName: "objsdbuildview"
width: parent.width + 20
height: parent.height + 20
visible: false
}
Connections {
target: buildView
onUsrBuildClicked: {
buildView.data[1].clearMapIcon()
SDController.getFloorDevice(btype, bstrIndex)
}
}
Connections {
target: SDController
onSdEvent: {
buildView.data[1].deviceEvent(isn, event, islt)
if(!islt)
SDController.updateSDEmgCntInfo(isn ,event)
}
onSdInit: {
buildView.data[1].createObject(devtype, sdisn, ltisn, port, state,
x, y, power, emgno, emgtime)
}
}
DevRecordPage {
id: devRecordPage
visible: false
anchors.fill: parent
}
TabBar {
id: tabBar
x: 31
y: 360
width: 369
height: 40
anchors.bottom: parent.bottom
anchors.right: parent.right
TabButton {
id: tabbtndismap
text: qsTr("区域地图")
}
TabButton {
id: tabbtnbuildview
text: qsTr("建筑地图")
}
TabButton {
id: tabbrnrecord
text: qsTr("设备记录")
}
// TabButton {
// id: tabbtntest
// text: qsTr("TestBtn")
// }
}
Connections {
target: tabbtnbuildview
onClicked: item1.state = "buildmap"
}
// Connections {
// target: tabbtntest
// onClicked: sdoffmap.data[1].createmarker(113.948124, 23.026141,
// "神山工业城精恒电子茂强办公楼二楼")
// }
Connections {
target: tabbtndismap
onClicked: item1.state = ""
}
Connections {
target: tabbrnrecord
onClicked: item1.state = "staterecord"
}
states: [
State {
name: "buildmap"
PropertyChanges {
target: sdoffmap
visible: false
}
PropertyChanges {
target: buildView
visible: true
}
PropertyChanges {
target: devRecordPage
visible: false
}
},
State {
name: "staterecord"
PropertyChanges {
target: sdoffmap
visible: false
}
PropertyChanges {
target: buildView
visible: false
}
PropertyChanges {
target: devRecordPage
visible: true
opacity: 1
}
}
]
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。