#pragma once #include "Common.h" #include "ui_DialogGotoSelection.h" /// /// Goto工具用来进行下行工具选择的界面(2022-4-18,Goto的工具绑定选择对话框废弃,统一通过连线来绑定Tool) /// class POU; class DialogGotoSelection : public QDialog { Q_OBJECT public: DialogGotoSelection(const POU* pou, QWidget *parent = Q_NULLPTR); ~DialogGotoSelection(); // 用户选择的Goto绑定工具 QString m_selToolInstName; private: Ui::DialogGotoSelection ui; private: // 对话框初始化 void initUI(); // 添加兼容的Pou工具到树形结构中 void AddPouToolsToTree(const POU* pPou); // 添加根节点 QTreeWidgetItem* AddRootTreeItem(const QString& toolName); // 添加Tool子节点 void AddToolTreeItem(QTreeWidgetItem* pToolItem, const TOOL* pTool); private slots: // select按钮 void onButtonSelectClicked(); // Combo框选择变更时,需要切换对应的工具列表(当前仅一个分组) void onComboGroupChanged(int nIndex); private: // 本对话框管理数据所在的Pou分组 const POU* m_pou; };