2026-01-27 20:43:12 +08:00
|
|
|
|
#ifndef DIALOGALGOARG_H
|
|
|
|
|
|
#define DIALOGALGOARG_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
#include <QDialog>
|
|
|
|
|
|
#include <QString>
|
2026-02-01 14:51:16 +08:00
|
|
|
|
#include <QLineEdit>
|
2026-01-27 20:43:12 +08:00
|
|
|
|
#include "ConfigManager.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
|
class DialogAlgoarg;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
class DialogAlgoarg : public QDialog
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit DialogAlgoarg(ConfigManager* configManager, QWidget *parent = nullptr);
|
|
|
|
|
|
~DialogAlgoarg();
|
|
|
|
|
|
|
|
|
|
|
|
private slots:
|
|
|
|
|
|
void on_btn_camer_ok_clicked();
|
|
|
|
|
|
void on_btn_camer_cancel_clicked();
|
2026-02-01 14:51:16 +08:00
|
|
|
|
void on_btn_loadCalibMatrix_clicked();
|
2026-01-27 20:43:12 +08:00
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
void LoadConfigToUI();
|
|
|
|
|
|
bool SaveConfigFromUI();
|
|
|
|
|
|
|
|
|
|
|
|
// 加载各个参数组到 UI
|
|
|
|
|
|
void LoadWorkpieceHoleParamToUI(const VrWorkpieceHoleParam& param);
|
|
|
|
|
|
void LoadLineSegParamToUI(const VrLineSegParam& param);
|
|
|
|
|
|
void LoadFilterParamToUI(const VrOutlierFilterParam& param);
|
|
|
|
|
|
void LoadGrowParamToUI(const VrTreeGrowParam& param);
|
|
|
|
|
|
|
|
|
|
|
|
// 从 UI 保存各个参数组
|
|
|
|
|
|
bool SaveWorkpieceHoleParamFromUI(VrWorkpieceHoleParam& param);
|
|
|
|
|
|
bool SaveLineSegParamFromUI(VrLineSegParam& param);
|
|
|
|
|
|
bool SaveFilterParamFromUI(VrOutlierFilterParam& param);
|
|
|
|
|
|
bool SaveGrowParamFromUI(VrTreeGrowParam& param);
|
|
|
|
|
|
|
2026-02-02 23:24:24 +08:00
|
|
|
|
// 网络配置(PLC服务端)
|
2026-02-01 14:51:16 +08:00
|
|
|
|
void LoadPlcRobotServerConfigToUI(const VrPlcRobotServerConfig& config);
|
|
|
|
|
|
bool SavePlcRobotServerConfigFromUI(VrPlcRobotServerConfig& config);
|
2026-02-02 23:24:24 +08:00
|
|
|
|
void InitPoseOutputOrderComboBox();
|
|
|
|
|
|
void InitDirVectorInvertComboBox();
|
2026-02-01 14:51:16 +08:00
|
|
|
|
|
|
|
|
|
|
// 手眼标定矩阵
|
|
|
|
|
|
void LoadCalibMatrixToUI();
|
|
|
|
|
|
void LoadCalibMatrixFromFile(const QString& filePath);
|
|
|
|
|
|
bool SaveCalibMatrixToConfig(VrHandEyeCalibMatrix& calibMatrix);
|
|
|
|
|
|
QLineEdit* GetCalibLineEdit(int row, int col);
|
|
|
|
|
|
void InitEulerOrderComboBox();
|
|
|
|
|
|
|
2026-01-27 20:43:12 +08:00
|
|
|
|
private:
|
|
|
|
|
|
Ui::DialogAlgoarg *ui;
|
|
|
|
|
|
ConfigManager* m_pConfigManager;
|
|
|
|
|
|
QString m_configFilePath;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // DIALOGALGOARG_H
|