DAWorkbench 0.0.1
DAWorkbench API
载入中...
搜索中...
未找到
DAShapeKeyPoint.h
1#ifndef DASHAPEKEYPOINT_H
2#define DASHAPEKEYPOINT_H
3#include <QRect>
4#include "DAGraphicsViewGlobal.h"
5namespace DA
6{
18class DAGRAPHICSVIEW_API DAShapeKeyPoint
19{
20public:
33 {
34 TopLeft = 0,
35 TopCenter,
36 TopRight,
37 CenterLeft,
38 Center,
39 CenterRight,
40 BottomLeft,
41 BottomCenter,
42 BottomRight,
43 None = 128
44 };
45 DAShapeKeyPoint(KeyPoint kp = KeyPoint::Center);
46 ~DAShapeKeyPoint();
47 // 是否有效
48 bool isValid() const;
49 // 关键点在矩形的绝对
50 QPoint rectKeyPoint(const QRect& r) const;
51 QPointF rectKeyPoint(const QRectF& r) const;
52 static QPoint rectKeyPoint(const QRect& r, const DAShapeKeyPoint& kp);
53 static QPointF rectKeyPoint(const QRectF& r, const DAShapeKeyPoint& kp);
54 // 值
55 KeyPoint value() const;
56 // 等号操作符
57 DAShapeKeyPoint& operator=(KeyPoint kp);
58 bool operator==(KeyPoint kp) const;
59
60private:
61 KeyPoint mKeyPoint { KeyPoint::None };
62};
63} // end DA
64#endif // DASHAPEKEYPOINT_H
序列化类都是带异常的,使用中需要处理异常
Definition AppMainWindow.cpp:44
KeyPoint
定义一个形状的9个关键位置点
Definition DAShapeKeyPoint.h:33