瀏覽代碼

备份

master
鹏鹏 李 4 天之前
父節點
當前提交
c939c1128d
共有 2 個文件被更改,包括 2 次插入0 次删除
  1. +1
    -0
      item.h
  2. +1
    -0
      plc.cpp

+ 1
- 0
item.h 查看文件

@@ -26,6 +26,7 @@ public:
void setRegisterValue(quint16 value);
quint16 registerValue() const { return registerValue_; }


// 添加状态属性(用于线圈、触点等)
virtual bool state() const { return false; }



+ 1
- 0
plc.cpp 查看文件

@@ -133,6 +133,7 @@ void PLC::applyProjectToScene(const Project& proj)
connect(item, &Item::requestDelete, ui->graphicsView, &MyGraphicsView::onItemRequestDelete);
connect(item, &Item::requestBindRegister, ui->graphicsView, &MyGraphicsView::onItemRequestBindRegister);
plc_scene_->addItem(item);
registerManager->bindItem(item,d.registerId);
itemObjs.append(item);
}
for (const auto& c : proj.connections_) {


Loading…
取消
儲存