跳到主内容
paste
bin
.ca
type · paste · share
⌘
K
系列
bin 系列
pastebin.ca
中心
Share text and code with expiry and privacy controls.
imagebin.ca
Upload and share images with direct links.
filebin.ca
Drop a file and get a shareable link.
notebin.ca
Write Markdown notes with durable links.
turl.ca
Short, reputation-checked links.
attn.ca
Notifications and alerts for your services.
voicebin.ca
Record and share short voice clips.
dnsbin.ca
Inspect DNS and debug records.
文档
登录
?
← 返回文本
›
编辑 / 分支
无标题文本
#282eqGaQvM
public / public
新版本
由 @amber-zebra-8262
已创建 23 days ago
永不过期
3.7 KB
语法:
text
你的更改会创建一个链接到此文本的新文本 — 原始文本不变。
新版本
你的更改会创建一个链接到此文本的新文本 — 原始文本不变。
标题(可选)
文件名
语法
text
text
bash
c
cpp
css
diff
dockerfile
go
html
ini
java
javascript
json
kotlin
lua
makefile
markdown
nginx
php
python
ruby
rust
shellscript
sql
swift
toml
typescript
xml
yaml
可见性
公开动态
访问
public
过期
7 天
10 分钟
1 小时
1 天
7 天
30 天
90 天
自定义…
自定义过期
变更备注
(可选)
此文本会显示在公开动态中。如果只想通过链接分享,请更改可见性。
创建新版本
取消
粘贴或输入…
#pragma once #include <QWidget> #include <QJsonObject> #include <QVector> #include <QList> #include "e3d_motion_controller_base.h" #include "ui_view_configGenarater.h" struct data_ToolheadConfig; struct data_motion_controller; class QSpinBox; class QPushButton; class QLineEdit; class QTableWidget; class QListWidget; class QTabWidget; class QComboBox; class QCheckBox; class QGroupBox; struct data_equipment; QT_BEGIN_NAMESPACE namespace Ui { class e3d_configGenaraterClass; }; QT_END_NAMESPACE class view_configGenerator : public QWidget { Q_OBJECT public: explicit view_configGenerator(QWidget *parent = nullptr); ~view_configGenerator(); private slots: void onLoadConfigFromFile(); void onSaveConfigToFile(); void onSaveTempClicked(); // 1. 控制卡 Master-Detail 槽函数 void onAddController(); void onDeleteController(); void onControllerSelected(int currentRow); void onAddAxis(); void onDeleteAxis(); void onAddIO(QTableWidget* table); void onDeleteIO(QTableWidget* table); // 2. 工具头 (Toolhead) Master-Detail 槽函数 void onAddToolhead(); void onDeleteToolhead(); void onToolheadSelected(int currentRow); void onAddMountedDevice(); void onDeleteMountedDevice(); private: void initUI(); // 顶级 UI 构建 QWidget* createMotionControllerTab(); QWidget* createCommsTab(); QWidget* createHeightSensorTab(); // 测距传感器配置页 QWidget* createDispenserTab(); QWidget* createExternalDeviceTab(); // 物理坐标与通讯通道统一在此管理 QWidget* createToolheadTab(); // 工作头配置页 QWidget* createCommonTab(); void updateTableRows(QTableWidget *table, int targetCount); // JSON 内存与 UI 数据同步 QJsonObject saveToTempJson(); void loadFromTempJson(const QJsonObject& json); // 控制卡辅助同步 void saveCurrentControllerFromUI(); void updateControllerRightPanel(); void clearControllerRightPanel(); // 工具头辅助同步 void saveCurrentToolheadFromUI(); void updateToolheadRightPanel(); void clearToolheadRightPanel(); private: Ui::e3d_configGenaraterClass *ui; data_equipment* currentData = nullptr; // 顶部通用控件 QLineEdit *le_configPath; QPushButton *pb_loadConfig; QPushButton *pb_saveConfigToFile; QPushButton *pb_saveConfigToTemp; QLineEdit *le_softwareName; // 1. 控制卡页面控件 QListWidget *m_cardListWidget; QGroupBox *m_controllerRightGroup; // 右侧整体面板容器,用于控制 Enable/Disable QLineEdit *m_editCardName; QComboBox *m_comboBrand; QLineEdit *m_editIP; QSpinBox *m_spinPort; QLineEdit *m_editAllAxisHomePath; QCheckBox *m_showSub; QTabWidget *m_subConfigTab; QTableWidget *m_axisTable; QTableWidget *m_dinTable; QTableWidget *m_doutTable; QTableWidget *m_ainTable; QTableWidget *m_aoutTable; QTableWidget *m_surfaceAxisGroupTable; QList<data_motion_controller> m_controllerList; int m_currentCardIndex = -1; // 2. 通讯模块页面控件 QSpinBox *sb_count_Comms; QTableWidget *tw_Comms; // 3. 测距传感器页面控件 (Height Sensor) QSpinBox *sb_count_HeightSensor; QTableWidget *tw_HeightSensor; // 4. 点胶机页面控件 QSpinBox *sb_count_Dispenser; QTableWidget *tw_Dispenser; // 5. 全局外设页面控件 (包含 Pos X, Y, Z 以及 m_commsChannelName) QSpinBox *sb_count_ExternalDevice; QTableWidget *tw_ExternalDevice; // 6. 工作头 (Toolhead) 页面控件 QListWidget *m_toolheadListWidget; QGroupBox *m_toolheadRightGroup; // 右侧整体面板容器,用于控制 Enable/Disable QLineEdit *m_editToolheadName; QCheckBox *m_chkIsVirtualToolhead; QLineEdit *m_editBindMotionGroup; QLineEdit *m_editBindZAxis; QTableWidget *m_mountedDevicesTable; QList<data_ToolheadConfig> m_toolheadList; int m_currentToolheadIndex = -1; };