2026-03-22 17:31:41 +08:00
|
|
|
|
#ifndef XYZRPYITEM_H
|
|
|
|
|
|
#define XYZRPYITEM_H
|
|
|
|
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
|
|
#include "IVisionApplicationStatus.h"
|
|
|
|
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
|
class XyzRpyItem;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @brief 通用 6DOF 结果卡片控件
|
|
|
|
|
|
*
|
|
|
|
|
|
* 参考 HoleDetectionApp 的 VBoxLayout 风格,显示 XYZ + RPY 坐标。
|
|
|
|
|
|
* 不依赖任何 App 特定类型,接受 PositionData<double>。
|
|
|
|
|
|
*/
|
|
|
|
|
|
class XyzRpyItem : public QWidget
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
explicit XyzRpyItem(QWidget *parent = nullptr);
|
|
|
|
|
|
~XyzRpyItem();
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
* @brief 设置结果数据
|
|
|
|
|
|
* @param index 显示编号(如 1, 2, 3)
|
|
|
|
|
|
* @param titlePrefix 标题前缀(如 "工件"、"目标"、"孔洞")
|
|
|
|
|
|
* @param position 6DOF 坐标数据
|
|
|
|
|
|
* @param precision 小数位数,默认3位
|
|
|
|
|
|
*/
|
|
|
|
|
|
void setResultData(int index, const QString& titlePrefix,
|
|
|
|
|
|
const PositionData<double>& position, int precision = 3);
|
|
|
|
|
|
|
2026-10-08 10:02:57 +08:00
|
|
|
|
void setResultData(int index, const QString& titlePrefix,
|
|
|
|
|
|
const QString& locationText,
|
|
|
|
|
|
const PositionData<double>& position,
|
|
|
|
|
|
bool highlighted = false, int precision = 3);
|
|
|
|
|
|
|
2026-03-22 17:31:41 +08:00
|
|
|
|
private:
|
|
|
|
|
|
Ui::XyzRpyItem *ui;
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // XYZRPYITEM_H
|