7 Star 3 Fork 1

wjzhe / mapEditor

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
UpdateCardIdDialog.qml 2.40 KB
一键复制 编辑 原始数据 按行查看 历史
maxy 提交于 2017-06-21 14:03 . 精确停止正在调试中
import QtQuick 2.0
import QtQuick.Dialogs 1.2
import QtQuick.Window 2.2
import QtQuick.Layouts 1.1
import QtQuick.Controls 1.4
Window {
id: root;
width: 300;
height: 200;
title: "Update Map Card ID";
color: "#EEEEEE";
modality: Qt.WindowNoState;
property bool run: false;
property int currentIndex: 0;
property int direction: 0; // 0->up; 1->down; 2->left; 3->right
property alias agvModel: agvModel;
property var currentItem: null;
AgvModel {
id: agvModel;
visible: false;
Component.onCompleted: {
this.agvTimer.running = false;
}
}
MessageDialog {
id: messageDialog
title: "warning!"
text: "current item no cardId."
}
Row {
x: 10;
y: 10
spacing: 10;
Column {
spacing: 4;
ComboBox {
id: agvDirectionCombo;
width: 80;
model: [
"Up",
"Down",
"Left",
"Right"
];
}
TextField {
id: startItem;
width: 80;
height: 25;
placeholderText: qsTr("起始Item");
}
}
Column {
spacing: 4;
Button {
id: updateBtn;
text: "Update";
onClicked: {
currentIndex = parseInt(startItem.text);
direction = agvDirectionCombo.currentIndex;
currentItem = mapGrid.itemAt(currentIndex);
if (currentItem.isCard) {
run = true;
if (cardCheck.checked) {
mapGrid.setItemCardID2(currentIndex, agvDialog.getCurrentCardId());
mapGrid.updateMapItemMoveToNext(currentIndex);
} else {
}
} else {
messageDialog.open();
}
}
}
Button {
id: stopBtn;
text: "stop";
onClicked: {
run = false;
}
}
}
CheckBox {
id: cardCheck;
text: "Is ";
onClicked: {
}
}
}
}
C++
1
https://gitee.com/null_446_4477/mapeditor.git
git@gitee.com:null_446_4477/mapeditor.git
null_446_4477
mapeditor
mapEditor
master

搜索帮助