#ifndef CALIBRESULTWIDGET_H #define CALIBRESULTWIDGET_H #include #include #include #include #include "HandEyeCalibTypes.h" /** * @brief 标定结果显示控件 * 显示变换矩阵、误差等信息 */ class CalibResultWidget : public QWidget { Q_OBJECT public: explicit CalibResultWidget(QWidget* parent = nullptr); ~CalibResultWidget() override; /** * @brief 显示标定结果 */ void showCalibResult(const HECCalibResult& result); /** * @brief 显示 TCP 标定结果 */ void showTCPCalibResult(const HECTCPCalibResult& result); /** * @brief 清除所有结果 */ void clearAll(); /** * @brief 获取当前标定结果 */ const HECCalibResult& getCurrentResult() const { return m_currentResult; } /** * @brief 是否有有效结果 */ bool hasValidResult() const { return m_hasResult; } /** * @brief 更新旋转矩阵显示 */ void updateRotationDisplay(const HECRotationMatrix& R); private: /** * @brief 初始化界面 */ void setupUI(); /** * @brief 创建旋转矩阵显示组 */ QGroupBox* createRotationGroup(); /** * @brief 创建误差显示组 */ QGroupBox* createErrorGroup(); /** * @brief 更新平移向量显示 */ void updateTranslationDisplay(const HECTranslationVector& T); // 旋转矩阵表格 QTableWidget* m_tableRotation; // 误差标签 QLabel* m_lblError; // 质心标签 QLabel* m_lblCenterEye; QLabel* m_lblCenterRobot; // 当前结果 HECCalibResult m_currentResult; bool m_hasResult; }; #endif // CALIBRESULTWIDGET_H