skip to main content
paste
bin
.ca
type · paste · share
⌘
K
Family
The bin family
pastebin.ca
hub
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.
Docs
Sign in
?
← back to paste
›
Edit / fork
Untitled paste
#282eqGaQvM
public / public
new version
by @amber-zebra-8262
created 23 days ago
no expiry
3.7 KB
syntax:
text
Your changes create a new paste linked to this one — the original is untouched.
new version
Your changes create a new paste linked to this one — the original is untouched.
Title (optional)
Filename
Syntax
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
Visibility
Public feed
Access
public
Expires
7 days
10 min
1 hour
1 day
7 days
30 days
90 days
custom…
Custom expiry
Change note
(optional)
This paste will be listed on the public feed. Change Visibility if you only want people with the link to see it.
Create new version
Cancel
Paste or type…
#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; };