LabelMe
Public Member Functions | Public Attributes | List of all members
My::Shape2D Class Referenceabstract

2d标注形状的基类 More...

#include <Shape2D.h>

Inheritance diagram for My::Shape2D:
My::Shape My::Brush My::Circle My::Curve My::Polygons My::Rectangle

Public Member Functions

 Shape2D (My::Shape::Type t)
 
virtual void draw (QWidget *w)
 绘制标注形状虚函数 More...
 
virtual bool isInShape (QPointF p, QWidget *w)
 判断鼠标是否在标注形状内部虚函数 More...
 
virtual void offset (float xOffset, float yOffset)
 偏移标注形状虚函数 More...
 
virtual ~Shape2D ()=0
 
- Public Member Functions inherited from My::Shape
 Shape (Type t)
 
virtual ~Shape ()=0
 

Public Attributes

QVector< QPointF > points
 存储标注形状的像素点位 More...
 
- Public Attributes inherited from My::Shape
const Type type
 标注类型 More...
 
QString label
 标注对应的标签文字 More...
 
QColor color =QColor(100,255,0,100)
 默认标注颜色 More...
 
bool isFill =false
 是否填充内部 More...
 
bool isHide =false
 是否隐藏标注 More...
 
bool isHover =false
 是否悬浮 More...
 

Additional Inherited Members

- Public Types inherited from My::Shape
enum  Type {
  Brush, Rectangle, Polygons, Circle,
  Curve, Rectangle3D, Brush3D
}
 标注形状的类型 More...
 

Detailed Description

2d标注形状的基类

Constructor & Destructor Documentation

◆ Shape2D()

My::Shape2D::Shape2D ( My::Shape::Type  t)
inline

◆ ~Shape2D()

My::Shape2D::~Shape2D ( )
pure virtual

Member Function Documentation

◆ draw()

void My::Shape2D::draw ( QWidget *  w)
virtual

绘制标注形状虚函数

绘制函数,默认虚函数实现

Reimplemented in My::Rectangle, My::Brush, My::Circle, My::Polygons, and My::Curve.

◆ isInShape()

bool My::Shape2D::isInShape ( QPointF  p,
QWidget *  w 
)
virtual

判断鼠标是否在标注形状内部虚函数

判断是否在形状内函数,默认虚函数实现

Reimplemented in My::Rectangle, My::Brush, My::Circle, My::Polygons, and My::Curve.

◆ offset()

void My::Shape2D::offset ( float  xOffset,
float  yOffset 
)
virtual

偏移标注形状虚函数

pian'yi函数,默认虚函数实现

Reimplemented in My::Rectangle, My::Brush, My::Circle, My::Polygons, and My::Curve.

Member Data Documentation

◆ points

QVector<QPointF> My::Shape2D::points

存储标注形状的像素点位


The documentation for this class was generated from the following files: