GrabBag/Tools/CalibView/Inc/CalibResultWidget.h

142 lines
3.0 KiB
C
Raw Normal View History

#ifndef CALIBRESULTWIDGET_H
#define CALIBRESULTWIDGET_H
#include <QWidget>
#include <QTableWidget>
#include <QTextEdit>
#include <QLabel>
#include <QGroupBox>
#include <QPushButton>
#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
*/
void showTransformResult(const HECPoint3D& srcPoint,
const HECPoint3D& dstPoint);
/**
* @brief
*/
void showEulerResult(const HECEulerAngles& inputAngles,
const HECRotationMatrix& R,
const HECEulerAngles& outputAngles,
HECEulerOrder order);
/**
* @brief
*/
void clearAll();
/**
* @brief
*/
void appendLog(const QString& message);
/**
* @brief
*/
const HECCalibResult& getCurrentResult() const { return m_currentResult; }
/**
* @brief
*/
bool hasValidResult() const { return m_hasResult; }
private:
/**
* @brief
*/
void setupUI();
/**
* @brief
*/
QGroupBox* createRotationGroup();
/**
* @brief
*/
QGroupBox* createTranslationGroup();
/**
* @brief
*/
QGroupBox* createEulerGroup();
/**
* @brief
*/
QGroupBox* createErrorGroup();
/**
* @brief
*/
QGroupBox* createLogGroup();
/**
* @brief
*/
void updateRotationDisplay(const HECRotationMatrix& R);
/**
* @brief
*/
void updateTranslationDisplay(const HECTranslationVector& T);
/**
* @brief
*/
void updateEulerDisplay(const HECEulerAngles& angles);
// 旋转矩阵表格
QTableWidget* m_tableRotation;
// 平移向量标签
QLabel* m_lblTransX;
QLabel* m_lblTransY;
QLabel* m_lblTransZ;
// 欧拉角标签
QLabel* m_lblRoll;
QLabel* m_lblPitch;
QLabel* m_lblYaw;
QLabel* m_lblRollDeg;
QLabel* m_lblPitchDeg;
QLabel* m_lblYawDeg;
// 误差标签
QLabel* m_lblError;
// 质心标签
QLabel* m_lblCenterEye;
QLabel* m_lblCenterRobot;
// 日志显示
QTextEdit* m_logEdit;
// 当前结果
HECCalibResult m_currentResult;
bool m_hasResult;
};
#endif // CALIBRESULTWIDGET_H