示例#1
0
PolygonAnnotation::PolygonAnnotation(ShapeAnnotation *pShapeAnnotation, GraphicsView *pGraphicsView)
    : ShapeAnnotation(true, pGraphicsView, 0)
{
    updateShape(pShapeAnnotation);
    setShapeFlags(true);
    mpGraphicsView->addItem(this);
    connect(pShapeAnnotation, SIGNAL(updateReferenceShapes()), pShapeAnnotation, SIGNAL(changed()));
    connect(pShapeAnnotation, SIGNAL(added()), this, SLOT(referenceShapeAdded()));
    connect(pShapeAnnotation, SIGNAL(changed()), this, SLOT(referenceShapeChanged()));
    connect(pShapeAnnotation, SIGNAL(deleted()), this, SLOT(referenceShapeDeleted()));
}
EllipseAnnotation::EllipseAnnotation(ShapeAnnotation *pShapeAnnotation, Component *pParent)
  : ShapeAnnotation(pParent)
{
  updateShape(pShapeAnnotation);
  setPos(mOrigin);
  setRotation(mRotation);
  connect(pShapeAnnotation, SIGNAL(updateReferenceShapes()), pShapeAnnotation, SIGNAL(changed()));
  connect(pShapeAnnotation, SIGNAL(added()), this, SLOT(referenceShapeAdded()));
  connect(pShapeAnnotation, SIGNAL(changed()), this, SLOT(referenceShapeChanged()));
  connect(pShapeAnnotation, SIGNAL(deleted()), this, SLOT(referenceShapeDeleted()));
}
示例#3
0
PolygonAnnotation::PolygonAnnotation(ShapeAnnotation *pShapeAnnotation, Component *pParent)
    : ShapeAnnotation(pParent)
{
    updateShape(pShapeAnnotation);
    initUpdateVisible(); // DynamicSelect for visible attribute
    setPos(mOrigin);
    setRotation(mRotation);
    connect(pShapeAnnotation, SIGNAL(updateReferenceShapes()), pShapeAnnotation, SIGNAL(changed()));
    connect(pShapeAnnotation, SIGNAL(added()), this, SLOT(referenceShapeAdded()));
    connect(pShapeAnnotation, SIGNAL(changed()), this, SLOT(referenceShapeChanged()));
    connect(pShapeAnnotation, SIGNAL(deleted()), this, SLOT(referenceShapeDeleted()));
}